-
Notifications
You must be signed in to change notification settings - Fork 50
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
build: fix rpath issue #53
Conversation
While packaging for homebrew, I ran into some rpath issue when building the tools. ``` $ /opt/homebrew/Cellar/liblc3/1.1.0/bin/elc3 -h dyld[72986]: Library not loaded: @rpath/liblc3.1.dylib Referenced from: <1B4E9174-0A9C-3907-8487-40BBBE5B52CB> /opt/homebrew/Cellar/liblc3/1.1.0/bin/elc3 Reason: no LC_RPATH's found Abort trap: 6 ``` This patch is for fixing the rpath ref issue. Signed-off-by: Rui Chen <[email protected]>
Including an rpath pointing into the libdir is generally awkward when that is the default platform libdir. It is at best redundant, and at worst messes around with the load order. It overrides LD_LIBRARY_PATH. How does homebrew usually handle rpaths? |
This might help: mesonbuild/meson@78e9009 |
usually we would just adopt the upstream build and dont care about it. I do see for cmake builds, we did specify the rpath as well (which is quite similar in this case) |
Sounds good for me. |
If you don't care about it, then does that mean other meson packages in homebrew don't need this?
You specify the rpath how? Patching out CMakeLists.txt files? |
by "I dont care about it", meaning we adopt the upstream defaults (in this case, it certainly does not apply as it failed the tools build due to the rpath issue)
yeah, patching PATH for cmake builds wrt rpath |
I dont quite comprehend the challenging of merging this PR (and it would certainly helpful for other people to do the meson builds for tools) |
Let's merge it, we can always modify it later. |
thanks @asoulier! appreciate it! |
We usually add the appropriate Not sure if this is due to a recent change in
We set Footnotes |
Okay. In that case I think this is the answer:
Normally the LDFLAGS are respected here. At least, it was tested to work on Linux. ;) The problem is that Darwin took a different codepath... This was reported by Gentoo Prefix -- and also fixed by Gentoo Prefix. So I'm optimistic that the same fix will work for Homebrew as well. Can you try backporting it to the meson formula? |
maybe we can try in the 1.4.1 release? Looks like it would come pretty soon, right? |
will do this afternoon, I need to add a test case (HFP) for LC3 certification. |
While packaging for homebrew, I ran into some rpath issue when building the tools.
This patch is for fixing the rpath ref issue.