csound: make bottle relocatable#75566
csound: make bottle relocatable#75566nwhetsell wants to merge 1 commit intoHomebrew:masterfrom nwhetsell:csound-relocate
Conversation
|
We could make the here. |
Sounds good to me! |
|
Let's wait for CI to finish here and see if the fix works first. |
|
Well, the Big Sur failure is Csound seg faulting on exit: https://github.com/Homebrew/homebrew-core/pull/75566/checks?check_run_id=2389982128#step:7:90 This is almost certainly an upstream issue (and possibly intermittent), but I don’t have a Big Sur machine to test this locally. |
|
Doesn't make the bottles relocatable either, unfortunately. For the Catalina and Mojave bottles that were built: |
|
OK, thanks. How is the |
|
I think the idea is that |
|
Thanks, that was a big help! A lot of Csound’s functionality (opcodes, in Csound terms) are in dylibs that are built as part of Csound. Csound’s opcodes get installed in a subfolder of Csound’s Frameworks folder, but Csound also lets you load opcodes from any folder you wish. Because of this, Csound has a default directory from which it loads opcodes, and the default directory is wherever Csound’s built-in opcodes are installed. Unfortunately, this directory is an absolute path determined at compile-time. In Csound’s CMakeLists.txt, a https://github.com/csound/csound/blob/6.15.0/CMakeLists.txt#L356-L361 This variable eventually gets turned into an absolute path and set as a https://github.com/csound/csound/blob/6.15.0/CMakeLists.txt#L372-L378 And then https://github.com/csound/csound/blob/6.15.0/Top/csmodule.c#L446 Since There doesn’t appear to be a good way to fix this, unfortunately. What I’ve done is edit Csound’s CMakeLists.txt to remove the offending directory (replacing it with |
|
Yes, I'm a little hesitant about making changes like this. For one thing, I suspect I think the correct move here would be to wait for Homebrew/brew#10846 to be implemented, as that should fix complete paths getting baked into binary artefacts. |
I agree. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
brew install --build-from-source <formula>, where<formula>is the name of the formula you're submitting?brew test <formula>, where<formula>is the name of the formula you're submitting?brew audit --strict <formula>(after doingbrew install <formula>)?I think this makes Csound bottles relocatable on macOS.
Because Csound needs the RPATH to be
@loader_path/../Frameworks, this PR does not use therpathhelper method introduced in Homebrew/brew#11187 (which returns@loader_path/../libon macOS). One way to use therpathhelper method here would be to set the RPATH to——but, since the Csound formula requires macOS, this might be more trouble than it’s worth.
Related to #75458.