igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] python-igraph OSX Lion install errors


From: Bedartha Goswami
Subject: Re: [igraph] python-igraph OSX Lion install errors
Date: Fri, 04 Nov 2011 14:55:13 +0100

Hi Tamas, I tried adding the "-arch i386" parts to the export CC commands but I still get: /usr/local/lib/libigraph.0.dylib: Mach-O 64-bit dynamically linked shared library x86_64 So I went to python.org and downloaded the 2.7.2 version (32/64 bit):
Bedarthas-MacBook-Air:python-igraph-0.5.4 bedartha$ python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin and repeated the commands. But the error remains the same - only that the "gcc-4.0" phrase is replaced with "gcc-4.2": gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I/usr/local/include -I/usr/local/include -I/usr/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/arpackobject.c -o build/temp.macosx-10.6-intel-2.7/src/arpackobject.o
unable to execute gcc-4.2: No such file or directory
error: command 'gcc-4.2' failed with exit status 1 I checked that I have no other version of gcc other than llvm-gcc-4.2 and i686-apple-darwin11-llvm-gcc-4.2 (located in /usr/llvm-gcc-4.2/bin/) - the rest are all aliases. (There are no aliases called "gcc-4.2" or "gcc-4.0". I tried creating an alias for "gcc-4.0" which could not fool the build program.) So effectively I tried:
export CC="llvm-gcc-4.2 -arch i386"
export CXX="llvm-g++-4.2 -arch i386"
export FFLAGS=-ff2c
export MACOSX_DEPLOYMENT_TARGET=10.7
as well as:
export CC="gcc-4.2 -arch i386"
export CXX="g++-4.2 -arch i386"
export FFLAGS=-ff2c
export MACOSX_DEPLOYMENT_TARGET=10.7
after i installed the new python 2.7 - but its not working.
(attached is the text from the shell). I am sorry that this is dragging out like this, and I really appreciate your prompt replies and interest. Thanking you once more,
Regards,
Bedartha


Tamas Nepusz writes:
Hi,
I am using the Python distribution from python.org because earlier, while installing scipy and mat plotlib, it turned out that the Mac OS pythons are not preferable.
Yes, you're right, as far as I know the installers for SciPy and Matplotlib
are created for the Python distribution from python.org. I'm using the
system Python on my Mac and I'm testing the Python interface with that so I
have little experience with Python from python.org. Anyway, we'll try to
figure this out.
The way I see it, the problem is that Python from python.org is built with
the 32-bit version of gcc-4.0. When building a C extension module, Python
will try to use the same compiler version and options that Python itself was
built with. Since Mac OS X Lion does not include gcc-4.0 any more, the
default install script fails for igraph. *Sometimes* you can get around this
by tricking Python into using llvm-gcc-4.2 (this is the "export CC="
trickery that you did). Sometimes it does not work. The error message you
see implies that it does not work in your case.
First, I'd try "export CC=gcc-4.2; export CXX=g++-4.2". These are the
"non-LLVM" versions of gcc and they are hopefully more compatible with
python.org's Python than llvm-gcc. So, try building the Python interface
after "export CC=gcc-4.2; export CXX=g++-4.2". If it fails, try going back
to python.org and download a combined 64-bit/32-bit Python installer ("Mac
OS X 64-bit/32-bit x86-64/i386 Installer (2.7.2) for Mac OS X 10.6 and
10.7"). Chances are that this version was compiled with a newer gcc, most
likely gcc-4.2, so it would probabily solve your problem. However, before
doing this, you have to make sure that you have compiled the C core of
igraph for the i386 architecture! The easiest way to check this is as follows: $ file /usr/local/lib/libigraph.0.dylib
If it says "i386" somewhere in the output, then you are okay. If it says
"x86_64", then your igraph library is currently compiled for 64-bit
architectures, so you have to go back to compiling the C core as follows:
export CC="gcc-4.2 -arch i386"
export CXX="g++-4.2 -arch i386"
./configure
make
make install Hope this helps.
Cheers,
Tamas
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help

Attachment: install-python-igraph-ext-OSXLion_4
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]