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

Reconsider link-libraries #51

Open
tylerjw opened this issue Mar 15, 2024 · 2 comments
Open

Reconsider link-libraries #51

tylerjw opened this issue Mar 15, 2024 · 2 comments
Labels
bug The issue represents a problem with the specification in its current form. help wanted This issue would benefit from community assistance. scheduled The maintainers have flagged this issue as something to be addressed.

Comments

@tylerjw
Copy link

tylerjw commented Mar 15, 2024

Following up from discussion in slack. We agree that supporting link search paths and short names, ie -L/usr/lib -lfoo is more error prone than just supporting linking full paths, ie -l/usr/lib/libfoo.so. As a result we should probably drop the attribute link-libraries from the spec.

@mwoehlke mwoehlke added scheduled The maintainers have flagged this issue as something to be addressed. bug The issue represents a problem with the specification in its current form. help wanted This issue would benefit from community assistance. labels Mar 27, 2024
@mwoehlke
Copy link
Member

Revisiting this... what's the alternative? If my application currently links to /usr/lib64/libm.so, and nothing provides a CPS file (or, indeed, any way to import that as a component/target), how do I express that dependency to consumers? (Note that /usr/lib64/libm.so is still a link_libraries thing.)

@mwoehlke
Copy link
Member

On the one hand, it would be good if we could avoid those entirely (i.e. what we said in Slack). On the other, at least in CMake-land, I'm pretty sure INTERFACE_LINK_LIBRARIES sometimes has not-targets in it (in existing projects), and exporting those in some fashion is likely required for consumers to get something functional. That said, we can probably push for only supporting full paths.

Another point is that CMake at least has INTERFACE_LINK_DIRECTORIES separate from INTERFACE_LINK_OPTIONS. I feel like we ought to either support that explicitly in CPS as well, or else explicitly forbid its use from the CMake end if exporting to CPS. (My preference would be the latter, since we can relax that restriction in the future, but the other way around is far more problematic. We could similarly forbid non-absolute INTERFACE_LINK_LIBRARIES.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue represents a problem with the specification in its current form. help wanted This issue would benefit from community assistance. scheduled The maintainers have flagged this issue as something to be addressed.
Projects
None yet
Development

No branches or pull requests

2 participants