Skip to content
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

Copy non-Windows dynamic libs and symlinks to output #1102

Merged
merged 2 commits into from Apr 24, 2021

Conversation

waych
Copy link
Contributor

@waych waych commented Apr 23, 2021

Just like Windows, we should be copying the dynamic library to the
target directory and deps directory. Otherwise, execution may fail,
or, more likely, silently pick up the system libSDL2 and not the
"bundled" one as asked.

This is evident when trying to run tests on a system with the libsdl2
package uninstalled, where all the example tests fail unless they pick
up the system .so.

Just like Windows, we should be copying the dynamic library to the
target directory and deps directory.  Otherwise, execution may fail,
or, more likely, silently pick up the system libSDL2 and not the
"bundled" one as asked.

This is evident when trying to run tests on a system with the libsdl2
package uninstalled, where all the example tests fail unless they pick
up the system .so.
Also copy all files and symlinks in the lib dir, to avoid worrying about
platform specific prefixes/suffixes.
@waych waych changed the title Copy Linux dynamic libs and symlinks to output Copy non-Windows dynamic libs and symlinks to output Apr 23, 2021
@waych
Copy link
Contributor Author

waych commented Apr 23, 2021

This addresses the current break in #1101

@Cobrand
Copy link
Member

Cobrand commented Apr 24, 2021

I find it surprising that we didn't notice this for this long, I was sure it worked fine on day 1. Perhaps there a was a change in build.rs one day that silently broke it on linux/macOS.

Regardless, it looks good, thanks!

@Cobrand Cobrand merged commit 2f7ec3a into Rust-SDL2:master Apr 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants