0

I spent a full week trying to find out how to fix this problem, but I can't figure out how to do it. I get the following error:

MacBook-Pro-van-Hakim:Modules MvZB$ tar zxf simuPOP-1.0.6-src.tar.gzMacBook-Pro-van-Hakim:Modules MvZB$ cd simuPOP-1.0.6MacBook-Pro-van-Hakim:simuPOP-1.0.6 MvZB$ sudo python3 setup.py installPassword:
fail to import distribute/setuptools, build the program with distutils
running install
running build
running build_py
creating build/lib.macosx-10.6-intel-3.2
copying simuOpt.py -> build/lib.macosx-10.6-intel-3.2
creating build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/__init__.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/utils.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/plotter.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/sampling.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/sandbox.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/simuPOP_std.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/simuPOP_op.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/simuPOP_la.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/simuPOP_laop.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/simuPOP_ba.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/simuPOP_baop.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
copying src/gsl.py -> build/lib.macosx-10.6-intel-3.2/simuPOP
Skipping implicit fixer: buffer
Skipping implicit fixer: idioms
Skipping implicit fixer: set_literal
Skipping implicit fixer: ws_comma
running build_ext
building 'simuPOP._gsl' extension
creating build/temp.macosx-10.6-intel-3.2
creating build/temp.macosx-10.6-intel-3.2/gsl
creating build/temp.macosx-10.6-intel-3.2/gsl/sys
creating build/temp.macosx-10.6-intel-3.2/gsl/complex
creating build/temp.macosx-10.6-intel-3.2/gsl/specfunc
creating build/temp.macosx-10.6-intel-3.2/gsl/cdf
creating build/temp.macosx-10.6-intel-3.2/src
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 -Igsl -Igsl/specfunc -Ibuild -I. -I/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2m -c gsl/error.c -o build/temp.macosx-10.6-intel-3.2/gsl/error.o
unable to execute gcc-4.2: No such file or directory
error: command 'gcc-4.2' failed with exit status 1

When I first saw this error, it apeared no compiler was installed on my Mac. For this, I installed Xcode 4.2 for Snow Leopard, and should now have a gcc compiler. The threads on this forum with similar error reports are highly specific, which makes it very hard for a newb like me to extrapolate a proper solution for my problem from an existing case. I'm using Mac OSX 10.6.8 with python3.2.2 64/32 bit version. Could someone help me out? I'm even downloading Xcode 4.0 and try if this causes the problem, without knowing if this might solve the problem.

Thanks!

EDIT: Xcode 4.0.1. does not solve this problem.

Ned Deily
  • 83,389
  • 16
  • 128
  • 151
FlyingDutch
  • 1,100
  • 2
  • 14
  • 24

1 Answers1

1

The immediate issue you are seeing with Xcode 4.2 is that gcc-4.2 is no longer is supplied by Apple with that release. Installing earlier versions of Xcode, like the standard Xcode 3.2.6 for OS X 10.6 should solve that problem. You can download Xcode 3 after free registration at the Apple Developer website (http://developer.apple.com/resources/). But, even with gcc-4.2 available, I had compile errors when using Python 3.2. Python 2.7 seemed to work better. I know nothing about simuPop but it obviously has a very complex build system. I think you have a better chance of success if you direct your questions to the simuPOP mailing list here.

Ned Deily
  • 83,389
  • 16
  • 128
  • 151
  • Yep, after I loaded my question / problem on this forum, I sent a detailed message to the developer. However, mailing activity on the simuPOP forum is not that high, so I hope to find the solution here. Thanks, I will retry first with Scode 3.2.6, otherwise I need to install 2.7 instead and try if that works. I will get back to you once I have tried the possible solutions you provided. Thanks! – FlyingDutch Dec 17 '11 at 19:39
  • In any case, it is assumed to explicitly let python know where to find the gcc compiler (i.e. add directory path to gcc4.2 using a .pth file) since it doesn't know by default? – FlyingDutch Dec 19 '11 at 11:34
  • .pth files do not affect where Python looks for compilers. Try setting the CC environment variable: `export CC=/usr/bin/gcc ; python ` – Ned Deily Dec 19 '11 at 13:26
  • It worked! Thank you so much. Indeed python 3.2 gave problems with gcc4.2, but as you said not with 2.7. – FlyingDutch Dec 19 '11 at 18:46