Opened 10 years ago

Closed 10 years ago

#43766 closed defect (fixed)

wcslib: fix library install_name

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: john@…
Priority: Normal Milestone:
Component: ports Version: 2.3.99
Keywords: haspatch Cc:
Port: wcslib

Description

The install_name of libwcs.${version}.dylib is wrong (isn't set at build time):

$ port installed wcslib
The following ports are currently installed:
  wcslib @4.23_0 (active)
$ otool -L /opt/local/lib/libwcs.4.23.dylib
/opt/local/lib/libwcs.4.23.dylib:
	libwcs.4.23.dylib (compatibility version 4.0.0, current version 4.23.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

The port's optional gcc variants try to deal with this problem with this block:

    post-destroot {
        system "install_name_tool -change libwcs.${version}.dylib ${prefix}/lib/libwcs.${version}.dylib ${destroot}${prefix}/lib/libpgsbox.${version}.dylib"
    }

But the better way to deal with this is to set the install_name of libwcs.${version}.dylib at build time.

Attachments (3)

Portfile-wcslib.diff (2.6 KB) - added by john@… 10 years ago.
patch-configure.diff (434 bytes) - added by john@… 10 years ago.
Portfile-wcslib.2.diff (2.6 KB) - added by john@… 10 years ago.

Download all attachments as: .zip

Change History (9)

Changed 10 years ago by john@…

Attachment: Portfile-wcslib.diff added

comment:1 Changed 10 years ago by john@…

The attached should address both this issue and #43765.

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

Thanks. I was hoping there would be a variable that could be accessed from the configure script to get the library directory ($libdir?), to avoid having to reinplace the prefix.

Changed 10 years ago by john@…

Attachment: patch-configure.diff added

Changed 10 years ago by john@…

Attachment: Portfile-wcslib.2.diff added

comment:3 Changed 10 years ago by john@…

That better?

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

Oh, well I looked into it too, and $libdir should be $exec_prefix/lib, which means you shouldn't need to put $prefix in front of it, but the configure script doesn't expand the variable, and $exec_prefix isn't defined in the Makefile. Really, this needs to be reported to the developers for a correct fix.

comment:5 Changed 10 years ago by john@…

Indeed, I discovered similar: I initially used ${libdir} before realising it didn't work and using the reinplace you (reasonably enough) objected to above.

Happy to take this to upstream, but, if my latest fix works for you, can we commit that to ensure we're shipping a working library at least in the short term?

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

Keywords: haspatch added
Resolution: fixed
Status: newclosed

Committed a fix in r120292. I used a fix that didn't need reinplace, and also used $SONAME instead of $SHRLIB. Please do notify upstream of the problem so they can fix it properly.

Note: See TracTickets for help on using tickets.