Summary: | devel/meson: don't strip rpath | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Piotr Kubaj <pkubaj> | ||||
Component: | Individual Port(s) | Assignee: | freebsd-desktop (Team) <desktop> | ||||
Status: | Closed Overcome By Events | ||||||
Severity: | Affects Only Me | CC: | canardo909, dank, diizzy, gnome, lantw44, lwhsu | ||||
Priority: | --- | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Piotr Kubaj
2019-05-26 01:13:51 UTC
(In reply to Piotr Kubaj from comment #0) "Meson currently strips rpath, which breaks building with GCC from ports on GCC architectures:" I meant breaks, as in cripples. The resulting binaries are linked to libstdc++, so they won't run. (In reply to Piotr Kubaj from comment #0) I added a comment to the linked issue to notify upstream about the use case. (In reply to Ting-Wei Lan from comment #2) So is this patch acceptable? (In reply to Piotr Kubaj from comment #3) I just tested the patch by building pango, and I found it causes the installed executable to have useless RPATHs. For example, the executable 'pango-view' has RPATH '$ORIGIN/../pango', which is useless outside the build directory. (In reply to Ting-Wei Lan from comment #4) Still, this currently seems the only way to link usable binaries when there's a GCC 4.2 installed. Could then this patch be only used when CHOSEN_COMPILER_TYPE == gcc? With this patch, I linked properly libgexiv, which allowed me to run shotwell, so it definitely is useful. (In reply to Piotr Kubaj from comment #5) It still doesn't change the fact that useless RPATHs will be left on installed files, which can potentially cause unexpected issues. If you just want to have a temporary patch which won't be submitted to upstream, I think the easiest fix here is to put the desired value of RPATH from ports to a new environment variable, possibly called FREEBSD_PORTS_RPATH, and use it to construct the final RPATH in meson instead of skipping RPATH changes entirely. https://github.com/mesonbuild/meson/pull/7103 may be a better draft fix. I tested it on FreeBSD and it seems to pass my little test case. Still relevant? Nah, I don't think anyone uses 12 on powerpc* anymore. |