Self-made port breaks after deactivating and reactivating

alex-rusch at t-online.de alex-rusch at t-online.de
Tue Jan 29 21:26:32 UTC 2019


Hi all,
 
sorry, the Portfile is now attached.
 
Thanks again!
 
 
     
From: Chris Jones <jonesc at hep.phy.cam.ac.uk
<mailto:jonesc at hep.phy.cam.ac.uk> >
Subject: Aw: Self-made port breaks after deactivating and reactivating
Date: 29. Januar 2019 um 17:51:54 MEZ
To: macports-dev at lists.macports.org
<mailto:macports-dev at lists.macports.org>

Hi,

Please post the portfile so we can look at it.

Chris

On 29/01/2019 4:40 pm, alex-rusch at t-online.de
<mailto:alex-rusch at t-online.de> wrote:
Hello fellow MacPorts enthusiasts,
I am new to developing Portfiles and I currently work on my first own port 
(in a local repository). It configures, builds, destroots and installs two 
targets: A dynamic library and an executable, the former being linked to 
the latter.
I can confirm that both are fully working after the port installation.
However, as soon as I deactivate the port and reactivate that same port 
variant, the executable does not work anymore as the library is no longer 
loaded correctly.
Error:
dyld: Library not loaded: @rpath/libtestmp.dylib
Referenced from: /opt/local/bin/bintestmp
Reason: image not found
Abort trap: 6
The library itself still works just fine.
Performing 'otool -L' on the binary reveals that, indeed, the shared 
library is no longer loaded correctly (its correct location is 
/opt/local/lib/libtestmp.dylib):
@rpath/libtestmp.dylib (compatibility version 0.0.0, current version 0.0.0)
Manually relinking the shared library with 'install_name_tool' succeeds and 
fixes the executable.
I tried to fix this issue myself and searched for similar problems but I 
could not find an answer, which is why I am finally writing to this list.
Can you help me with that issue? Am I missing something obvious?
Thanks a lot in advance, any help is much appreciated!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20190129/a5846e91/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Portfile
Type: application/octet-stream
Size: 1809 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20190129/a5846e91/attachment.obj>


More information about the macports-dev mailing list