-
Notifications
You must be signed in to change notification settings - Fork 77
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
when cross-compiling it never uses pre-build (static) library and zlib_installed
does not use the correct flags
#132
Comments
fn zlib_installed
does not use the correct flags, and cross-compile never uses pre-build (static) libraryzlib_installed
does not use the correct flags, and cross-compile never uses pre-build (static) library
zlib_installed
does not use the correct flags, and cross-compile never uses pre-build (static) libraryzlib_installed
does not use the correct flags
zlib_installed
does not use the correct flagszlib_installed
does not use the correct flags
I also just noticed, that it also will not mark it static, even when the correct environment variables are set. |
I am too much out of my element here to chime in, but hope that the other maintainers can help figure out which path(s) to take here. Generally I think it would be great to have a failing test that reproduces the particular issue(s) described here, so that a fix is protected from future regressions. |
Anyone else who can provide some pointers? |
Well I'm attempting to cross compile for a target (dragonfly) that comes with zlib by default. The main issue for me (and why I went looking for this issue in the first place) is that the bundled zlib doesn't compile (seemingly because it doesn't pull in stdio.h). So for me, I'd prefer to see the cross compile case default to using the available libz with the option to override. |
Can this issue be closed now that #131 is merged? |
Thanks for the hint! Both seem so closely related that closing this issue pre-emptively seems acceptable. However, I invite those invested to validate the issue is actually fixed, and let us know here to reopen. Thank you. |
Hello there,
I build a custom musl toolchain image with several libraries, to in the end build static Rust binaries.
I just recently found out that this crate doesn't use my pre-build static zlib package.
I noticed that it in the end will never use my pre-build binary, since I'm cross-compiling and the code shows it will always build no matter what. Bypassing this didn't resulted in a working version either, since the
zlib_installed
function does not use all the correct compiler flags.To fix the flags was very easy by converting
to
That solved that issue, and is probably what you want in the end.
I have created a PR for this #131 .
But, the part that it will never run that function on my custom build images, is a bit more difficult i think.
Now, I can move the
zlib_installed
check in front of thebuild unconditionally
check, but that is probably not what you intended.What would be a good way to still have pre-build libraries, and make sure the checks done for the unconditionally builds are being run when really needed?
The text was updated successfully, but these errors were encountered: