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

Peter Cock p.j.a.cock at googlemail.com
Sun Mar 16 17:15:06 EDT 2014


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


More information about the Biopython-dev mailing list