[MacPorts] #32507: sane-backends-1.0.22 fails to build if archs don't match perl5.12
#32507: sane-backends-1.0.22 fails to build if archs don't match perl5.12 -----------------------------------+---------------------------------------- Reporter: jeremyhu@… | Owner: aguynamedryan+sane@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: sane-backends -----------------------------------+---------------------------------------- If perl5.12 is built +universal, then sane-backends will fail to build unless it is also built universal. This is because sane-backends queries perl to figure out what LDFLAGS to use. These LDFLAGS will include '-arch i386 -arch x86_64' even though sane-backends is only being built for x86_64. This build failure will look like this to the user because libusb will not be universal: {{{ checking usb.h presence... yes checking for usb.h... yes checking for usb_interrupt_read in -lusb... no configure: error: USB support requested but required libraries not found. shell command " cd "/opt/local/var/macports/build /_Users_jeremy_src_macports_trunk_dports_graphics_sane-backends/sane- backends/work/sane-backends-1.0.22" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man --with-docdir=/opt/local/share/doc/sane- backends --enable-local-backends --enable-libusb --disable-latex --without-gphoto2 " returned error 1 Error: Target org.macports.configure returned: configure failure: shell command failed (see log for details) Warning: the following items did not execute (for sane-backends): org.macports.install org.macports.configure org.macports.build org.macports.destroot Log for sane-backends is at: /opt/local/var/macports/logs /_Users_jeremy_src_macports_trunk_dports_graphics_sane-backends/sane- backends/main.log Error: Unable to upgrade port: 1 To report a bug, see <http://guide.macports.org/#project.tickets> }}} config.log shows the real cause: {{{ configure:9640: checking for usb_interrupt_read in -lusb configure:9665: /Developer/usr/bin/clang -o conftest -pipe -O2 -arch x86_64 -W -Wall -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -pipe -O2 -Udarwin11 -Ddarwin11=darwin11 -pipe -O2 -arch i386 -fno-common -DPERL_DARWIN -I/opt/local/include -no-cpp-precomp -fno-strict-aliasing -fstack-protector -I/opt/local/include -I/opt/local/lib/perl5/5.12.3 /darwin-multi-2level/CORE -I/opt/local/include -I/opt/local/include -I. -I/opt/local/include -I/opt/local/include -no-cpp-precomp -fno-common -include sys/types.h -D_REENTRANT -L/opt/local/lib -arch x86_64 conftest.c -lusb -Wl,-framework,CoreFoundation -Wl,-framework,IOKit -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -lnetsnmp -lcrypto >&5 clang: warning: argument unused during compilation: '-no-cpp-precomp' clang: warning: argument unused during compilation: '-no-cpp-precomp' ld: warning: ignoring file /opt/local/lib/libusb.dylib, file was built for unsupported file format which is not the architecture being linked (i386) Undefined symbols for architecture i386: "_usb_interrupt_read", referenced from: _main in cc-BlaEF1.o }}} -- Ticket URL: <https://trac.macports.org/ticket/32507> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32507: net-snmp-config should not include -arch flags -----------------------------------+---------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: net-snmp -----------------------------------+---------------------------------------- Changes (by jeremyhu@…): * owner: aguynamedryan+sane@… => ryandesign@… * port: sane-backends => net-snmp Comment: It's coming from net-snmp-config: {{{ $ net-snmp-config --cflags -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -pipe -O2 -Udarwin11 -Ddarwin11=darwin11 -pipe -O2 -arch i386 -fno-common -DPERL_DARWIN -I/opt/local/include -no-cpp-precomp -fno-strict-aliasing -fstack- protector -I/opt/local/include -I/opt/local/lib/perl5/5.12.3/darwin-multi- 2level/CORE -I/opt/local/include -I/opt/local/include -I. -I/opt/local/include }}} -- Ticket URL: <https://trac.macports.org/ticket/32507#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32507: net-snmp-config should not include -arch flags -----------------------------------+---------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: net-snmp -----------------------------------+---------------------------------------- Comment(by jeremyhu@…): Interestingly, net-snmp is a fat binary: {{{ $ file /opt/local/lib/libnetsnmp.dylib /opt/local/lib/libnetsnmp.dylib: Mach-O universal binary with 2 architectures /opt/local/lib/libnetsnmp.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 /opt/local/lib/libnetsnmp.dylib (for architecture i386): Mach-O dynamically linked shared library i386 }}} but it was not installed fat: net-snmp-5.7.1_0.darwin_11.x86_64.tbz2 This explains why just the -arch x86_64 was stripped from net-snmp-config with this hunk in the Portfile: {{{ reinplace "s|${my_archflags}||g" ${worksrcpath}/${name}-config }}} So the problem is that net-snmp is actually building fat even though it's not requested to. I believe this is because perl5.12 is actually fat, and net-snmp is using perl5's CFLAGS -- Ticket URL: <https://trac.macports.org/ticket/32507#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32507: net-snmp-config should not include -arch flags -----------------------------------+---------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: net-snmp -----------------------------------+---------------------------------------- Comment(by jeremyhu@…): It looks like ${prefix}/bin/net-snmp-create-v3-user may also need similar cleanup: {{{ net-snmp-create-v3-user:NSC_LDFLAGS="-L/opt/local/lib -L/opt/local/lib -arch x86_64 -arch i386" }}} -- Ticket URL: <https://trac.macports.org/ticket/32507#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32507: net-snmp-config should not include -arch flags -----------------------------------+---------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: net-snmp -----------------------------------+---------------------------------------- Comment(by ryandesign@…): Replying to [comment:2 jeremyhu@…]:
So the problem is that net-snmp is actually building fat even though it's not requested to. I believe this is because perl5.12 is actually fat, and net-snmp is using perl5's CFLAGS
Then this is #24779. I wish somebody would resolve it. -- Ticket URL: <https://trac.macports.org/ticket/32507#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32507: net-snmp-config should not include -arch flags -----------------------------------+---------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: net-snmp -----------------------------------+---------------------------------------- Comment(by jeremyhu@…): Ugg. I can't believe that bug is so old. It's an obvious fix too... -- Ticket URL: <https://trac.macports.org/ticket/32507#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32507: net-snmp-config should not include -arch flags ------------------------------------+--------------------------------------- Reporter: jeremyhu@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: fixed | Keywords: Port: net-snmp | ------------------------------------+--------------------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => fixed Comment: Replying to [comment:3 jeremyhu@…]:
It looks like ${prefix}/bin/net-snmp-create-v3-user may also need similar cleanup:
r87908. -- Ticket URL: <https://trac.macports.org/ticket/32507#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts