-
Notifications
You must be signed in to change notification settings - Fork 473
bundle feature is broken on macOS #1034
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
That is because cargo run adds this: https://github.com/Rust-SDL2/rust-sdl2/blob/master/sdl2-sys/build.rs#L525 Which tells your binary where to find SDL2 if it's needed. When you start your binary without Two solutions:
|
Thanks for speedy response that makes sense. Would you consider a pr that added a feature flag to copy that dylib/.something(I cant remember the linux equivalent) into the final target dir? I see this is already done for windows. |
We already have many features so I'm not too fond of it. Windows does this because it's necessary for the tests/ One thing you could do, is adding documentation about it instead. I have no idea where the best place to document that would be, though, perhaps the readme? |
I think we can use Wiki and add Troubleshooting section there |
I just tried compiling sdl2 statically using the
|
It turns out that the "static-link" feature flag for the `sdl2-sys` crate doesn't link `SDL2_Image` nor `SDL2_TTF`) into it, and the "bundled" feature flag only fetches the main `libsdl2` library at build time and not `SDL2_Image`. Plus, it seems that "bundled" and "static-link" are also broken in other ways, at the time of writing: Rust-SDL2/rust-sdl2#778 Rust-SDL2/rust-sdl2#851 Rust-SDL2/rust-sdl2#858 Rust-SDL2/rust-sdl2#1017 Rust-SDL2/rust-sdl2#1029 Rust-SDL2/rust-sdl2#1034 For the sake of reliability, this commit disables both Cargo feature flags described for the `sdl2` dependency (thereby requiring the user to install external dependencies) and introduces a detailed setup guide in the `README.md` for Windows, macOS, and Linux.
Yes, Cf. MFEK/glif#220, MFEK/glif#127. |
Possibly relates to #1029
The bundled feature gives an error if you attempt to run the produced executable directly instead of using cargo run.
tested with version 0.34.{0,2,3}
The text was updated successfully, but these errors were encountered: