Opened 9 years ago

Last modified 9 years ago

#49987 closed defect

libcryptopp: Invalid install_name for shared library — at Version 1

Reported by: cawka (Alex Afanasyev) Owned by: raphael@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: libcryptopp

Description (last modified by ryandesign (Ryan Carsten Schmidt))

This error was fixed before update to 5.6.3 and now it back again.

The shared library is compiled with install_path="libcryptopp.dylib" parameter, which causes dependent applications or library to fail with

dyld: Library not loaded: libcryptopp.dylib
  Referenced from: /some/path/app
  Reason: image not found

Until this issue fixed upstream, I suggest a similar patch to browser:trunk/dports/devel/libcryptopp/Portfile@138213 The patch could be simpler: change in GNUMakefile install_path to "$(PREFIX)/lib/$@":

diff --git a/GNUmakefile b/GNUmakefile
index d2f5404..1bef87e 100755
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -388,7 +388,7 @@ libcryptopp.so: public_service | $(LIBOBJS)
        $(CXX) -shared -o $@ $(CXXFLAGS) $(GOLD_OPTION) $(LIBOBJS) $(LDLIBS)

 libcryptopp.dylib: $(LIBOBJS)
-   $(CXX) -dynamiclib -o $@ $(CXXFLAGS) -install_name "$@" -current_version "$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)" -compatibility_version "$(LIB_MAJOR).$(LIB_MINOR)" $(LIBOBJS)
+ $(CXX) -dynamiclib -o $@ $(CXXFLAGS) -install_name "$(PREFIX)/lib/$@" -current_version "$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)" -compatibility_version "$(LIB_MAJOR).$(LIB_MINOR)" $(LIBOBJS)

 cryptest.exe: public_service | libcryptopp.a $(TESTOBJS)
        $(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(GOLD_OPTION) $(LDLIBS)

Change History (1)

comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Owner: changed from macports-tickets@… to raphael@…
Priority: HighNormal
Summary: Invalid install_name for shared librarylibcryptopp: Invalid install_name for shared library
Note: See TracTickets for help on using tickets.