[MacPorts] #42843: dmalloc @5.5.2 +universal: dylibs are not actually universal
#42843: dmalloc @5.5.2 +universal: dylibs are not actually universal ---------------------+-------------------------------- Reporter: egall@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Keywords: | Port: dmalloc ---------------------+-------------------------------- I have the `+universal` variant active: {{{ Local-Admins-MacBook-Pro:~ ericgallager$ port installed dmalloc The following ports are currently installed: dmalloc @5.5.2_0+universal (active) }}} but only some the files that it installs are actually universal: {{{ Local-Admins-MacBook-Pro:~ ericgallager$ port -q contents dmalloc | xargs /usr/bin/file /opt/local/bin/dmalloc: Mach-O universal binary with 2 architectures /opt/local/bin/dmalloc (for architecture x86_64): Mach-O 64-bit executable x86_64 /opt/local/bin/dmalloc (for architecture i386): Mach-O executable i386 /opt/local/include/dmalloc.h: ASCII c program text /opt/local/lib/libdmalloc.a: Mach-O universal binary with 2 architectures /opt/local/lib/libdmalloc.a (for architecture x86_64): current ar archive random library /opt/local/lib/libdmalloc.a (for architecture i386): current ar archive random library /opt/local/lib/libdmalloc.dylib: Mach-O 64-bit dynamically linked shared library x86_64 /opt/local/lib/libdmallocth.a: Mach-O universal binary with 2 architectures /opt/local/lib/libdmallocth.a (for architecture x86_64): current ar archive random library /opt/local/lib/libdmallocth.a (for architecture i386): current ar archive random library /opt/local/lib/libdmallocth.dylib: Mach-O 64-bit dynamically linked shared library x86_64 /opt/local/lib/libdmallocthcxx.a: Mach-O universal binary with 2 architectures /opt/local/lib/libdmallocthcxx.a (for architecture x86_64): current ar archive random library /opt/local/lib/libdmallocthcxx.a (for architecture i386): current ar archive random library /opt/local/lib/libdmallocthcxx.dylib: Mach-O 64-bit dynamically linked shared library x86_64 /opt/local/lib/libdmallocxx.a: Mach-O universal binary with 2 architectures /opt/local/lib/libdmallocxx.a (for architecture x86_64): current ar archive random library /opt/local/lib/libdmallocxx.a (for architecture i386): current ar archive random library /opt/local/lib/libdmallocxx.dylib: Mach-O 64-bit dynamically linked shared library x86_64 }}} double-checking with `lipo -info` shows similar results: {{{ Local-Admins-MacBook-Pro:~ ericgallager$ port -q contents dmalloc | xargs /usr/bin/file | grep "Mach-O" | cut -d: -f1 | cut -d\ -f1 | uniq | xargs lipo -info Architectures in the fat file: /opt/local/bin/dmalloc are: x86_64 i386 Architectures in the fat file: /opt/local/lib/libdmalloc.a are: x86_64 i386 Architectures in the fat file: /opt/local/lib/libdmallocth.a are: x86_64 i386 Architectures in the fat file: /opt/local/lib/libdmallocthcxx.a are: x86_64 i386 Architectures in the fat file: /opt/local/lib/libdmallocxx.a are: x86_64 i386 Non-fat file: /opt/local/lib/libdmalloc.dylib is architecture: x86_64 Non-fat file: /opt/local/lib/libdmallocth.dylib is architecture: x86_64 Non-fat file: /opt/local/lib/libdmallocthcxx.dylib is architecture: x86_64 Non-fat file: /opt/local/lib/libdmallocxx.dylib is architecture: x86_64 }}} This makes it difficult to make other ports with `+universal` variants build properly against dmalloc. -- Ticket URL: <https://trac.macports.org/ticket/42843> MacPorts <http://www.macports.org/> Ports system for OS X
#42843: dmalloc @5.5.2 +universal: dylibs are not actually universal ----------------------+-------------------- Reporter: egall@… | Owner: toby@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: dmalloc | ----------------------+-------------------- Changes (by ryandesign@…): * cc: toby@… (removed) * owner: macports-tickets@… => toby@… Comment: I see that `-arch` flags are used by the build, except when building the dylibs. This is the typical behavior of a configure script that was generated with a version of autoconf too old to know about universal binaries. The normal solution would be to add "`use_autoreconf yes`" to the Portfile. There are two issues preventing this: 1. The port has a patch for the configure script. It looks like this could be easily changed to patch configure.ac instead. 2. `autoreconf` fails. -- Ticket URL: <https://trac.macports.org/ticket/42843#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#42843: dmalloc @5.5.2 +universal: dylibs are not actually universal ----------------------+-------------------- Reporter: egall@… | Owner: toby@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: dmalloc | ----------------------+-------------------- Comment (by egall@…): Replying to [comment:1 ryandesign@…]:
I see that `-arch` flags are used by the build, except when building the dylibs. This is the typical behavior of a configure script that was generated with a version of autoconf too old to know about universal binaries. The normal solution would be to add "`use_autoreconf yes`" to the Portfile. There are two issues preventing this:
1. The port has a patch for the configure script. It looks like this could be easily changed to patch configure.ac instead.
Yup.
2. `autoreconf` fails.
Looking into this now, and the configure.ac file seems to have a lot of custom logic in it that messes with the defaults... sigh... anyways, working on it... -- Ticket URL: <https://trac.macports.org/ticket/42843#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#42843: dmalloc @5.5.2 +universal: dylibs are not actually universal ----------------------+-------------------- Reporter: egall@… | Owner: toby@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: dmalloc | ----------------------+-------------------- Comment (by toby@…): Yeah, I suspect autoreconf is a bit much for this, patching configure directly is probably a lot easier. -- Ticket URL: <https://trac.macports.org/ticket/42843#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#42843: dmalloc @5.5.2 +universal: dylibs are not actually universal ----------------------+-------------------- Reporter: egall@… | Owner: toby@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: dmalloc | ----------------------+-------------------- Comment (by toby@…): r118267 - bumped revision because it changes how the dylibs are linked even if you aren't using +universal -- Ticket URL: <https://trac.macports.org/ticket/42843#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#42843: dmalloc @5.5.2 +universal: dylibs are not actually universal ----------------------+-------------------- Reporter: egall@… | Owner: toby@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: fixed | Keywords: Port: dmalloc | ----------------------+-------------------- Changes (by toby@…): * status: new => closed * resolution: => fixed -- Ticket URL: <https://trac.macports.org/ticket/42843#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts