[Biopython-dev] Problem on Mac OS X since update Xcode 5.1

Lenna Peterson arklenna at gmail.com
Sun Mar 16 16:53:22 EDT 2014


On Wed, Mar 12, 2014 at 5:59 AM, Peter Cock <p.j.a.cock at googlemail.com>wrote:

> On Wed, Mar 12, 2014 at 9:48 AM, Peter Cock <p.j.a.cock at googlemail.com>
> wrote:
> > Hi all,
> >
> > I installed the Xcode 5.1 update last night on my work Mac, and
> > this seems to have broken the builds on Python 2.6 and 2.7
> > (run via builtbot).
> >
> >
> http://testing.open-bio.org/biopython/builders/OS%20X%20-%20Python%202.6/builds/174/steps/compile/logs/stdio
> > ...
> > running build_ext
> > building 'Bio.cpairwise2' extension
> > creating build/temp.macosx-10.9-intel-2.6
> > creating build/temp.macosx-10.9-intel-2.6/Bio
> > cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common
> > -fno-strict-aliasing -fwrapv -mno-fused-madd -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 -pipe
> >
> -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
> > -c Bio/cpairwise2module.c -o
> > build/temp.macosx-10.9-intel-2.6/Bio/cpairwise2module.o
> > clang: error: unknown argument: '-mno-fused-madd'
> > [-Wunused-command-line-argument-hard-error-in-future]
> > clang: note: this will be a hard error (cannot be downgraded to a
> > warning) in the future
> > error: command 'cc' failed with exit status 1
> >
> >
> http://testing.open-bio.org/biopython/builders/OS%20X%20-%20Python%202.7/builds/170/steps/compile/logs/stdio
> > ...
> > running build_ext
> > building 'Bio.cpairwise2' extension
> > creating build/temp.macosx-10.9-intel-2.7
> > creating build/temp.macosx-10.9-intel-2.7/Bio
> > cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386
> > -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd
> > -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 -pipe
> >
> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
> > -c Bio/cpairwise2module.c -o
> > build/temp.macosx-10.9-intel-2.7/Bio/cpairwise2module.o
> > clang: error: unknown argument: '-mno-fused-madd'
> > [-Wunused-command-line-argument-hard-error-in-future]
> > clang: note: this will be a hard error (cannot be downgraded to a
> > warning) in the future
> > error: command 'cc' failed with exit status 1
> >
> > This looks like a problem where distutils is using a gcc argument
> > which cc (clang) used to ignore but not treats as an error. There
> > will probably be similar reports on other Python projects as well...
> >
> > Peter
>
> 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.


>
> 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...


>
> What are folks' thoughts on this? We want it to remain easy
> to install Biopython from source under Mac OS X.
>
> Peter
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython-dev
>


More information about the Biopython-dev mailing list