1

I have downloaded the source of python 2.5.6 and I would like to compile it either with GCC or CLANG, which ever works. Unfortunately, I am getting errors while compiling with the default flags. I have been reading various articles related to this issue and it seems that it is a bit of a complicated task. Some of those are a bit out-of-date, so I am having a hard time finding a working solution.

I know I can do that using mac-ports, fink etc. But, "No" I would like to compile it from scratch into a custom location. The plan is to do the same for 2.6 and 2.7.

I have recently migrated from a LINUX, to OSX, and on Linux I had all my pythons compiled from source with no issues so far.

Thanks.

mbilyanov
  • 2,315
  • 4
  • 29
  • 49
  • Is this useful? https://groups.google.com/forum/#!msg/bpython/LYakoCsMN-0/uBPCVllrimgJ – karthikr Jun 24 '13 at 14:10
  • I have tried this in the past and found it very hard. I would be interested to see if anyone has a robust solution - I ended up using the EDP free distribution in despair. – Floris Jun 24 '13 at 14:11
  • @karthikr Hi, thanks. But I could not find anything in there that will help me to compile Python 2.5.6 from source on OSX 10.8. Thanks. – mbilyanov Jun 24 '13 at 14:24
  • Can you show the errors you are getting? – Floris Jun 24 '13 at 15:46
  • Hi, I think the problem is that on OSX 10.8, the default gcc is linked to "gcc -> llvm-gcc-4.2" and "g++ -> llvm-g++-4.2". So these might be too modern to compile Python 2.5.6? It is explained here: http://stackoverflow.com/questions/6796982/clang-and-the-default-compiler-in-os-x-lion In the light of this, what would be the solution? Thanks. – mbilyanov Jun 24 '13 at 16:53
  • I installed gcc464 with Mac Ports, just cause I was suspecting that the llvm based gcc that comes with OSX is not able to compile Python 2.5.6. I have set up the following flags:`export CPP='gcc46' export CC='gcc46' export CXX='g++46'` and when I run: `./configure --prefix=/apps/Darwin64/python2.5.6-gcc464 --enable-shared --enable-unicode=ucs4` I get: `Configure: error: C preprocessor "gcc46" fails sanity check` – mbilyanov Jun 24 '13 at 20:06
  • @Floris With the default compiler, I am getting: `Unrecognized command line option "-Wno-long-double"` I mean, there are solutions for that one but even after those are gone, the `make install` would fail badly. – mbilyanov Jun 24 '13 at 20:17
  • Hello? This should not be such a taboo :) I managed to compile Python 2.6.8 on OSX 10.8, against some custom libraries like "Readline" (which I have also compiled) and it works fine – mbilyanov Jun 26 '13 at 13:39

0 Answers0