Opened 14 years ago

Closed 14 years ago

#23430 closed defect (fixed)

py26-scipy fails to build

Reported by: lfarv (Laurent Farvacque) Owned by: skymoo (Adam Mercer)
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc: jmroot (Joshua Root)
Port: py26-scipy

Description

building on MacOSX 10.5.8 Intel
with python26 +universal (i386 ppc)
py26-scipy +no_atlas fails to build because of multiple "-arch" options

building 'rootfind' library
compiling C sources
C compiler: /opt/local/bin/gcc-mp-4.3 -arch i386 -arch ppc -isysroot / -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes

creating build/temp.macosx-10.5-fat-2.6/scipy/optimize/Zeros
compile options: '-I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include -c'
gcc-mp-4.3: scipy/optimize/Zeros/brenth.c
cc1: error: unrecognized command line option "-arch"
cc1: error: unrecognized command line option "-arch"
cc1: error: unrecognized command line option "-arch"
cc1: error: unrecognized command line option "-arch"

Change History (15)

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Cc: jmr@… added
Owner: changed from macports-tickets@… to ram@…
Port: py26-scipy added

Please remember to fill in the Port field and cc the maintainers.

comment:2 Changed 14 years ago by skymoo (Adam Mercer)

This is because your python26 is universal and the MacPorts compilers do not contain the arch patches from Apple, so building universal with these compilers will fail. At the moment the only solution is to rebuild python26 as non-universal.

comment:3 Changed 14 years ago by matteo.soccorsi@…

PPC G4 Mac OS 10.4.11

gfortran-mp-4.3:f77: scipy/lib/lapack/calc_lwork.f
/opt/local/bin/gfortran-mp-4.3 -Wall -Wall -undefined dynamic_lookup -bundle build/temp.macosx-10.4-ppc-2.6/build/src.macosx-10.4-ppc-2.6/scipy/lib/lapack/calc_lworkmodule.o build/temp.macosx-10.4-ppc-2.6/build/src.macosx-10.4-ppc-2.6/fortranobject.o build/temp.macosx-10.4-ppc-2.6/scipy/lib/lapack/calc_lwork.o -L/opt/local/lib -L/opt/local/lib/gcc43/gcc/powerpc-apple-darwin8.11.0/4.3.4 -Lbuild/temp.macosx-10.4-ppc-2.6 -llapack -lf77blas -lcblas -latlas -lgfortran -o build/lib.macosx-10.4-ppc-2.6/scipy/lib/lapack/calc_lwork.so
/usr/bin/ld: Undefined symbols:
___powisf2 referenced from liblapack expected to be defined in libgcc
___powidf2 referenced from liblapack expected to be defined in libgcc
collect2: ld returned 1 exit status
/usr/bin/ld: Undefined symbols:
___powisf2 referenced from liblapack expected to be defined in libgcc
___powidf2 referenced from liblapack expected to be defined in libgcc
collect2: ld returned 1 exit status
error: Command "/opt/local/bin/gfortran-mp-4.3 -Wall -Wall -undefined dynamic_lookup -bundle build/temp.macosx-10.4-ppc-2.6/build/src.macosx-10.4-ppc-2.6/scipy/lib/lapack/calc_lworkmodule.o build/temp.macosx-10.4-ppc-2.6/build/src.macosx-10.4-ppc-2.6/fortranobject.o build/temp.macosx-10.4-ppc-2.6/scipy/lib/lapack/calc_lwork.o -L/opt/local/lib -L/opt/local/lib/gcc43/gcc/powerpc-apple-darwin8.11.0/4.3.4 -Lbuild/temp.macosx-10.4-ppc-2.6 -llapack -lf77blas -lcblas -latlas -lgfortran -o build/lib.macosx-10.4-ppc-2.6/scipy/lib/lapack/calc_lwork.so" failed with exit status 1
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-scipy/work/scipy-0.7.1" && /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 setup.py --no-user-cfg config_fc --fcompiler gnu95 --f77exec /opt/local/bin/gfortran-mp-4.3 --f90exec /opt/local/bin/gfortran-mp-4.3 config --cc /opt/local/bin/gcc-mp-4.3 --include-dirs /opt/local/include --library-dirs /opt/local/lib build " returned error 1
DEBUG: Backtrace: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-scipy/work/scipy-0.7.1" && /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 setup.py --no-user-cfg config_fc --fcompiler gnu95 --f77exec /opt/local/bin/gfortran-mp-4.3 --f90exec /opt/local/bin/gfortran-mp-4.3 config --cc /opt/local/bin/gcc-mp-4.3 --include-dirs /opt/local/include --library-dirs /opt/local/lib build " returned error 1
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 9)
    invoked from within
