-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross compiling with static linking fails on first compile due to Cmake configuration errors #290
Comments
Is it safe to add these config options when not cross compiling? |
So I forked the repo and added the above config options to the build.rs file and it works fine when building in the repo but the configuration options seem to have no affect when I patch my project with my fork for hdf5-src, do you know what may be going on? |
@Isaac-Leonard Does it work if you use the fork ( |
FYI: I'm following this issue but won't be contributing much to the discussion due to my very limited HDF5 knowledge. |
I couldn't get it to work unfortunately though I think due to dependency conflicts rather then because of the code. |
Steps to reproduce
Relevant part (whole output in the bottom of the issue)
Simply invoking the same build command again completes the compilation and produces a statically linked binary
ldd target/x86_64-unknown-linux-musl/debug/examples/simple # statically linked
Proposed solution
Let user define the missing defines that generate the errors.
Simply adding the following to https://github.com/aldanor/hdf5-rust/blob/master/hdf5-src/build.rs allows the build to continue with no errors on first try (while running
cargo clean
prior):Full compiler failure output
The text was updated successfully, but these errors were encountered: