-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Features "jpeg" and "dynamic_linking" cause linking error in 0.14-rc.4 on linux #14117
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
Comments
Thanks a ton for the minimal reproduction: this saves us a ton of time and grief. I'll try and reproduce tomorrow, but I think the odds are high that this doesn't make the 0.14 release. This sort of problem can be quite involved to troubleshoot and dynamic_linking isn't a must-have feature IMO. |
I can't seem to reproduce this locally on MacOS. The
|
I take it this can't be reproduced on 0.13 alone? |
I agree that this is not a high priority issue, I posted it here mostly for other people running into this linking issue to figure out the cause, as it took me a couple of hours. I am using this linker. $ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.38 The only thing in my Building with bevy Building with |
I was able to reproduce it in the repro repo with docker |
I get the same problem on Arch Linux. Interesting to note: the latest version of zune-jpeg (0.5.0-rc1) doesn't have the crate-type anymore. |
the cdylib crate type has been removed from zune-jpeg: etemesi254/zune-image#187 until everything is updated, not much we can do on Bevy side |
This is happening in a GitHub Action for me as well, if I run my tests with dynamic linking enabled to save on build time. Will disable dynamic linking until this is fixed. |
I forked the Cargo.toml # https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section
[patch.crates-io]
zune-jpeg = { git = "https://github.com/ironpeak/zune-image", rev = "eebb01b72c07aaf8b00200d9d87d4cba6f01651f" } |
How was this not fixed by rust-lang/rust#113695? That PR should prevent rustc from attempting to link against cdylib's when a rust dependency is expected. |
I don't see an upstream issue about the cdylib. If this can be reproduced, we should open an issue there, and on the Rust repo itself. |
it should be fixed by etemesi254/zune-image#187, but we're waiting for every dependency to release/update |
If anyone reeealy needs to run bevy 0.15 with this two flags, it is possible to add to cargo.toml:
For me this solved the issue. |
What dependency are we waiting on to release in order to close this? |
As far as I can tell, this should have been fixed as soon as
@ironpeak @TarekAS @Usioumeo are you able to confirm that this is fixed without patching? |
It has been sorted out for me, I tested checking out a commit from 18-07-2024 in my repository and removing the |
Great, thanks! |
Bevy version
0.14.0-rc.4
Relevant system information
Linux host 6.9.3-76060903-generic #202405300957~1718348209~22.04~7817b67 SMP PREEMPT_DYNAMIC Mon J x86_64 x86_64 x86_64 GNU/Linux
rustc 1.79.0 (129f3b996 2024-06-10)
What you did
I've updated to new bevy rc on my project and started getting compilation errors after running a cargo clean once.
I've made a repro repo that is a hello world project, with only bevy as the dependency and it also fails to link.
What went wrong
Linking error on stable is
and on nightly with lld it is
Additional information
A workaround in my case was to get rid of the
jpeg
feature as I don't use it anymore.Thank you for maintaining this amazing engine!
The text was updated successfully, but these errors were encountered: