Closed ten3roberts closed 1 year ago
Compiling with:
russimp = { version = "1.0", features = ["static-link"] }
Fails as well
Compiling russimp-sys v1.0.3
Compiling russimp v1.0.6
error: could not find native static library `assimp`, perhaps an -L flag is missing?
error: could not compile `russimp-sys` due to previous error
warning: build failed, waiting for other jobs to finish...
Compiling with the features nozlib
and nolibcxx
does not work either.
The only combinations of options which work are prebuilt
Hi, you will not be able to compile actual russimp with assimp 5.0.1. Actual russimp is built with 5.2.5. You would have to go back to commit ae456356348d49e0e0801f606bbe558a284d661c, and even so I believe there are issues to compile it.
Since your distro does not give you a more recent version of assimp you can use https://github.com/jkvargas/russimp/blob/master/install_assimp.bash to build and install it on your system.
You will need to edit the file and replace apt lines to dnf compatible prerequisites.
Thank you.
Is this the reason that the default features fails to compile as well?
From my understanding static-link
clones and builds from source, so it should not be dependent on system libraries
Digging deeper, it seems that static-link
downloads the source inside ~/.cargo/repo/.../russimp-***
builds it into the target dir at target/debug/build/russimp-***/out/build-from-source/assimp/
and uses CMAKE_INSTALL_PREFIX
to put it in target/debug/build/russimp-***/out/build-from-source/assimp/out/
which makes cmake --build . --target install --config Release
copy the build artefacts into the local target.
It then tries to link to a file inside target/debug/build/russimp-sys-1561b8413c9b1ad5/out/build-from-source/assimp/out/lib
, while the compiled artefact ends up in target/debug/build/russimp-sys-1561b8413c9b1ad5/out/build-from-source/assimp/out/lib64
, with another copy in target/debug/build/russimp-sys-1561b8413c9b1ad5/out/build-from-source/assimp/lib
.
Which is why is fails to link
Hey mate, sorry didn't find time yet to look at your issue. Try take a look at https://github.com/jkvargas/russimp-sys/blob/main/.github/workflows/release.yml on how it is building for linux. Let me know if that helps.
Steps to reproduce:
System Information
Fedora Linux 37 (Workstation Edition)
assimp
version 5.01 rpm (latest)assimp-devel
version 5.01 rpm (latest)Output