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

Library _file_ names in cpp_info.libs or cpp_info.system_libs do not work #9

Open
ravenexp opened this issue Sep 6, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ravenexp
Copy link
Owner

ravenexp commented Sep 6, 2024

When a Conan dependency package uses a plain library file name such as libfoo.a or libbar.so in its cpp_info.libs or cpp_info.system_libs package attributes, broken GNU linker flags are generated by conan2-based build scripts.

The build script is passing -llibfoo.a or -llibbar.so directly to the cc linker which then results in link failure.
Conan with CMake-based generators can handle linking of such dependency packages correctly.

The rustc link command generator should be able to recognize these use cases and pass static=foo or dylib=bar instead.

Reference: https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib

@ravenexp ravenexp added the bug Something isn't working label Sep 6, 2024
@ravenexp ravenexp self-assigned this Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant