New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #23430 (closed defect: fixed)

Opened 2 years ago

Last modified 21 months ago

py26-scipy fails to build

Reported by: laurent.farvacque@… Owned by: ram@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc: jmr@…
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

  Changed 2 years ago by jmr@…

  • owner changed from macports-tickets@… to ram@…
  • cc jmr@… added
  • port set to py26-scipy

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

  Changed 2 years ago by ram@…

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.

  Changed 2 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.

  Changed 22 months ago by ram@…

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

  Changed 22 months 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.

  Changed 22 months ago by ram@…

Is your python26 port built universally?

  Changed 21 months 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.

  Changed 21 months ago by ram@…

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

follow-up: ↓ 12   Changed 21 months ago by vince@…

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

  Changed 21 months ago by ram@…

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

  Changed 21 months 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

in reply to: ↑ 9   Changed 21 months ago by jmr@…

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.

  Changed 21 months ago by jmr@…

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

  Changed 21 months ago by vince@…

Oops sorry :)

  Changed 21 months ago by jmr@…

  • status changed from new to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.