[MacPorts] #32507: sane-backends-1.0.22 fails to build if archs don't match perl5.12

MacPorts noreply at macports.org
Sun Dec 11 15:33:36 PST 2011


#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


More information about the macports-tickets mailing list