[gdal-dev] GDAL python bindings build error (gcc command replaced by bash)

Kai Muehlbauer kai.muehlbauer at uni-bonn.de
Wed Nov 2 02:48:32 PDT 2016


Hi Even,

Am 01.11.2016 um 16:32 schrieb Even Rouault:
> Le vendredi 01 juillet 2016 13:17:54, Kai Muehlbauer a écrit :
>> Hi James,
>>
>> I did experience the same issue. See
>>
>> https://lists.osgeo.org/pipermail/gdal-dev/2016-July/044678.html
>>
>> Although I did not find the root cause of this, I found that in my use
>> case, copying and unsetting CC and CXX environment variables did the trick.
>>
>> So what I did is:
>>
>> export CF_CC=$CC
>> export CF_CXX=$CXX
>> unset CC CXX
>> ./configure CC=$CF_CC \
>>              CXX=$CF_CXX \
>>              --prefix=$PREFIX
>> make
>>
>> Hoping for more insight by gdal-devs.
> 
> I've just hit that issue too and pushed 
> https://trac.osgeo.org/gdal/changeset/36067 to fix/workaround it.
> By instrumenting Python distutils code, I concluded that this is a bad 
> interaction between the CXX variable of the GDALmake.opt and Python distutils 
> when CXX is made of several "words" (that occurs only when CXX is defined in 
> the environment too, whatever its value ! Which is probably a standard GNU 
> make behaviour)
> 
> James, if you still have a tree with the configuration that hit the issue, 
> could you have a look at the value of the CXX variable in GDALmake.opt ? From 
> the error message, it would seem that there is /bin/bash in it, which is a bit 
> surprising.
> 
> Even
> 

I took the chance to run the two builds I mentioned in my above linked
list-email once again.

GDALmake.opt is identical in both working and breaking version.

Excerpt:

SHELL    =   /bin/sh
LIBTOOL	=	$(SHELL) $(top_builddir)/libtool
LIBTOOL_COMPILE_CC =	$(LIBTOOL) --mode=compile --tag=CC
LIBTOOL_COMPILE_CXX =	$(LIBTOOL) --mode=compile --tag=CXX
CC	=	$(LIBTOOL_COMPILE_CC) gcc
CXX	=	$(LIBTOOL_COMPILE_CXX) g++

The only difference (for working and breaking) after running

$ ./configure --prefix=/usr/local --with-python

is within config.log and config.status.


Cheers,
Kai


More information about the gdal-dev mailing list