[gdal-dev] Help request to make Python bindings to build again with MacOS X 10.9

William Kyngesburye woklist at kyngchaos.com
Sat Apr 19 14:52:11 PDT 2014


On Apr 19, 2014, at 2:56 PM, Even Rouault <even.rouault at mines-paris.org> wrote:

> Le samedi 19 avril 2014 21:19:53, William Kyngesburye a écrit :
>> It looks like a bit of a coordination and packaging snafu with Apple. 
>> Apple builds Python with some old flags that clang doesn't support, but
>> clang defaulted to NOT reporting the unknown flag as error.  The recent
>> clang 5.1 changed this default to error.
>> 
>> I found a discussion about it on stackoverflow:
>> 
>> http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mn
>> o-fused-madd-python-package-installation-fa
>> 
>> The -Qunused-arguments trick seems to work for some and not others.  There
>> is another method to try (the error actually mentions it): add this to
>> ARCHFLAGS:
>> 
>> -Wno-error=unused-command-line-argument-hard-error-in-future
> 
> I've not access to a Mac myself, only through Travis, which is highly 
> inconvenient for trial and error attempts. Perhaps you or someone with direct 
> access to a system that exhibits the issue can come up with a patch ?
> 

The ARCHFLAGS method worked for me.

Configure looks at ARCHFLAGS from the ENV, and it adds it to all compilation just like CFLAGS.

But python distutils will only see it if set in the ENV, before configure.  If set inline with configure command (ie configure .... ARCHFLAGS=), it doesn't get added to python compilation.

Adding it inline with the make command sets it in the environment so that only python compilation sees it, which may best so that it doesn't hide other unknown flag errors in general compilation that may need to be fixed (ie find alternatives).

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"We are at war with them. Neither in hatred nor revenge and with no particular pleasure I shall kill every ___ I can until the war is over. That is my duty."

"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people of the allied nations devoted an entire year exclusively to hating the ____ it wouldn't kill one ___ nor shorten the war one day."

<Ha, ha> "And it might give 'em all stomach ulcers."

- Tarzan, on war



More information about the gdal-dev mailing list