[gdal-dev] GDAL python bindings build error (gcc command replaced by bash)
Kai Muehlbauer
kai.muehlbauer at uni-bonn.de
Wed Nov 2 04:19:23 PDT 2016
Am 02.11.2016 um 11:00 schrieb Even Rouault:
> Le mercredi 02 novembre 2016 10:48:32, Kai Muehlbauer a écrit :
>> 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.
>
> Yes that depends if CXX is defined or not as environmenet variable.
>
>>
>> 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.
>
> ok, this is a libtool build, so CXX will expand to "/bin/sh libtool --
> mode=compile --tag=CXX g++".
Even,
I applied your workaround to setup.py, but some calls differ (eg.
-pthread is missing). I'll attach gdal-working.txt (no CC, CXX set in
env), gdal-breaking.txt (CC, CXX set in env) and gdal-workaround.txt
(CC, CXX set in env, with applied workaround) which contain the python
build logs.
Is the missing -pthread problematic?
- Kai
-------------- next part --------------
make[2]: Entering directory '/home/kai/conda/gdal-1-test/gdal-2.1.0/swig/python'
rm -f setup_vars.ini
echo 'GNM_ENABLED=no' >> setup_vars.ini
python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying gdal.py -> build/lib.linux-x86_64-2.7
copying ogr.py -> build/lib.linux-x86_64-2.7
copying osr.py -> build/lib.linux-x86_64-2.7
copying gdalconst.py -> build/lib.linux-x86_64-2.7
copying gdalnumeric.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdalconst.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/__init__.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gnm.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/osr.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdal_array.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdal.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/ogr.py -> build/lib.linux-x86_64-2.7/osgeo
running build_ext
building 'osgeo._gdal' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/extensions
gcc -pthread -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/local/kai/conda/gdal-1-test/gdal-2.1.0/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o
In file included from /usr/include/python2.7/Python.h:133:0,
from extensions/gdal_wrap.cpp:155:
extensions/gdal_wrap.cpp: In function ‘PyObject* _wrap_MajorObject_SetMetadata__SWIG_0(PyObject*, PyObject*)’:
/usr/include/python2.7/abstract.h:1354:62: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
#define PyMapping_Items(O) PyObject_CallMethod(O,"items",NULL)
^
extensions/gdal_wrap.cpp:9115:31: note: in expansion of macro ‘PyMapping_Items’
PyObject *item_list = PyMapping_Items( obj1 );
^
g++ -pthread -shared build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o -L../../.libs -L../../ -L/usr/lib64 -L/local/kai/conda/gdal-1-test/gdal-2.1.0/lib -lpython2.7 -lgdal -o build/lib.linux-x86_64-2.7/osgeo/_gdal.so
building 'osgeo._gdalconst' extension
gcc -pthread -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/local/kai/conda/gdal-1-test/gdal-2.1.0/include -c extensions/gdalconst_wrap.c -o build/temp.linux-x86_64-2.7/extensions/gdalconst_wrap.o
gcc -pthread -shared build/temp.linux-x86_64-2.7/extensions/gdalconst_wrap.o -L../../.libs -L../../ -L/usr/lib64 -L/local/kai/conda/gdal-1-test/gdal-2.1.0/lib -lpython2.7 -lgdal -o build/lib.linux-x86_64-2.7/osgeo/_gdalconst.so
building 'osgeo._osr' extension
gcc -pthread -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/local/kai/conda/gdal-1-test/gdal-2.1.0/include -c extensions/osr_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/osr_wrap.o
extensions/osr_wrap.cpp:3224:14: warning: ‘char* GDALPythonObjectToCStr(PyObject*, int*)’ defined but not used [-Wunused-function]
static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
^
extensions/osr_wrap.cpp:3254:13: warning: ‘void GDALPythonFreeCStr(void*, int)’ defined but not used [-Wunused-function]
static void GDALPythonFreeCStr(void* ptr, int bToFree)
^
g++ -pthread -shared build/temp.linux-x86_64-2.7/extensions/osr_wrap.o -L../../.libs -L../../ -L/usr/lib64 -L/local/kai/conda/gdal-1-test/gdal-2.1.0/lib -lpython2.7 -lgdal -o build/lib.linux-x86_64-2.7/osgeo/_osr.so
building 'osgeo._ogr' extension
gcc -pthread -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/local/kai/conda/gdal-1-test/gdal-2.1.0/include -c extensions/ogr_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/ogr_wrap.o
In file included from /usr/include/python2.7/Python.h:133:0,
from extensions/ogr_wrap.cpp:155:
extensions/ogr_wrap.cpp: In function ‘PyObject* _wrap_MajorObject_SetMetadata__SWIG_0(PyObject*, PyObject*)’:
/usr/include/python2.7/abstract.h:1354:62: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
#define PyMapping_Items(O) PyObject_CallMethod(O,"items",NULL)
^
extensions/ogr_wrap.cpp:5567:31: note: in expansion of macro ‘PyMapping_Items’
PyObject *item_list = PyMapping_Items( obj1 );
^
extensions/ogr_wrap.cpp: In function ‘PyObject* _wrap_Feature_GetFieldAsIntegerList(PyObject*, PyObject*)’:
extensions/ogr_wrap.cpp:13843:48: warning: ‘pList3’ may be used uninitialized in this function [-Wmaybe-uninitialized]
PyObject *val = PyInt_FromLong( (*arg4)[i] );
^
extensions/ogr_wrap.cpp:13798:8: note: ‘pList3’ was declared here
int *pList3 ;
^
extensions/ogr_wrap.cpp: In function ‘PyObject* _wrap_Feature_GetFieldAsDoubleList(PyObject*, PyObject*)’:
extensions/ogr_wrap.cpp:14095:54: warning: ‘pList3’ may be used uninitialized in this function [-Wmaybe-uninitialized]
PyObject *val = PyFloat_FromDouble( (*arg4)[i] );
^
extensions/ogr_wrap.cpp:14050:11: note: ‘pList3’ was declared here
double *pList3 ;
^
g++ -pthread -shared build/temp.linux-x86_64-2.7/extensions/ogr_wrap.o -L../../.libs -L../../ -L/usr/lib64 -L/local/kai/conda/gdal-1-test/gdal-2.1.0/lib -lpython2.7 -lgdal -o build/lib.linux-x86_64-2.7/osgeo/_ogr.so
building 'osgeo._gdal_array' extension
gcc -pthread -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/local/kai/conda/gdal-1-test/gdal-2.1.0/include -c extensions/gdal_array_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_array_wrap.o
In file included from /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1777:0,
from /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from extensions/gdal_array_wrap.cpp:3377:
/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^
extensions/gdal_array_wrap.cpp:3331:14: warning: ‘char* GDALPythonObjectToCStr(PyObject*, int*)’ defined but not used [-Wunused-function]
static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
^
extensions/gdal_array_wrap.cpp:3361:13: warning: ‘void GDALPythonFreeCStr(void*, int)’ defined but not used [-Wunused-function]
static void GDALPythonFreeCStr(void* ptr, int bToFree)
^
g++ -pthread -shared build/temp.linux-x86_64-2.7/extensions/gdal_array_wrap.o -L../../.libs -L../../ -L/usr/lib64 -L/local/kai/conda/gdal-1-test/gdal-2.1.0/lib -lpython2.7 -lgdal -o build/lib.linux-x86_64-2.7/osgeo/_gdal_array.so
make[2]: Leaving directory '/home/kai/conda/gdal-1-test/gdal-2.1.0/swig/python'
make[1]: Leaving directory '/home/kai/conda/gdal-1-test/gdal-2.1.0/swig'
rm -f gdal.pc
echo 'CONFIG_VERSION='`cat ./VERSION`'' >> gdal.pc
echo 'CONFIG_INST_PREFIX=/usr/local' >> gdal.pc
echo 'CONFIG_INST_LIBS=-L/usr/local/lib64 -lgdal' >> gdal.pc
echo 'CONFIG_INST_CFLAGS=-I/usr/local/include' >> gdal.pc
echo 'CONFIG_INST_DATA=/usr/local/share/gdal/data' >> gdal.pc
cat gdal.pc.in >> gdal.pc
-------------- next part --------------
make[2]: Entering directory '/home/kai/conda/gdal-2-test/gdal-2.1.0/swig/python'
rm -f setup_vars.ini
echo 'GNM_ENABLED=no' >> setup_vars.ini
python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying gdal.py -> build/lib.linux-x86_64-2.7
copying ogr.py -> build/lib.linux-x86_64-2.7
copying osr.py -> build/lib.linux-x86_64-2.7
copying gdalconst.py -> build/lib.linux-x86_64-2.7
copying gdalnumeric.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdalconst.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/__init__.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gnm.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/osr.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdal_array.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdal.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/ogr.py -> build/lib.linux-x86_64-2.7/osgeo
running build_ext
building 'osgeo._gdal' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/extensions
/bin/sh /home/kai/conda/gdal-2-test/gdal-2.1.0/libtool --mode=compile --tag=CC gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o
libtool: compile: gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/gdal_wrap.cpp -fPIC -DPIC -o build/temp.linux-x86_64-2.7/extensions/.libs/gdal_wrap.o
In file included from /usr/include/python2.7/Python.h:133:0,
from extensions/gdal_wrap.cpp:155:
extensions/gdal_wrap.cpp: In function 'PyObject* _wrap_MajorObject_SetMetadata__SWIG_0(PyObject*, PyObject*)':
/usr/include/python2.7/abstract.h:1354:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
#define PyMapping_Items(O) PyObject_CallMethod(O,"items",NULL)
^
extensions/gdal_wrap.cpp:9115:31: note: in expansion of macro 'PyMapping_Items'
PyObject *item_list = PyMapping_Items( obj1 );
^
libtool: compile: gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o >/dev/null 2>&1
/bin/sh -pthread -shared build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o -L../../.libs -L../../ -L/usr/lib64 -L/home/kai/conda/gdal-2-test/gdal-2.1.0/lib -lpython2.7 -lgdal -o build/lib.linux-x86_64-2.7/osgeo/_gdal.so
/bin/sh: -d: Ungültige Option
error: command '/bin/sh' failed with exit status 1
GNUmakefile:74: recipe for target 'build' failed
make[2]: *** [build] Error 1
make[2]: Leaving directory '/home/kai/conda/gdal-2-test/gdal-2.1.0/swig/python'
GNUmakefile:30: recipe for target 'build' failed
make[1]: *** [build] Error 2
make[1]: Leaving directory '/home/kai/conda/gdal-2-test/gdal-2.1.0/swig'
GNUmakefile:104: recipe for target 'swig-modules' failed
make: *** [swig-modules] Error 2
-------------- next part --------------
make[2]: Entering directory '/home/kai/conda/gdal-2-test/gdal-2.1.0/swig/python'
rm -f setup_vars.ini
echo 'GNM_ENABLED=no' >> setup_vars.ini
python setup.py build
WARNING: "CXX=/bin/sh /home/kai/conda/gdal-2-test/gdal-2.1.0/libtool --mode=compile --tag=CXX g++" was defined in the environment and contains more than one word. Unsetting it since that is incompatible of distutils
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying gdal.py -> build/lib.linux-x86_64-2.7
copying ogr.py -> build/lib.linux-x86_64-2.7
copying osr.py -> build/lib.linux-x86_64-2.7
copying gdalconst.py -> build/lib.linux-x86_64-2.7
copying gdalnumeric.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdalconst.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/__init__.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gnm.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/osr.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdal_array.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/gdal.py -> build/lib.linux-x86_64-2.7/osgeo
copying osgeo/ogr.py -> build/lib.linux-x86_64-2.7/osgeo
running build_ext
building 'osgeo._gdal' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/extensions
/bin/sh /home/kai/conda/gdal-2-test/gdal-2.1.0/libtool --mode=compile --tag=CC gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o
libtool: compile: gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/gdal_wrap.cpp -fPIC -DPIC -o build/temp.linux-x86_64-2.7/extensions/.libs/gdal_wrap.o
In file included from /usr/include/python2.7/Python.h:133:0,
from extensions/gdal_wrap.cpp:155:
extensions/gdal_wrap.cpp: In function 'PyObject* _wrap_MajorObject_SetMetadata__SWIG_0(PyObject*, PyObject*)':
/usr/include/python2.7/abstract.h:1354:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
#define PyMapping_Items(O) PyObject_CallMethod(O,"items",NULL)
^
extensions/gdal_wrap.cpp:9115:31: note: in expansion of macro 'PyMapping_Items'
PyObject *item_list = PyMapping_Items( obj1 );
^
libtool: compile: gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o >/dev/null 2>&1
g++ -pthread -shared build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o -L../../.libs -L../../ -L/usr/lib64 -L/home/kai/conda/gdal-2-test/gdal-2.1.0/lib -lpython2.7 -lgdal -o build/lib.linux-x86_64-2.7/osgeo/_gdal.so
building 'osgeo._gdalconst' extension
/bin/sh /home/kai/conda/gdal-2-test/gdal-2.1.0/libtool --mode=compile --tag=CC gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/gdalconst_wrap.c -o build/temp.linux-x86_64-2.7/extensions/gdalconst_wrap.o
libtool: compile: gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/gdalconst_wrap.c -fPIC -DPIC -o build/temp.linux-x86_64-2.7/extensions/.libs/gdalconst_wrap.o
libtool: compile: gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/gdalconst_wrap.c -o build/temp.linux-x86_64-2.7/extensions/gdalconst_wrap.o >/dev/null 2>&1
gcc -pthread -shared build/temp.linux-x86_64-2.7/extensions/gdalconst_wrap.o -L../../.libs -L../../ -L/usr/lib64 -L/home/kai/conda/gdal-2-test/gdal-2.1.0/lib -lpython2.7 -lgdal -o build/lib.linux-x86_64-2.7/osgeo/_gdalconst.so
building 'osgeo._osr' extension
/bin/sh /home/kai/conda/gdal-2-test/gdal-2.1.0/libtool --mode=compile --tag=CC gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/osr_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/osr_wrap.o
libtool: compile: gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/osr_wrap.cpp -fPIC -DPIC -o build/temp.linux-x86_64-2.7/extensions/.libs/osr_wrap.o
extensions/osr_wrap.cpp:3224:14: warning: 'char* GDALPythonObjectToCStr(PyObject*, int*)' defined but not used [-Wunused-function]
static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
^
extensions/osr_wrap.cpp:3254:13: warning: 'void GDALPythonFreeCStr(void*, int)' defined but not used [-Wunused-function]
static void GDALPythonFreeCStr(void* ptr, int bToFree)
^
libtool: compile: gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/osr_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/osr_wrap.o >/dev/null 2>&1
g++ -pthread -shared build/temp.linux-x86_64-2.7/extensions/osr_wrap.o -L../../.libs -L../../ -L/usr/lib64 -L/home/kai/conda/gdal-2-test/gdal-2.1.0/lib -lpython2.7 -lgdal -o build/lib.linux-x86_64-2.7/osgeo/_osr.so
building 'osgeo._ogr' extension
/bin/sh /home/kai/conda/gdal-2-test/gdal-2.1.0/libtool --mode=compile --tag=CC gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/ogr_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/ogr_wrap.o
libtool: compile: gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/ogr_wrap.cpp -fPIC -DPIC -o build/temp.linux-x86_64-2.7/extensions/.libs/ogr_wrap.o
In file included from /usr/include/python2.7/Python.h:133:0,
from extensions/ogr_wrap.cpp:155:
extensions/ogr_wrap.cpp: In function 'PyObject* _wrap_MajorObject_SetMetadata__SWIG_0(PyObject*, PyObject*)':
/usr/include/python2.7/abstract.h:1354:62: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
#define PyMapping_Items(O) PyObject_CallMethod(O,"items",NULL)
^
extensions/ogr_wrap.cpp:5567:31: note: in expansion of macro 'PyMapping_Items'
PyObject *item_list = PyMapping_Items( obj1 );
^
extensions/ogr_wrap.cpp: In function 'PyObject* _wrap_Feature_GetFieldAsIntegerList(PyObject*, PyObject*)':
extensions/ogr_wrap.cpp:13843:48: warning: 'pList3' may be used uninitialized in this function [-Wmaybe-uninitialized]
PyObject *val = PyInt_FromLong( (*arg4)[i] );
^
extensions/ogr_wrap.cpp:13798:8: note: 'pList3' was declared here
int *pList3 ;
^
extensions/ogr_wrap.cpp: In function 'PyObject* _wrap_Feature_GetFieldAsDoubleList(PyObject*, PyObject*)':
extensions/ogr_wrap.cpp:14095:54: warning: 'pList3' may be used uninitialized in this function [-Wmaybe-uninitialized]
PyObject *val = PyFloat_FromDouble( (*arg4)[i] );
^
extensions/ogr_wrap.cpp:14050:11: note: 'pList3' was declared here
double *pList3 ;
^
libtool: compile: gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/ogr_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/ogr_wrap.o >/dev/null 2>&1
g++ -pthread -shared build/temp.linux-x86_64-2.7/extensions/ogr_wrap.o -L../../.libs -L../../ -L/usr/lib64 -L/home/kai/conda/gdal-2-test/gdal-2.1.0/lib -lpython2.7 -lgdal -o build/lib.linux-x86_64-2.7/osgeo/_ogr.so
building 'osgeo._gdal_array' extension
/bin/sh /home/kai/conda/gdal-2-test/gdal-2.1.0/libtool --mode=compile --tag=CC gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/gdal_array_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_array_wrap.o
libtool: compile: gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/gdal_array_wrap.cpp -fPIC -DPIC -o build/temp.linux-x86_64-2.7/extensions/.libs/gdal_array_wrap.o
In file included from /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1777:0,
from /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from extensions/gdal_array_wrap.cpp:3377:
/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^
extensions/gdal_array_wrap.cpp:3331:14: warning: 'char* GDALPythonObjectToCStr(PyObject*, int*)' defined but not used [-Wunused-function]
static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
^
extensions/gdal_array_wrap.cpp:3361:13: warning: 'void GDALPythonFreeCStr(void*, int)' defined but not used [-Wunused-function]
static void GDALPythonFreeCStr(void* ptr, int bToFree)
^
libtool: compile: gcc -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/home/kai/conda/gdal-2-test/gdal-2.1.0/include -c extensions/gdal_array_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_array_wrap.o >/dev/null 2>&1
g++ -pthread -shared build/temp.linux-x86_64-2.7/extensions/gdal_array_wrap.o -L../../.libs -L../../ -L/usr/lib64 -L/home/kai/conda/gdal-2-test/gdal-2.1.0/lib -lpython2.7 -lgdal -o build/lib.linux-x86_64-2.7/osgeo/_gdal_array.so
make[2]: Leaving directory '/home/kai/conda/gdal-2-test/gdal-2.1.0/swig/python'
make[1]: Leaving directory '/home/kai/conda/gdal-2-test/gdal-2.1.0/swig'
More information about the gdal-dev
mailing list