[gdal-dev] gdal 1.6 build on redhat Linux, missing gdal.py _gdalmodule.so

Gong, Shawn (Contractor) Shawn.Gong at drdc-rddc.gc.ca
Fri Dec 19 09:29:42 EST 2008


Thanks Klokan,

I added --with-python 
	  ./configure --prefix=/home/sgong/dev181/dist --with-png=internal --with-libtiff=internal --with-gif=internal --with-geotiff=internal --with-libz=/home/sgong/dev181/dist --with-jpeg=/home/sgong/dev181/dist --with-hdf4=/home/sgong/dev181/dist --with-hdf5=/home/sgong/dev181/dist --without-ogdi --without-jasper --without-ecw --without-curl --without-expat --without-dwgdirect --without-mrsid --without-jp2mrsid --without-mysql --without-odbc --without-grib --without-pg --with-python 

And got error:  /bin/sh: -d: invalid option
	libtool: compile:  gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/home/sgong/dev181/dist/include/python2.5 -I/home/sgong/dev181/dist/lib/python2.5/site-packages/numpy/core/include -I/home/sgong/dev181/gdal-1.6.0/include -c extensions/gdal_wrap.cpp  -fPIC -DPIC -o build/temp.linux-i686-2.5/extensions/.libs/gdal_wrap.o
	extensions/gdal_wrap.cpp: In function `PyObject*
	   _wrap_RegenerateOverviews(PyObject*, PyObject*, PyObject*)':
	extensions/gdal_wrap.cpp:13663: warning: unused variable `int v'
	extensions/gdal_wrap.cpp:13606: warning: `int arg2' might be used uninitialized
	   in this function
	libtool: compile:  gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/home/sgong/dev181/dist/include/python2.5 -I/home/sgong/dev181/dist/lib/python2.5/site-packages/numpy/core/include -I/home/sgong/dev181/gdal-1.6.0/include -c extensions/gdal_wrap.cpp -o build/temp.linux-i686-2.5/extensions/gdal_wrap.o >/dev/null 2>&1/bin/sh -pthread -shared build/temp.linux-i686-2.5/extensions/gdal_wrap.o -L../../.libs -L../../ -L/home/sgong/dev181/gdal-1.6.0/lib -lgdal -o build/lib.linux-i686-2.5/osgeo/_gdal.so
	/bin/sh: -d: invalid option
	error: command '/bin/sh' failed with exit status 1
	make[2]: *** [build] Error 1
	make[2]: Leaving directory `/home/sgong/dev181/gdal-1.6.0/swig/python'
	make[1]: *** [build] Error 2
	make[1]: Leaving directory `/home/sgong/dev181/gdal-1.6.0/swig'
	make: *** [swig-modules] Error 2


Would someone help? Thanks, 

Shawn 

________________________________________
From: klokan at gmail.com [mailto:klokan at gmail.com] On Behalf Of Klokan Petr Pridal
Sent: Friday, December 19, 2008 3:08 AM
To: Gong, Shawn (Contractor)
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] gdal 1.6 build on redhat Linux, missing gdal.py _gdalmodule.so

Hi,
I just finished building gdal 1.6 on redhat Linux (using gcc 4.2.2, python 2.5.2).
After taking Even Rouault and Frank's suggestion, I used the minimized driver approach. It seemed to work.
  ./configure --prefix=/home/sgong/dev181/dist --with-png=internal --with-libtiff=internal --with-gif=internal --with-geotiff=internal --with-libz=/home/sgong/dev181/dist --with-jpeg=/home/sgong/dev181/dist --with-hdf4=/home/sgong/dev181/dist --with-hdf5=/home/sgong/dev181/dist --without-ogdi --without-jasper --without-ecw --without-curl --without-expat --without-dwgdirect --without-mrsid --without-jp2mrsid --without-mysql --without-odbc --without-grib --without-pg
One question: 
After gdal build, the python files: gdal.py, ogr.py, osr.py, gdalconst.py, gdalnumeric.py did not get copied to [local_install]/lib/python2.5/site-packages/.  Nor did the _gdalmodule.a, _gdalmodule.la, _gdalmodule.so,
Did I miss something in config?

I am afraid you missed --with-python ...
 
Best regards

Klokan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20081219/c4d0bafc/attachment.html


More information about the gdal-dev mailing list