<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>RE: [gdal-dev] gdal 1.6 build on redhat Linux, missing gdal.py _gdalmodule.so</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">Thanks Klokan,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">I added</FONT></SPAN><SPAN LANG="en-ca"> <FONT SIZE=2 FACE="Courier New">--with-python</FONT></SPAN><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New"></FONT></SPAN><SPAN LANG="en-ca"> </SPAN></P>
<UL DIR=LTR>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New"> ./configure --prefix=/home/sgong/dev181/dist --with-png=internal --with-libtiff=internal --with-gif=internal --with-geotiff=internal --with-libz=/home/sgong/dev181/dist --</FONT><FONT SIZE=2 FACE="Courier New">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 -</FONT><FONT SIZE=2 FACE="Courier New">-</FONT><FONT SIZE=2 FACE="Courier New">without-odbc --without-grib --without-pg</FONT></SPAN><SPAN LANG="en-ca"> <FONT COLOR="#FF0000" SIZE=2 FACE="Courier New">--with-python</FONT></SPAN><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New"> </FONT></SPAN></P>
</UL>
<P DIR=LTR><SPAN LANG="en-ca"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">And got error:</FONT></SPAN><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New"> </FONT></SPAN><SPAN LANG="en-ca"> <FONT COLOR="#FF0000" SIZE=2 FACE="Courier New">/bin/sh: -d: invalid option</FONT></SPAN><SPAN LANG="en-ca"></SPAN></P>
<UL DIR=LTR>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">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/sgo</FONT><FONT SIZE=2 FACE="Courier New">ng/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</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">extensions/gdal_wrap.cpp: In function `PyObject*</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New"> _wr</FONT><FONT SIZE=2 FACE="Courier New">ap_RegenerateOverviews(PyObject*, PyObject*, PyObject*)':</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">extensions/gdal_wrap.cpp:13663: warning: unused variable `int v'</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">extensions/gdal_wrap.cpp:13606: warning: `int arg2' might be used uninitialized</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New"> in this function</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">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/in</FONT><FONT SIZE=2 FACE="Courier New">c</FONT><FONT SIZE=2 FACE="Courier New">lude -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/dev1</FONT><FONT SIZE=2 FACE="Courier New">8</FONT><FONT SIZE=2 FACE="Courier New">1/gdal-1.6.0/lib -lgdal -o build/lib.linux-i686-2.5/osgeo/_gdal.so</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT COLOR="#FF0000" SIZE=2 FACE="Courier New">/bin/sh: -d: invalid option</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">error: command '/bin/sh' failed with exit status 1</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">make[2]: *** [build] Error 1</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">make[2]: Leaving directory `/home/sgong/dev181/gdal-1.6.0/swig/python'</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">make[1]: *</FONT><FONT SIZE=2 FACE="Courier New">** [build] Error 2</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">make[1]: Leaving directory `/home/sgong/dev181/gdal-1.6.0/swig'</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">make: *** [swig-modules] Error 2</FONT></SPAN></P>
</UL>
<P DIR=LTR><SPAN LANG="en-ca"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">Would</FONT><FONT SIZE=2 FACE="Courier New"> someone help?</FONT></SPAN><SPAN LANG="en-ca"> <FONT SIZE=2 FACE="Courier New">Thanks</FONT></SPAN><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">,</FONT></SPAN><SPAN LANG="en-ca"> </SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">Shawn </FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">________________________________________</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">From: klokan@gmail.com [<A HREF="mailto:klokan@gmail.com">mailto:klokan@gmail.com</A>] On Behalf Of Klokan Petr Pridal</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">Sent: Friday, December 19, 2008 3:08 AM</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">To: Gong, Shawn (Contractor)</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">Cc: gdal-dev@lists.osgeo.org</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">Subject: Re: [gdal-dev] gdal 1.6 build on redhat Linux, missing gdal.py _gdalmodule.so</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">Hi,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">I just finished building gdal 1.6 on redhat Linux (using gcc 4.2.2</FONT><FONT SIZE=2 FACE="Courier New">, python 2.5.2).</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">After taking Even Rouault and Frank's suggestion, I used the minimized driver approach. It seemed to work.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New"> </FONT><FONT SIZE=2 FACE="Courier New"> ./configure --prefix=/home/sgong/dev181/dist --with-png=internal --with-libtiff=internal --with-gif=internal --with-geotiff=intern</FONT><FONT SIZE=2 FACE="Courier New">al --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-m</FONT><FONT SIZE=2 FACE="Courier New">r</FONT><FONT SIZE=2 FACE="Courier New">sid --without-jp2mrsid --without-mysql --without-odbc --without-grib --without-pg</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">One question: </FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">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/. </FONT> <FONT SIZE=2 FACE="Courier New">Nor did the _gdalmodule.a, _gdalmodule.la, _gdalmodule.so,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">Did I miss something in config?</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">I am afraid you missed --with-python ...</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New"> </FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">Best regards</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-ca"><FONT SIZE=2 FACE="Courier New">Klokan</FONT></SPAN><SPAN LANG="en-ca"></SPAN></P>
</BODY>
</HTML>