[MacPorts] #27688: py27-numpy @1.5.1 Build ignores archflags

MacPorts noreply at macports.org
Thu Dec 16 11:17:21 PST 2010


#27688: py27-numpy @1.5.1 Build ignores archflags
------------------------------------+---------------------------------------
 Reporter:  corwin.amber@…          |       Owner:  macports-tickets@…                   
     Type:  defect                  |      Status:  new                                  
 Priority:  Normal                  |   Milestone:                                       
Component:  ports                   |     Version:  1.9.2                                
 Keywords:                          |        Port:  py27-scipy                           
------------------------------------+---------------------------------------
 I am building on Intel Mac OS X 10.6.5 with:
 {{{
 build_arch                x86_64
 macosx_deployment_target  10.5
 }}}

 Which causes {{{gcc-4.0}}} to be used as the C compiler. Architecture-
 specific flags are passed to setup.py as {{{CFLAGS}}}, {{{LDFLAGS}}} etc.,
 but numpy.distutils ignores {{{LDFLAGS}}}, which causes link to fail
 immediately due to mach-o mismatch:

 {{{
 :info:build C compiler: /usr/bin/gcc-4.0 -DNDEBUG -g -fwrapv -O3 -Wall
 -Wstrict-prototypes -arch x86_64
 :info:build
 :info:build compile options: '-c'
 :info:build gcc-4.0: _configtest.c
 :info:build /usr/bin/gcc-4.0 _configtest.o -L/opt/local/lib -llapack
 -lptf77blas -lptcblas -latlas -o _co
 nfigtest
 :info:build ld: warning: in _configtest.o, file was built for unsupported
 file format which is not the ar
 chitecture being linked (i386)
 :info:build Undefined symbols:
 :info:build   "_main", referenced from:
 :info:build       start in crt1.10.5.o
 :info:build ld: symbol(s) not found
 }}}

 I didn't try this, but I suspect the problem will also affect users of
 10.6 without {{{macosx_deployment_target}}} trying to compile 32-bit
 libraries (are there any?).

 In my case, I managed to circumvent this issue by adding the following
 line to the Portfile:
 {{{
 build.env-append        ARCHFLAGS="${configure.ld_archflags}"
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/27688>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list