Trouble building numpy on different version of OSX.
Hi Numpy Folks! When I try to build numpy on MacOSX 10.6 with Xcode 3.2.5 installed (python3.2 setup.py build) things go great! At some point I get this: -------------------- Generating build/src.macosx-10.6-intel-3.2/numpy/core/include/numpy/config.h C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c' gcc-4.2: _configtest.c success! removing: _configtest.c _configtest.o C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -------------------- Keeping everything as nearly as possible the same on MacOSX 10.7 with Xcode 4.6 installed I get this: -------------------- Generating build/src.macosx-10.6-intel-3.2/numpy/core/include/numpy/config.h C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -c' gcc-4.2: _configtest.c _configtest.c:1:20: error: Python.h: No such file or directory _configtest.c:1:20: error: Python.h: No such file or directory lipo: can't figure out the architecture type of: /var/folders/4h/7kcqgdb55yjdtfs6dpwjytjh0000gn/T//ccIEwAT5.out _configtest.c:1:20: error: Python.h: No such file or directory _configtest.c:1:20: error: Python.h: No such file or directory lipo: can't figure out the architecture type of: /var/folders/4h/7kcqgdb55yjdtfs6dpwjytjh0000gn/T//ccIEwAT5.out failure. removing: _configtest.c _configtest.o -------------------- Obviously the -I/Library/Frameworks/etc... is missing. I get the same thing with Xcode 4.6 on 10.8. ;-(. I can *run* my numpy build from 10.6 on 10.7 and 10.8, but I'd really like to be able to build it without having to reboot from an old backup disk. ;-) For what it's worth, on 10.7 and 10.8 (and 10.6 for that matter) python3.2-config works and returns reasonable results. Where does setup.py decide about which paths to include in the compile options string? thanks! -steve
On Thu, Feb 14, 2013 at 1:09 PM, Steve Spicklemire <steve@spvi.com> wrote:
Hi Numpy Folks!
When I try to build numpy on MacOSX 10.6 with Xcode 3.2.5 installed (python3.2 setup.py build) things go great! At some point I get this:
--------------------
Generating build/src.macosx-10.6-intel-3.2/numpy/core/include/numpy/config.h C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk
compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c' gcc-4.2: _configtest.c success! removing: _configtest.c _configtest.o C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk
--------------------
Keeping everything as nearly as possible the same on MacOSX 10.7 with Xcode 4.6 installed I get this:
IIRC, xcode 4.6 does not include Mac OS X 10.6 sdk. Where did you get it ? Unfortunately, I don't think it is actually possible to build many combinations on mac os x without tweaking flags and adapting the -isysroot accordingly.
--------------------
Generating build/src.macosx-10.6-intel-3.2/numpy/core/include/numpy/config.h C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk
compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -c' gcc-4.2: _configtest.c _configtest.c:1:20: error: Python.h: No such file or directory _configtest.c:1:20: error: Python.h: No such file or directory lipo: can't figure out the architecture type of: /var/folders/4h/7kcqgdb55yjdtfs6dpwjytjh0000gn/T//ccIEwAT5.out _configtest.c:1:20: error: Python.h: No such file or directory _configtest.c:1:20: error: Python.h: No such file or directory lipo: can't figure out the architecture type of: /var/folders/4h/7kcqgdb55yjdtfs6dpwjytjh0000gn/T//ccIEwAT5.out failure. removing: _configtest.c _configtest.o
I suspect that you're having a message about invalid SDK paths before that. David
I got Xcode 4,6 from the App Store. I don't think it's the SDK since the python 2.7 version builds fine. It's just the 3.2 version that doesn't have the -I/Library/Frameworks/Python.Framework/Versions/3.2/include/python3.2m in the compile options line. When I run setup for 2.7 I see the right include. I'm just not sure where setup is building those options, and why they're not working on 10.7 and 10.8 and python3.2. Strange! thanks, -steve On Feb 14, 2013, at 7:27 AM, David Cournapeau <cournape@gmail.com> wrote:
On Thu, Feb 14, 2013 at 1:09 PM, Steve Spicklemire <steve@spvi.com> wrote:
Hi Numpy Folks!
When I try to build numpy on MacOSX 10.6 with Xcode 3.2.5 installed (python3.2 setup.py build) things go great! At some point I get this:
--------------------
Generating build/src.macosx-10.6-intel-3.2/numpy/core/include/numpy/config.h C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk
compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c' gcc-4.2: _configtest.c success! removing: _configtest.c _configtest.o C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk
--------------------
Keeping everything as nearly as possible the same on MacOSX 10.7 with Xcode 4.6 installed I get this:
IIRC, xcode 4.6 does not include Mac OS X 10.6 sdk. Where did you get it ?
Unfortunately, I don't think it is actually possible to build many combinations on mac os x without tweaking flags and adapting the -isysroot accordingly.
--------------------
Generating build/src.macosx-10.6-intel-3.2/numpy/core/include/numpy/config.h C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk
compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -c' gcc-4.2: _configtest.c _configtest.c:1:20: error: Python.h: No such file or directory _configtest.c:1:20: error: Python.h: No such file or directory lipo: can't figure out the architecture type of: /var/folders/4h/7kcqgdb55yjdtfs6dpwjytjh0000gn/T//ccIEwAT5.out _configtest.c:1:20: error: Python.h: No such file or directory _configtest.c:1:20: error: Python.h: No such file or directory lipo: can't figure out the architecture type of: /var/folders/4h/7kcqgdb55yjdtfs6dpwjytjh0000gn/T//ccIEwAT5.out failure. removing: _configtest.c _configtest.o
I suspect that you're having a message about invalid SDK paths before that.
David _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
On 14.02.2013, at 3:55PM, Steve Spicklemire <steve@spvi.com> wrote:
I got Xcode 4,6 from the App Store. I don't think it's the SDK since the python 2.7 version builds fine. It's just the 3.2 version that doesn't have the -I/Library/Frameworks/Python.Framework/Versions/3.2/include/python3.2m in the compile options line. When I run setup for 2.7 I see the right include. I'm just not sure where setup is building those options, and why they're not working on 10.7 and 10.8 and python3.2. Strange!
Where did you get the python3.2 from? Building the 1.7.0 release works for me under 10.8 and Xcode 4.6 both with the system-provided /usr/bin/python2.7 and with fink-installed versions of python2.7 and python3.2, but in no case is it linking or including any 10.6 SDK: C compiler: gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes compile options: '-Inumpy/core/include -Ibuild/src.macosx-10.8-x86_64-3.2/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/sw/include/python3.2m -Ibuild/src.macosx-10.8-x86_64-3.2/numpy/core/src/multiarray -Ibuild/src.macosx-10.8-x86_64-3.2/numpy/core/src/umath -c' HTH, Derek
The python3.2 was from python.org, 3.2.3 universal 32/64. thanks, -steve On Feb 14, 2013, at 8:57 AM, Derek Homeier <derek@astro.physik.uni-goettingen.de> wrote:
On 14.02.2013, at 3:55PM, Steve Spicklemire <steve@spvi.com> wrote:
I got Xcode 4,6 from the App Store. I don't think it's the SDK since the python 2.7 version builds fine. It's just the 3.2 version that doesn't have the -I/Library/Frameworks/Python.Framework/Versions/3.2/include/python3.2m in the compile options line. When I run setup for 2.7 I see the right include. I'm just not sure where setup is building those options, and why they're not working on 10.7 and 10.8 and python3.2. Strange!
Where did you get the python3.2 from? Building the 1.7.0 release works for me under 10.8 and Xcode 4.6 both with the system-provided /usr/bin/python2.7 and with fink-installed versions of python2.7 and python3.2, but in no case is it linking or including any 10.6 SDK:
C compiler: gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
compile options: '-Inumpy/core/include -Ibuild/src.macosx-10.8-x86_64-3.2/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/sw/include/python3.2m -Ibuild/src.macosx-10.8-x86_64-3.2/numpy/core/src/multiarray -Ibuild/src.macosx-10.8-x86_64-3.2/numpy/core/src/umath -c'
HTH, Derek
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
On Thu, Feb 14, 2013 at 7:57 AM, Derek Homeier <derek@astro.physik.uni-goettingen.de> wrote:
Where did you get the python3.2 from? Building the 1.7.0 release works for me under 10.8 and Xcode 4.6 both with the system-provided /usr/bin/python2.7
That makes sense, as Apple probably built it with XCode 4.6 in the first place.
and with fink-installed versions of python2.7 and python3.2,
Again, the whole point of fink is to build everything natively. On Thu, Feb 14, 2013 at 8:00 AM, Steve Spicklemire <steve@spvi.com> wrote:
The python3.2 was from python.org, 3.2.3 universal 32/64.
that was built with XCode 3.* -- originally on 10.6 The point of distutils (one of them anyway) is to build extensions with the same compiler, flags, etc as pyton itself -- that means XCode 3, 10.6 SDK in this case. I haven't gone to 10.8 yet -- partly for this reason! I know it's a pain, at best, to build stuff on 10.8 (and XCode4 ) that runs on older systems, but not sure if/how it can be done if you really need to. I'd try the pythonmac list -- soem smart folks there (and the people that maintain the python.org builds) -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov
Ahhh... I didn't realize that important bit. Thanks... I'll try to see if I can use xcode3 on 10.8. thanks, -steve On Feb 14, 2013, at 10:58 AM, Chris Barker - NOAA Federal <chris.barker@noaa.gov> wrote:
On Thu, Feb 14, 2013 at 7:57 AM, Derek Homeier <derek@astro.physik.uni-goettingen.de> wrote:
Where did you get the python3.2 from? Building the 1.7.0 release works for me under 10.8 and Xcode 4.6 both with the system-provided /usr/bin/python2.7
That makes sense, as Apple probably built it with XCode 4.6 in the first place.
and with fink-installed versions of python2.7 and python3.2,
Again, the whole point of fink is to build everything natively.
On Thu, Feb 14, 2013 at 8:00 AM, Steve Spicklemire <steve@spvi.com> wrote:
The python3.2 was from python.org, 3.2.3 universal 32/64.
that was built with XCode 3.* -- originally on 10.6 The point of distutils (one of them anyway) is to build extensions with the same compiler, flags, etc as pyton itself -- that means XCode 3, 10.6 SDK in this case.
I haven't gone to 10.8 yet -- partly for this reason! I know it's a pain, at best, to build stuff on 10.8 (and XCode4 ) that runs on older systems, but not sure if/how it can be done if you really need to.
I'd try the pythonmac list -- soem smart folks there (and the people that maintain the python.org builds)
-Chris
--
Christopher Barker, Ph.D. Oceanographer
Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
OK,,, I happen to have an old: /Developer-3,2,5 directory on my 10.8 system, and I found the "xcode-select' command. I tried sudo xcode-select --switch /Developer-3.2.5 but that had no apparent effect. Next I put a link in /Developer -> /Developer-3.2.5 since that seemed to be the path numpy was trying to use. Aha! I got the right include path now. So there was an SDK effect somehow. I wonder if the 2.7.3 build on python.org used XCode 4 with a newer SDK? Anyway... still no luck though since I was getting complaints about stdarg.h not being found, even though I could see it was there. I noticed that /usr/bin/gcc was really a link to llvm-gcc-4.2 and maybe that was a problem, so I changed my PATH environment variable to have /Developer-3.2.5/usr/bin before /usr/bin and voila! It works. Thanks for the hints! Now just have to remember all this atrocious stuff whenever I need to rebuild it. ;-) thanks, -steve On Feb 14, 2013, at 11:40 AM, Steve Spicklemire <steve@spvi.com> wrote:
Ahhh... I didn't realize that important bit. Thanks... I'll try to see if I can use xcode3 on 10.8.
thanks, -steve
On Feb 14, 2013, at 10:58 AM, Chris Barker - NOAA Federal <chris.barker@noaa.gov> wrote:
On Thu, Feb 14, 2013 at 7:57 AM, Derek Homeier <derek@astro.physik.uni-goettingen.de> wrote:
Where did you get the python3.2 from? Building the 1.7.0 release works for me under 10.8 and Xcode 4.6 both with the system-provided /usr/bin/python2.7
That makes sense, as Apple probably built it with XCode 4.6 in the first place.
and with fink-installed versions of python2.7 and python3.2,
Again, the whole point of fink is to build everything natively.
On Thu, Feb 14, 2013 at 8:00 AM, Steve Spicklemire <steve@spvi.com> wrote:
The python3.2 was from python.org, 3.2.3 universal 32/64.
that was built with XCode 3.* -- originally on 10.6 The point of distutils (one of them anyway) is to build extensions with the same compiler, flags, etc as pyton itself -- that means XCode 3, 10.6 SDK in this case.
I haven't gone to 10.8 yet -- partly for this reason! I know it's a pain, at best, to build stuff on 10.8 (and XCode4 ) that runs on older systems, but not sure if/how it can be done if you really need to.
I'd try the pythonmac list -- soem smart folks there (and the people that maintain the python.org builds)
-Chris
--
Christopher Barker, Ph.D. Oceanographer
Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Steve, Thanks for the report of what worked-- I may well need to do this soon. sudo xcode-select --switch /Developer-3.2.5 but that had no apparent effect. Next I put a link in /Developer -> /Developer-3.2.5 since that seemed to be the path numpy was trying to use. Aha! I got the right include path now. So there was an SDK effect somehow. I wonder if the 2.7.3 build on python.org used XCode 4 with a newer SDK? Anyway... still no luck though since I was getting complaints /usr/bin/gcc was really a link to llvm-gcc-4.2 and maybe that was a problem, so I changed my PATH environment variable to have /Developer-3.2.5/usr/bin before /usr/bin and voila! It works. You'd think that was Xcode-select would be for, but what can you do? Thanks for the hints! Now just have to remember all this atrocious stuff whenever I need to rebuild it. ;-) thanks, -steve On Feb 14, 2013, at 11:40 AM, Steve Spicklemire <steve@spvi.com> wrote: Ahhh... I didn't realize that important bit. Thanks... I'll try to see if I can use xcode3 on 10.8. thanks, -steve On Feb 14, 2013, at 10:58 AM, Chris Barker - NOAA Federal < chris.barker@noaa.gov> wrote: On Thu, Feb 14, 2013 at 7:57 AM, Derek Homeier <derek@astro.physik.uni-goettingen.de> wrote: Where did you get the python3.2 from? Building the 1.7.0 release works for me under 10.8 and Xcode 4.6 both with the system-provided /usr/bin/python2.7 That makes sense, as Apple probably built it with XCode 4.6 in the first place. and with fink-installed versions of python2.7 and python3.2, Again, the whole point of fink is to build everything natively. On Thu, Feb 14, 2013 at 8:00 AM, Steve Spicklemire <steve@spvi.com> wrote: The python3.2 was from python.org, 3.2.3 universal 32/64. that was built with XCode 3.* -- originally on 10.6 The point of distutils (one of them anyway) is to build extensions with the same compiler, flags, etc as pyton itself -- that means XCode 3, 10.6 SDK in this case. I haven't gone to 10.8 yet -- partly for this reason! I know it's a pain, at best, to build stuff on 10.8 (and XCode4 ) that runs on older systems, but not sure if/how it can be done if you really need to. I'd try the pythonmac list -- soem smart folks there (and the people that maintain the python.org builds) -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
participants (4)
-
Chris Barker - NOAA Federal
-
David Cournapeau
-
Derek Homeier
-
Steve Spicklemire