Opened 5 years ago

Closed 4 years ago

#31833 closed defect (fixed)

py27-scipy fails to build with -faltivec flag error

Reported by: martinzinkin@… Owned by: skymoo (Adam Mercer)
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc: calsaiwing@…
Port: py27-scipy

Description

py27-scipy fails to build on my Mac with the errors below - apparently complaining about an unsupported -faltivec compiler flag

I am on OS X Lion 10.7.2, Xcode 4.2 (both fully up to date), and I have just run selfupdate and have no outdated ports.

I have tried both gcc44 and gcc variants of py27-scipy with the same results.

this old numpy issue looks similar, but I am afraid I am not sufficiently familiar with macports to make further progress.

:info:build compiling C sources
:info:build C compiler: /opt/local/bin/gcc-mp-4.4 -fno-strict-aliasing -fno-common -dynamic -pipe -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
:info:build 
:info:build compile options: '-DNO_ATLAS_INFO=3 -I/Library/Python/2.7/site-packages/numpy-2.0.0.dev_e2af7b7_20110721-py2.7-macosx-10.7-x86_64.egg/numpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'
:info:build extra options: '-faltivec -I/System/Library/Frameworks/vecLib.framework/Headers'
:info:build gcc-mp-4.4: scipy/integrate/_odepackmodule.c
:info:build cc1: error: unrecognized command line option "-faltivec"
:info:build cc1: error: unrecognized command line option "-faltivec"
:info:build error: Command "/opt/local/bin/gcc-mp-4.4 -fno-strict-aliasing -fno-common -dynamic -pipe -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DNO_ATLAS_INFO=3 -I/Library/Python/2.7/site-packages/numpy-2.0.0.dev_e2af7b7_20110721-py2.7-macosx-10.7-x86_64.egg/numpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c scipy/integrate/_odepackmodule.c -o build/temp.macosx-10.7-x86_64-2.7/scipy/integrate/_odepackmodule.o -faltivec -I/System/Library/Frameworks/vecLib.framework/Headers" failed with exit status 1

Attachments (4)

log.txt (548.0 KB) - added by martinzinkin@… 5 years ago.
Log file
log.2.txt (548.0 KB) - added by martinzinkin@… 5 years ago.
Log file
log.3.txt (548.0 KB) - added by martinzinkin@… 5 years ago.
Log file
main.log (528.6 KB) - added by samaburden@… 5 years ago.

Change History (21)

Changed 5 years ago by martinzinkin@…

Log file

Changed 5 years ago by martinzinkin@…

Log file

Changed 5 years ago by martinzinkin@…

Log file

comment:1 Changed 5 years ago by macsforever2000@…

  • Keywords p27-scipy lion -faltivec removed
  • Owner changed from macports-tickets@… to ram@…
  • Port py27-scipy added; p27-scipy removed

comment:2 Changed 5 years ago by ryandesign (Ryan Schmidt)

AltiVec is of course a feature of PowerPC G4 and G5 processors; it seem silly that anyone is requesting AltiVec features when compiling on Intel processors.

comment:3 follow-up: Changed 5 years ago by skymoo (Adam Mercer)

I notice that in the log message there is reference to a numpy-2.0.0 development snapshot install in /Library/Python, this is clearly interfering with the build. I would advise removing this and trying the build again.

comment:4 in reply to: ↑ 3 Changed 5 years ago by martinzinkin@…

Replying to ram@…:

I notice that in the log message there is reference to a numpy-2.0.0 development snapshot install in /Library/Python, this is clearly interfering with the build. I would advise removing this and trying the build again.

Excellent, that was it. Thanks very much.

comment:5 follow-up: Changed 5 years ago by skymoo (Adam Mercer)

  • Resolution set to invalid
  • Status changed from new to closed

comment:6 in reply to: ↑ 5 ; follow-up: Changed 5 years ago by samaburden@…

  • Resolution invalid deleted
  • Status changed from closed to reopened

Replying to ram@…:

I have the same build error, but I can't find similar reference to old numpy development snapshot as the original post (see attached log file).

I've tried removing py27-numpy (& deps) and reinstalling, but receive the same error. Thoughts?

Changed 5 years ago by samaburden@…

comment:7 follow-ups: Changed 5 years ago by skymoo (Adam Mercer)

Look like it's using stuff from the system numpy:

:info:build building 'scipy.integrate._odepack' extension
:info:build compiling C sources
:info:build C compiler: /opt/local/bin/gcc-mp-4.4 -fno-strict-aliasing -fno-common -dynamic -pipe -O2 -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
:info:build 
:info:build compile options: '-DNO_ATLAS_INFO=3 -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'
:info:build extra options: '-faltivec -I/System/Library/Frameworks/vecLib.framework/Headers'
:info:build gcc-mp-4.4: scipy/integrate/_odepackmodule.c
:info:build cc1: error: unrecognized command line option "-faltivec"
:info:build cc1: error: unrecognized command line option "-faltivec"

I imagine you're getting this error because the system numpy is being used instead of the MacPorts version. Not sure why this is the case though. I'll do a little digging and see if I can find anything...

comment:8 in reply to: ↑ 7 Changed 5 years ago by samaburden@…

Replying to ram@…:

Look like it's using stuff from the system numpy:

I imagine you're getting this error because the system numpy is being used instead of the MacPorts version. Not sure why this is the case though. I'll do a little digging and see if I can find anything...

Gotcha -- is there a way to prevent the system numpy from being found? I haven't added it to my PYTHONPATH . . .

Thanks!

comment:9 in reply to: ↑ 7 Changed 5 years ago by samaburden@…

Replying to ram@…:

Look like it's using stuff from the system numpy:

You were absolutely right -- I hid /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python and py27-scipy installed successfully.

Thanks for the help!

comment:10 follow-up: Changed 5 years ago by skymoo (Adam Mercer)

Great, now got to figure out why it was picking up the system numpy and not the MacPorts version...

comment:11 in reply to: ↑ 10 Changed 5 years ago by samaburden@…

Replying to ram@…:

Great, now got to figure out why it was picking up the system numpy and not the MacPorts version...

In case it's relevant: for some reason, the system's Python libraries show up before MacPorts' Python libraries in sys.path. I originally tried installing numpy & scipy without MacPorts, so maybe I tweaked my path along the way?

comment:12 Changed 5 years ago by calsaiwing@…

  • Cc calsaiwing@… added

Cc Me!

comment:13 in reply to: ↑ description Changed 5 years ago by calsaiwing@…

(probably is expected) still happens with MacPorts 2.0.4.

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

This is only expected if you try and link against the system numpy, if you use the MacPorts version then it will build successfully. If you have modified sys.path then I imagine that will cause the problem.

comment:15 in reply to: ↑ 6 Changed 5 years ago by gwoptics@…

Replying to samaburden@…:

Replying to ram@…:

I have the same build error, but I can't find similar reference to old numpy development snapshot as the original post (see attached log file).

I've tried removing py27-numpy (& deps) and reinstalling, but receive the same error. Thoughts?

Another possibility: a numpy version installed previously via easy_install-2.7 causes a `port install py27-scipy' to fail similarly (for me). After:

  • sudo port install py27-pip
  • sudo pip-2.7 uninstall numpy
  • sudo port install py27-scipy

it worked. Maybe that helps.

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

Is this still a problem?

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

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.