Help needed to compile Python 2.5.6 from source on OSX 10.8

Joined
Jun 24, 2013
Messages
3
Reaction score
0
Points
1
Hi,
I am trying to compile Python 2.5.6 from source under OSX10.8.

I already have got XCode 4.6.2 with command tools installed.

gcc returns:
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gcc it self is linked as following:
/usr/bin/gcc -> llvm-gcc-4.2

I also installed an alternative gcc4.6.4 through macports, just in case. I have access to that one.

Apart from that, I get errors and lots of problems when trying to compile. Despite running custom prefixes and setting env. variables like CPP, CC, CXX etc; no success so far.

This proves to be tricky. Could you please help me with this?

Thanks.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Is there any particular reason that you're building 2.5.6 from source? If you do need to do this, MacPorts has 2.5.6 available as a port.

Compiling this is going to be tricky as I imagine that Python has quite a few dependencies (both build and runtime). Unless the included instructions or a guide somewhere list these, you're going to have to build this and keep a look out for any and all errors.
 
OP
S
Joined
Jun 24, 2013
Messages
3
Reaction score
0
Points
1
Hi vansmith,
Ah, I have written an extensive and nice answer to your question... Unfortunatelly something went wrong and it did not get posted and I lost my entire message :(

It will not be as nice as it was but here is a summary: I do not like macports, I do not use this-brew, that-brew and virtualenv and things like that. I like to compile my libraries and compile against them etc.

Python 2.6 and Python2.7 compiled fine so far. Just Python2.5 is a pain as the llvm GCC does not like it.

I am after some guidiance and hopfully I can solve this issus.

Thanks.

EDIT: I manage things with wrapper scripts (things like $PYTHONHOME switching and library switching etc.)
 
OP
S
Joined
Jun 24, 2013
Messages
3
Reaction score
0
Points
1
Hello,
So 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. All of my custom applications and libraries are in a designated folder.

I will try that with Python 2.7.x, and I hope that it works. However Python 2.5 is still an issue.

Thanks.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
You're going to need to provide specifics about the errors then if you want help. I suspect that part of the problem is the version of LLVM and GCC bundled with OS X which might be too modern. Have you tried using a version of GCC that is more appropriate for that time period? Note than Python 2.5 was released in the fall of 2006 which is quite old.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top