Replies: 4 comments 9 replies
-
May be related to #6541 TL;DRAs there is no equivalent to Solution is two-fold:
longer-versionI was able to gather more details surrouding this issue, at least a potential workaround... What I notice is that as soon as I use Here's
And here's when using
Dirty fix being, if I also declare a LDFLAGS variable my rpath do appear in both depth 1 and depth 2, and therefore path gets properly identified on destination host. Still, the unrelated rpath from from build is still there. Here's what it looks like with LDFLAGS set:
|
Beta Was this translation helpful? Give feedback.
-
Adding a few more comments as I've been doing more testing to try to identify permutations... Here's the comments I've added to my build code:
|
Beta Was this translation helpful? Give feedback.
-
I don't have any idea what you are trying to ask. Here are some things that stand out to me:
Now, to back up a step: If you add LDFLAGS containing a linker flag Authors of a meson.build can set per-target rpaths based on their own install layout, usually related to how internal plugins work. Those will be preserved as well. At build time, some additional rpaths are added in order to smooth over the needs of build-time usage and testsuite invocation, which you should not be depending on at all -- it is not useful once you installed the project to have rpaths such as Now:
|
Beta Was this translation helpful? Give feedback.
-
Thnx @eli-schwartz for your answer, much appreciated. I'll try to provide additional context: Synology provides a toolchain package for each supported DSM Linux versions (refered as DSM6 and DSM7) for each supported archs (armv5, armv7, armv8, ppc, i686 and x86_64). We use a x86_64 container build environement and cross-compile to said host arch by pointing to related gcc+binutils+glibc+sysroot as provided by the toolchain packages. Framework support autotools, cmake and meson. By default it populates the environment with all mandatory autotools To be clear, issue I found is when having multiple single rpath case (the good)My regular use-case only has a single
Whereas:
I can either:
In all cases it simply works, no issue to be found. multiple rpath case (the bad)When I end-up having multiple rpath defined part of the LDFLAGS such as:
I expect my end-state rpath to be such as (using
But when only using either only
While investigating where this is coming from I noticed that I could remove all rpath definition from my meson cross-file as in reality this seems to somehow to be getting included when I recall another tool called
Don't get me wrong, I have no clue what depth 1 or 2 are for, neither wetter it's part of the specifications. I just hapened. A workaround that was to:
This switched things such as using readelf:
And using libtree:
With that I do have my multiple rpath properly set, and it works when used on my target NAS installation environment. Although I still have a wrong rpath also defined for unknown reason. Other insights (not really the ugly but keeping the moving theme)
And lastly here's an example of my autogenerated meson cross-file: To conlude, I do have a workaround that "works" even though resulting libraries contains an invalid rpath part of it rpath list. I presume my issue is an oversight from my part, but any guidance would be welcomed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm one of the developper for the spksrc SynoCommunity framework which allows compiling and packaging opensource software that can then be installed on Synology NAS. I've been struggling with a specific case with meson with regards to proper handling of rpath/rpath-link that I use in different other ways.
Associated PR SynoCommunity/spksrc#6454
My classic use-case is such as having something such as the following containing multiple
--rpath
and--rpath-link
:I'm generating package specific meson cross-file when needed whereas I tried converting my LDFLAGS such as using
c_link_args
array, also tried usinginstall_rpath
andbuild_rpath
string list but I do not get the expected result. Example:or
Generated binaries, not using meson (such as automake or our generated cmake cross-file) will return something such as the following where rpath depth 1 is matching expected host installation directories (using
libtree -vvv -p
to get info):Below is the behavior obtained with my meson cross-file:
End result being inability to load needed .so once installed on host.
Help would be really much appreciated, thnx in advance.
Beta Was this translation helpful? Give feedback.
All reactions