-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Let .pc files and LDFLAGS provide rpaths. #7103
Conversation
72fa946
to
0a86393
Compare
test cases/unit/40 external, internal library rpath/built library/meson.build
Show resolved
Hide resolved
0a86393
to
6474a7a
Compare
This pull request introduces 1 alert when merging 6474a7a into efb8608 - view on LGTM.com new alerts:
|
Is this just about pkg-config files, or is it intended to also preserve rpath which is set by e.g. LDFLAGS? The latter is a concern for yocto/buildroot/nixos/guix etc. as discussed in #2567. |
I got into this because I had a buildroot-like system whose .pc files provided rpaths. I imagine that the fix will be more broadly useful than just .pc files, though. |
Sounds great... what do you think about using a slightly less confusing commit message, then? The PR title implies pkg-config files specifically, the commit message says "across prefix boundaries" which simply makes no sense as rpath is completely unrelated to prefix and are often, in fact, subdirectories of libdir. |
I'd feel great about it, but I'd want to add a unit test for the particular use case in mind. Care to suggest one? |
Seems like implementing essentially the same as test_usage_pkgconfig_prefixes, but by setting val1's project to build with env1['LDFLAGS'], might do the trick? |
You mean instead of using the install_rpath argument to shared_library? Actually, I don't need those arguments at all, duh. Removing... I did verify that a previous version of this change (#7075) rescues spack's gtkplus build when dropped in as a replacement for spack's existing kludge var/spack/repos/builtin/packages/meson/rpath-0.54.patch. spack's rpaths are long, one entry per library. Their glib.pc does specify an rpath. I'll try adding a global LDFLAGS test per #2567 (comment) |
6474a7a
to
7b2e7be
Compare
This pull request introduces 1 alert when merging 7b2e7be into efb8608 - view on LGTM.com new alerts:
|
deacf45
to
aacedb3
Compare
aacedb3
to
8eca8dd
Compare
84d7f86
to
41b4e9f
Compare
This pull request introduces 1 alert when merging 41b4e9f into 956cba0 - view on LGTM.com new alerts:
|
41b4e9f
to
6a82aab
Compare
From what I can tell, the The better approach for this is to change the return value of the method to a tuple |
Roger, wilco. I used the out parameter out of sheer laziness in the proof-of-concept. |
Since this is a behavioural change, it should get a release note snippet under |
c3f8137
to
4f88302
Compare
4f88302
to
f8cfb74
Compare
All issues resolved. |
Is there a work-around for older versions of meson? I have project that makes use of external third-party libraries (via dependency() ) that provide a rpath in their .pc pkgconfig files. meson strips these rpaths, when installing my project and thus makes it unusable. |
Why not just bump the minimum meson version? |
I'm targeting a specific distribution version that only has an older version of meson available. I'm reluctant to have to backport and support a newer version of meson. (as this might impact other packages in distribution build). |
If they have an older version of meson and won't upgrade, that's because they have a stable release policy. If so, they won't accept new versions of your software either. So it really doesn't matter if you bump the minimum meson version. People building outside of the distribution repository infrastructure can locally download the latest version of meson e.g. using ...You say the code currently doesn't work at all on older versions of meson. So no one is currently using it on these |
I'm not submitting my software to the stable distribution ,but my software does specifically targeted that stable distribution, and has be able to build on it. (That is the software forms part of overlay for a stable distribution with older version of meson). As there appears to be no work around for this meson bug, I guess I'll have to include a newer version of meson as part of the overlay build collection. |
That's what I had to do.
…On Wed, Jul 8, 2020, 06:57 Nick Brown ***@***.***> wrote:
I'm not submitting my software to the stable distribution ,but my software
does specifically targeted that stable distribution, and has be able to
build on it. (That is the software forms part of overlay for a stable
distribution with older version of meson).
As there appears to be no work around for this meson bug, I guess I'll
have to include a newer version of meson as part of the overlay build
collection.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7103 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABJXYCSGXL355EJHPBMUS3R2R3LNANCNFSM4M4LEV3Q>
.
|
pass | ||
for arg in args: | ||
if arg.startswith('-Wl,-rpath='): | ||
for dir in arg.replace('-Wl,-rpath=','').split(':'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This match pattern is insufficient, I've followed up with a fix in #7472.
Like #7075, but instead of marking the injected rpaths, remembers them.
Fixes #4027
Oh, and what the heck, fix #2567 en passant.