[Python-Dev] Wrong OSX platform in sysconfig.py causing installation problems

Joseph Lee Nunn III josephnunn at gmail.com
Sun May 8 21:49:11 EDT 2016


Thank you for looking into this for me, but since I fixed my problem by simply deleting the old SDKs I’ve moved on.

However let me clarify exactly what was going on one more time, just in case you guys decide to pursue further.

I had the old 10.6 SDK in /Developer/SDKs, it could have been ‘special’ in that I did alot of weird things for a former project and I just don’t recall.

For the sake of explanation though lets say it wasn’t, what then?

I installed OSX Python 3.5.1, created a virtual environment using the pyvenv command from that newly installed Python 3.5.1, and sourced its bin/activate.
Then when running pip install ZODB, the compiler would be passed the -isysroot flag for the 10.6 SDK, which would change its include paths and it would find no includes or libs (if you sym link the includes into the include directory of the virtual env you will get farther and see that the linker does not find libs either).  By suppling adding -v to CFLAGS you can have the compiler output the include paths and compiler call when running pip install.  That is how I noticed the alternate system root supplied by the isysroot flag.  Grepping around found me the _sysconfigdata.py file where that stuff was specified, it took a bit to realize that file came with the distribution and wasn’t generated on my system.

When not in a virtual environment, ZODB would install just fine into the system python (2.7).  

Not sure why that is, or what would make the virtual environment different, but there you go.

Joseph Nunn
josephnunn at gmail.com
joseph.nunn at uci.edu


> On May 07 , 2016, at 11:52 PM, Chris Barker <chris.barker at noaa.gov> wrote:
> 
> On Sat, May 7, 2016 at 10:59 PM, Chris Barker <chris.barker at noaa.gov <mailto:chris.barker at noaa.gov>> wrote:
> 
> .... Trying to decide if I want to go through the hassle of installing an old XCode to see if i can replicate the bug the OP is reporting....
> 
> OK, I found this gitHub repo with all the old SDKs:
> 
> https://github.com/phracker/MacOSX-SDKs <https://github.com/phracker/MacOSX-SDKs>
> 
> I put a copy of the 10.6 SDk in it's old location:
> 
> /Developer/SDKs/MacOSX10.6.sdk/
> 
> /before I did that, I did a pip install of zodb in a virtualenv, and all seemed to go fine. THe extensions rae linked against :
> 
> $ otool -L cPersistence.cpython-35m-darwin.so <http://cpersistence.cpython-35m-darwin.so/> 
> cPersistence.cpython-35m-darwin.so <http://cpersistence.cpython-35m-darwin.so/>:
>     /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
> 
> where that comes from -- who knows?? 
> 
> then I tried again, after putting the sdk in place:
> 
> [note: serious pain the $%^# to get pip to stop using it's cache! ]
> 
> and everything seemed to build fine, and at least one simple test of zodb works fine. And this is how the extensions are linked:
> 
> $  otool -L cPersistence.cpython-35m-darwin.so <http://cpersistence.cpython-35m-darwin.so/>
> cPersistence.cpython-35m-darwin.so <http://cpersistence.cpython-35m-darwin.so/>:
>     /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
> 
> which is the same as above, but the "current version" is much older -- so does that mean it used the 10.6 SDK????
> 
> Anyway, I can't reproduce the OP's bug.....
> 
> -CHB
> 
> 
> 
> -- 
> 
> 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 at noaa.gov <mailto:Chris.Barker at noaa.gov>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20160508/c3193a4d/attachment-0001.html>


More information about the Python-Dev mailing list