[Biopython-dev] Problem on Mac OS X since update Xcode 5.1
Lenna Peterson
arklenna at gmail.com
Mon Apr 14 13:32:00 EDT 2014
On Apr 14, 2014 7:36 AM, "Peter Cock" <p.j.a.cock at googlemail.com> wrote:
>
> On Sun, Mar 16, 2014 at 9:15 PM, Peter Cock <p.j.a.cock at googlemail.com>
wrote:
> > On Sun, Mar 16, 2014 at 8:53 PM, Lenna Peterson <arklenna at gmail.com>
wrote:
> >> On Wed, Mar 12, 2014 at 5:59 AM, Peter Cock <p.j.a.cock at googlemail.com>
> >> wrote:
> >>>
> >>> ...
> >>>
> >>> This looks relevant, especially this reply from Paul Kehrer which
> >>> suggests this is entirely Apple's fault for shipping a Python and
> >>> clang compiler which don't get along with the default settings:
> >>>
> >>>
> >>>
http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-psycopg2-installation-failure
> >>>
> >>
> >>> The suggested workaround seems to do the trick,
> >>>
> >>> $ export CFLAGS=-Qunused-arguments
> >>> $ export CPPFLAGS=-Qunused-arguments
> >>>
> >>
> >> I encountered the same problem (clean install of Mavericks, vanilla
Python,
> >> latest XCode from App Store).
> >>
> >> One answer [1] suggests this is not a guaranteed solution but offers a
> >> different flag (which I did not test).
> >>
> >> I chose to edit system python files [2] which is definitely not the
best
> >> option for most users.
> >>
> >> [1]: http://stackoverflow.com/a/22315129
> >> [2]: http://stackoverflow.com/a/22322068
> >>
> >>> Perhaps we can add this hack to our setup.py on Mac OS X...
> >>> it seems harmless under gcc (e.g. my locally compiled version
> >>> of Python 3.3 used gcc rather than clang)?
> >>
> >> Do you mean editing environment variables with `os.environ`? I don't
know
> >> enough about the details of how packages are built to know what will
work
> >> with both compiling from source, easy_install, pip, etc.
> >
> > Yes, I was thinking about editing the environment variables in
> > setup.py via the os module. I agree there are potential risks
> > with 3rd party installers, but adding -Qunused-arguments to
> > any existing CFLAGS (within the scope of the Biopython install)
> > is hopefully low risk...
> >
> >>> Or it could be done via the buildbot setup, or on this buildslave
> >>> directly (e.g. the ~/.bash_profile).
> >>
> >> It's a dilemma, because asking users to edit their .bashrc or
.bash_profile
> >> before installation is annoying and easy to overlook, but modifying
them in
> >> setup.py feels hacky (i.e. how long will this solution work?).
Crossing my
> >> fingers and hoping Apple fixes this in an update...
> >>
> >
> > Fingers crossed Apple pushes another update in the next few
> > weeks to resolve this...
> >
> > Peter
>
> I just retested with XCode 5.1.1 (released last week and updated
> via the App Store), and the problem persists.
>
> $ cc -v
> Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
> Target: x86_64-apple-darwin13.1.0
> Thread model: posix
>
> $ which python-config
> /Library/Frameworks/Python.framework/Versions/Current/bin/python-config
>
> $ python-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
>
> i.e. Apple's current Python still says to use C compliler options which
> Apple's current clang compiler rejects :(
But Python is distributed with the OS, not XCode. I'm still hoping the next
update to Mavericks will fix it.
>
> The good news is the environment variable trick still works.
>
> It appears Apple are not going to fix this, so perhaps we do need
> to add a hack to our setup.py file?
I suppose modifying env variables is easier when it doesn't need to be
cross platform!
>
> Peter
More information about the Biopython-dev
mailing list