Opened 12 years ago
Closed 12 years ago
#37389 closed defect (fixed)
toluapp: Incorrect dylib path
Reported by: | bradc6 (Bradley Clemetson) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | haspatch | Cc: | ryandesign (Ryan Carsten Schmidt) |
Port: | toluapp |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
It seems that when I made the port I didn't set the dylib link path properly. So after you install the toluapp port, your application will be compiled and linked; but once you attempted to load the executable it produces the following error.
BRMP:build brad$ ./stratagus dyld: Library not loaded: @executable_path/../lib/libtoluapp.dylib Referenced from: /Users/brad/dev/strata/engine/build/./stratagus Reason: image not found Trace/BPT trap: 5
From what I read online it is a change I need to make a change in the final link path during the installation of the library. Any suggestions on how I should do that? Thank You
Attachments (1)
Change History (4)
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Description: | modified (diff) |
Keywords: | haspatch added; dylib removed |
Summary: | Incorrect dylib path → toluapp: Incorrect dylib path |
Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | toluapp.diff added |
---|
proposed patch
comment:3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
So, looking at the files that the toluapp port installs:
So the libtoluapp.dylib library will work fine when referenced from the toluapp program, or any other program that is at the same relative directory location from the library. But if it is intended that other non-MacPorts software be able to use this library, then yes, you're right, its install_name should be an absolute path instead, as install_names typically are in MacPorts.
I see this port uses cmake, and I don't understand cmake well. But the relevant portion of the build system seems to be this:
This is part of a bigger block:
So it appears that if you tell cmake to not "USE_RPATH", then it won't do this undesirable relative path thing that it's doing. I've attached a patch to do this, and verified that it works:
Look good to you? If so I can commit it.