[Biopython] upgrade problems on Mac
Peter Cock
p.j.a.cock at googlemail.com
Thu Jul 31 08:26:16 UTC 2014
On Thu, Jul 31, 2014 at 5:44 AM, Mark Budde <markbudde at gmail.com> wrote:
> Hi Joao and Peter.
>
> Joao, I did upgrade to Mavericks.
Given the error below, this may be some subtle effect depending
what the first version of Mac OS X and XCode installed was...
> I'm not sure what my profile and bashrc files are, so I'm not sure
> how I would check them.
These files have a leading dot meaning hidden under Unix/Linux.
On most Linux systems the default shell is bash, and its configuration
is held in ~/.bashrc (meaning in your user home folder). On the Mac,
there isn't normally a ~/.bashrc but instead a ~/.bash_profile file.
$ more ~/.bash_profile
...
This can be used to set command line aliases and alter environment
variables etc.
> I have tried reinstalling xcode, just by running the installer.
> Do I need to uninstall it first if I want the old locations/definitions
> to update?
I don't know.
> Peter,
> I ran the commands you listed and here is the output:
> **************************************
>
> Marks-MacBook-Pro-3:~ markbudde$ xcode-select --print-path
> /Applications/Xcode.app/Contents/Developer
> Marks-MacBook-Pro-3:~ markbudde$ xcode-select --version
> xcode-select version 2333.
> Marks-MacBook-Pro-3:~ markbudde$ which gcc
> /usr/bin/gcc
> Marks-MacBook-Pro-3:~ markbudde$ gcc -v
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
> Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
> Target: x86_64-apple-darwin13.2.0
> Thread model: posix
> Marks-MacBook-Pro-3:~ markbudde$ which clang
> /usr/bin/clang
> Marks-MacBook-Pro-3:~ markbudde$ clang -v
> Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
> Target: x86_64-apple-darwin13.2.0
> Thread model: posix
Those all seem to match what I have :)
> Marks-MacBook-Pro-3:~ markbudde$ cd
> /Users/markbudde/Downloads/biopython-1.64
> Marks-MacBook-Pro-3:biopython-1.64 markbudde$ python setup.py build
> running build
> running build_py
> running build_ext
> building 'Bio.cpairwise2' extension
> Compiling with an SDK that doesn't seem to exist:
> /Developer/SDKs/MacOSX10.5.sdk
> Please check your Xcode installation
> gcc -DNDEBUG -g -O3 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk
> -Qunused-arguments -Qunused-arguments
> -I/Library/Frameworks/Python.framework/Versions/7.3/include/python2.7 -c
> Bio/cpairwise2module.c -o
> build/temp.macosx-10.5-i386-2.7/Bio/cpairwise2module.o
> clang: warning: no such sysroot directory: '/Developer/SDKs/MacOSX10.5.sdk'
> ...
> error: command 'gcc' failed with exit status 1
What does this give you:
$ python-config --cflags
...
What I get, by version of Python from Apple:
$ python2.5-config --cflags
-I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
-I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd
-fno-common -dynamic -DNDEBUG -g -O3
$ python2.6-config --cflags
-I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
-I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
-fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common
-fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall
-Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall
-Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386
$ python2.7-config --cflags
-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g
-Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE
-DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32
-DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE
It somehow seems your Python 2.7 (from Apple?) was
compiled using the relatively old system libraries in the
Mac OS X 10.5 libraries. I have an old Apple provided
Python 2.5 where that was done (see above).
--
It seems from some Google searching that Apple no longer
includes the older SDK with a clean install of Mavericks
and XCode 5. This is what I have under OS X 10.9.4,
which is a machine that has been updated several times
since 10.5 (Leopard):
$ ls /Developer/SDKs/
MacOSX10.4u.sdk MacOSX10.5.sdk MacOSX10.6.sdk
With the more modern ones here - Apple moved things:
$ ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
MacOSX10.8.sdk MacOSX10.9.sdk
(I don't know if I have the 10.7 SDK somewhere else)
There is/was an option to install the older SDK when installing
XCode.
--
To recap: You don't have MacOSX10.5.sdk, but I don't
understand why your Python 2.7 is looking for it anyway.
The other option (which is actually the recommended route
according the NumPy/SciPy folk) is to ignore the Apple provided
Python (don't try to remove it!), and install your own direct from
python.org.
Peter
More information about the Biopython
mailing list