Opened 10 years ago

Closed 10 years ago

#43819 closed defect (fixed)

lz4 @r116 Bad install_name on liblz4

Reported by: djvasi@… Owned by: mfeiri
Priority: Normal Milestone:
Component: ports Version: 2.3.0
Keywords: Cc:
Port: lz4

Description

Libraries installed by MacPorts should have a full install_name, so that users can link against them. Eg:

$ otool -L /opt/local/lib/liblzma.dylib 
/opt/local/lib/liblzma.dylib:
	/opt/local/lib/liblzma.5.dylib (compatibility version 6.0.0, current version 6.5.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

But liblz4 has no path in its install_name. Note the lack of "/opt/local" on the second line:

$ otool -L /opt/local/lib/liblz4.dylib 
/opt/local/lib/liblz4.dylib:
	liblz4.1.0.0.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

If a user attempts to link against this liblz4, they'll get a "Library not loaded" error from dyld.

Probably either an "-install_name ${prefix}/lib/liblz4.1.dylib" should be added to the Makefile, or a call to install_name_tool could be performed by the Portfile to correct the error.

Change History (2)

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

Cc: mfeiri removed
Owner: changed from macports-tickets@… to mfeiri@…

Thanks for the report. Note that the Cc field requires complete email addresses.

comment:2 Changed 10 years ago by mfeiri

Resolution: fixed
Status: newclosed

Patched by cal in r121530 and now included in upstream.

Note: See TracTickets for help on using tickets.