jkvargas / russimp-sys

Assimp raw bindings
Other
2 stars 21 forks source link

russimp-sys v2.0.2 crate is missing assimp submodule files #45

Open fgiordana opened 5 months ago

fgiordana commented 5 months ago

If I try to build any project that depends on russimp-sys v2.0.2, with the static-link feature enabled, I get the following errors:

--feature static-link

Compiling russimp-sys v2.0.2
error: failed to run custom build command for `russimp-sys v2.0.2`

Caused by:
  process didn't exit successfully: `/Users/fgiordana/Documents/git/russimp/target/debug/build/russimp-sys-5a77813b25b441d9/build-script-build` (exit status: 101)
  --- stdout
  cargo:rustc-link-search=native=/opt/homebrew/lib/
  CMAKE_TOOLCHAIN_FILE_aarch64-apple-darwin = None
  CMAKE_TOOLCHAIN_FILE_aarch64_apple_darwin = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_aarch64-apple-darwin = None
  CMAKE_GENERATOR_aarch64_apple_darwin = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_aarch64-apple-darwin = None
  CMAKE_PREFIX_PATH_aarch64_apple_darwin = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_aarch64-apple-darwin = None
  CMAKE_aarch64_apple_darwin = None
  HOST_CMAKE = None
  CMAKE = None
  running: cd "/Users/fgiordana/Documents/git/russimp/target/debug/build/russimp-sys-830a010e74442d13/out/static/build" && CMAKE_PREFIX_PATH="" "cmake" "/Users/fgiordana/.cargo/registry/src/index.crates.io-6f17d22bba15001f/russimp-sys-2.0.2/assimp" "-DCMAKE_OSX_ARCHITECTURES=arm64" "-DBUILD_SHARED_LIBS=OFF" "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF" "-DASSIMP_BUILD_TESTS=OFF" "-DASSIMP_BUILD_ZLIB=ON" "-DLIBRARY_SUFFIX=" "-DCMAKE_INSTALL_PREFIX=/Users/fgiordana/Documents/git/russimp/target/debug/build/russimp-sys-830a010e74442d13/out/static" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=arm64-apple-darwin -mmacosx-version-min=14.4" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=arm64-apple-darwin -mmacosx-version-min=14.4" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=arm64-apple-darwin -mmacosx-version-min=14.4" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"

  --- stderr
  CMake Warning:
    Ignoring extra path from command line:

     "/Users/fgiordana/.cargo/registry/src/index.crates.io-6f17d22bba15001f/russimp-sys-2.0.2/assimp"

  CMake Error: The source directory "/Users/fgiordana/.cargo/registry/src/index.crates.io-6f17d22bba15001f/russimp-sys-2.0.2/assimp" does not appear to contain CMakeLists.txt.
  Specify --help for usage, or press the help button on the CMake GUI.
  thread 'main' panicked at /Users/fgiordana/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:

  command did not execute successfully, got: exit status: 1

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

After inspecting the crates src folder I realized that the assimp git submodule files were missing.

AlexTMjugador commented 5 months ago

I think this was fixed by https://github.com/jkvargas/russimp-sys/pull/42, but including the source files seems to trigger published crate size limits: https://github.com/jkvargas/russimp-sys/actions/runs/8964061094/job/24615416139

@jkvargas are you on the case to get this submodule down to a smaller size without compromising on the ability to build from source? Please let me know if you'd accept PRs for that!

fgiordana commented 5 months ago

Yes that looks like it "should" fix the issue, but 2.0.2 is still broken, let me know if there is anything that I can do to help fix this

jkvargas commented 4 months ago

Hey guys, I am accepting PRs, yes. But I am out of time to put on russimp right now. =( But will happily merge code you guys provide.

fgiordana commented 4 months ago

I'll see if I can find some time to look into it. Right now laziness has taken over and I'm just linking to my local repo

Calandiel commented 2 months ago

This will be rough, it's 5x larger... I doubt minimizing code size by removing whitespace and such would work here.

Is contacting server owners and asking for a larger upload allowance an option?

jkvargas commented 2 months ago

hi @Calandiel, free is unlikely. I guess we got stuck