Opened 9 years ago

Closed 9 years ago

#47942 closed defect (fixed)

xraylib @3.1.0_0: libxrl.dylib is built with flat namespace on Yosemite

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: Tom.Schoonjans@…
Priority: Normal Milestone:
Component: ports Version: 2.3.99
Keywords: haspatch Cc: larryv (Lawrence Velázquez)
Port: xraylib

Description

xraylib's libxrl.dylib is improperly built with the flat namespace instead of the two-level namespace on Yosemite. This can cause problems. The attached patch fixes this, the same way we've been fixing it in other ports. It's a libtool bug that was fixed after Yosemite's release; xraylib's configure script was evidently built with a version of libtool older than that.

Before patch:

$ otool -hv /opt/local/lib/libxrl.dylib
/opt/local/lib/libxrl.dylib:
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64  X86_64        ALL  0x00       DYLIB    14       1624 DYLDLINK NO_REEXPORTED_DYLIBS

After patch:

$ otool -hv /opt/local/lib/libxrl.dylib
/opt/local/lib/libxrl.dylib:
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64  X86_64        ALL  0x00       DYLIB    14       1624   NOUNDEFS DYLDLINK TWOLEVEL NO_REEXPORTED_DYLIBS

May I commit?

Attachments (2)

yosemite-libtool.patch (607 bytes) - added by ryandesign (Ryan Carsten Schmidt) 9 years ago.
xraylib.diff (675 bytes) - added by ryandesign (Ryan Carsten Schmidt) 9 years ago.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: yosemite-libtool.patch added

Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: xraylib.diff added

comment:1 Changed 9 years ago by Tom.Schoonjans@…

Sure go ahead

Exactly what problems could arise on yosemite because of this?

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

Resolution: fixed
Status: newclosed

Committed in r137061. Larry says it can cause runtime crashes. The code was meant to use the flat namespace only on the ancient Mac OS X 10.0, 10.1, and 10.2, but because of the way the OS version check was written, it would also be applied on OS X 10.10 and later. The patch fixes that, and was already accepted by the libtool developers; xraylib just hasn't been repackaged with a fixed version of libtool yet.

Note: See TracTickets for help on using tickets.