"$procedure $targetname"
Warning: the following items did not execute (for py26-scipy): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.

comment:4 Changed 14 years ago by skymoo (Adam Mercer)

Just updated to 0.7.2 in r66902, are you still seeing this problem?

comment:5 Changed 14 years ago by andre.david@…

Whatever was touched, tickled (and broke) my gear:

$ sudo port upgrade py26-scipy
--->  Computing dependencies for py26-scipy
--->  Building py26-scipy
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-scipy/work/scipy-0.7.2" && /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 setup.py --no-user-cfg config_fc --fcompiler gnu95 --f77exec /opt/local/bin/gfortran-mp-4.3 --f90exec /opt/local/bin/gfortran-mp-4.3 config --cc /opt/local/bin/gcc-mp-4.3 --include-dirs /opt/local/include --library-dirs /opt/local/lib build " returned error 1
Command output:   adding 'build/src.macosx-10.6-intel-2.6/fortranobject.c' to sources.
  adding 'build/src.macosx-10.6-intel-2.6' to include_dirs.
building extension "scipy.stats.mvn" sources
f2py options: []
  adding 'build/src.macosx-10.6-intel-2.6/fortranobject.c' to sources.
  adding 'build/src.macosx-10.6-intel-2.6' to include_dirs.
  adding 'build/src.macosx-10.6-intel-2.6/scipy/stats/mvn-f2pywrappers.f' to sources.
building extension "scipy.ndimage._nd_image" sources
building data_files sources
build_src: building npy-pkg config files
running build_py
copying scipy/version.py -> build/lib.macosx-10.6-intel-2.6/scipy
copying build/src.macosx-10.6-intel-2.6/scipy/__config__.py -> build/lib.macosx-10.6-intel-2.6/scipy
running build_clib
customize UnixCCompiler
customize UnixCCompiler using build_clib
customize Gnu95FCompiler
Found executable /opt/local/bin/gfortran-mp-4.3
customize Gnu95FCompiler using build_clib
building 'rootfind' library
compiling C sources
C compiler: /opt/local/bin/gcc-mp-4.3 -arch x86_64 -arch i386 -isysroot / -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes

compile options: '-I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include -c'
gcc-mp-4.3: scipy/optimize/Zeros/brentq.c
cc1: error: unrecognized command line option "-arch"
cc1: error: unrecognized command line option "-arch"
cc1: error: unrecognized command line option "-arch"
cc1: error: unrecognized command line option "-arch"
error: Command "/opt/local/bin/gcc-mp-4.3 -arch x86_64 -arch i386 -isysroot / -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include -c scipy/optimize/Zeros/brentq.c -o build/temp.macosx-10.6-intel-2.6/scipy/optimize/Zeros/brentq.o" failed with exit status 1

Error: Unable to upgrade port: 1
Before reporting a bug, first run the command again with the -d flag to get complete output.

comment:6 Changed 14 years ago by skymoo (Adam Mercer)

Is your python26 port built universally?

comment:7 Changed 14 years ago by danmichaelo+macports@…

I can confirm this. py26-scipy fails with the same error messages with python26 +universal (x86_64, i386), but builds fine with "non-universal" python26.

comment:8 Changed 14 years ago by skymoo (Adam Mercer)

Thanks for the confirmation, now I need to work out how to fix this properly... I have a few ideas...

comment:9 Changed 14 years ago by Veence (Vincent)

I have a fix for universal (2-way intel x86_64/i386) build of atlas, py26_numpy and py26_scipy. Interested?

comment:10 Changed 14 years ago by skymoo (Adam Mercer)

Yes, although this discussion should probably be moved to the mailing list.

comment:11 Changed 14 years ago by tamyrvoll@…

When I try to install py26-scipy with +no_atlas I get:

Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-scipy/work/scipy-0.7.2" && /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 setup.py --no-user-cfg config_fc --fcompiler gnu95 --f77exec /opt/local/bin/gfortran-mp-4.3 --f90exec /opt/local/bin/gfortran-mp-4.3 config --cc /opt/local/bin/gcc-mp-4.3 --include-dirs /opt/local/include --library-dirs /opt/local/lib build " returned error 1
Command output: scipy/optimize/minpack/lmdif.f: In function 'lmdif':
scipy/optimize/minpack/lmdif.f:193: warning: 'xnorm' may be used uninitialized in this function
scipy/optimize/minpack/lmdif.f:193: warning: 'temp' may be used uninitialized in this function
gfortran-mp-4.3:f77: scipy/optimize/minpack/lmdif1.f
gfortran-mp-4.3:f77: scipy/optimize/minpack/lmpar.f
gfortran-mp-4.3:f77: scipy/optimize/minpack/lmstr.f
scipy/optimize/minpack/lmstr.f: In function 'lmstr':
scipy/optimize/minpack/lmstr.f:189: warning: 'xnorm' may be used uninitialized in this function
gfortran-mp-4.3:f77: scipy/optimize/minpack/lmstr1.f
gfortran-mp-4.3:f77: scipy/optimize/minpack/qform.f
gfortran-mp-4.3:f77: scipy/optimize/minpack/qrfac.f
gfortran-mp-4.3:f77: scipy/optimize/minpack/qrsolv.f
gfortran-mp-4.3:f77: scipy/optimize/minpack/r1mpyq.f
scipy/optimize/minpack/r1mpyq.f: In function 'r1mpyq':
scipy/optimize/minpack/r1mpyq.f:54: warning: 'sin' may be used uninitialized in this function
scipy/optimize/minpack/r1mpyq.f:54: warning: 'cos' may be used uninitialized in this function
gfortran-mp-4.3:f77: scipy/optimize/minpack/r1updt.f
gfortran-mp-4.3:f77: scipy/optimize/minpack/rwupdt.f
ar: adding 23 object files to build/temp.macosx-10.6-x86_64-2.6/libminpack.a
ranlib:@ build/temp.macosx-10.6-x86_64-2.6/libminpack.a
building 'rootfind' library
compiling C sources
C compiler: /opt/local/bin/gcc-mp-4.3 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64
creating build/temp.macosx-10.6-x86_64-2.6/scipy/optimize/Zeros
compile options: '-I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include -c'
gcc-mp-4.3: scipy/optimize/Zeros/brenth.c
cc1: error: unrecognized command line option "-arch"
cc1: error: unrecognized command line option "-arch"
error: Command "/opt/local/bin/gcc-mp-4.3 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include -c scipy/optimize/Zeros/brenth.c -o build/temp.macosx-10.6-x86_64-2.6/scipy/optimize/Zeros/brenth.o" failed with exit status 1
Error: Status 1 encountered during processing.
Before reporting a bug, first run the command again with the -d flag to get complete output.

My installed python is 2.6.5_1+darwin+no_tkinter

My system is Intel OS X 10.6.3 with XCode 3.2.2, running kernel in 64-bit mode

comment:12 in reply to:  9 Changed 14 years ago by jmroot (Joshua Root)

Replying to vince@…:

I have a fix for universal (2-way intel x86_64/i386) build of atlas, py26_numpy and py26_scipy. Interested?

The ticket covering that for scipy is #19397.

comment:13 Changed 14 years ago by jmroot (Joshua Root)

I put in some code to take advantage of the changes from #24802 in r67841. See if it works now.

comment:14 Changed 14 years ago by Veence (Vincent)

Oops sorry :)

comment:15 Changed 14 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Assuming that the lack of assertions to the contrary means this is fixed.

Note: See TracTickets for help on using tickets.