Opened 15 years ago

Last modified 14 years ago

#132 closed defect (fixed)

Cygwin/Python Build Problems

Reported by: warmerdam Owned by: warmerdam
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords:



Change History (3)

comment:1 Changed 15 years ago by warmerdam

Originally from Matt (patawi -*-

Cool. I assume gdal needs to be compiled with python support then? I'm on
Cygwin most of the time and this hasn't worked to well for me. Bug report
follows. Consider it an FYI. While I would be grateful for  a "just do
this, it works" I fully understand that linux is where you live and
troubleshooting elsewhere is not necessarily a priority. (I do have linux
available to me if I really need it)

>From a clean gdal.1.17 src directory, executing "./configure --without-ogr
&& make" runs okay. "make install" is okay until:
make[1]: Entering directory `/usr/local/src/gdal-1.1.7/pymod'
../install-sh -d /usr/lib/python2.2/site-packages
for f in *.py ; do ../install-sh -c $f
ckages ; done
install: does not exist
make[1]: *** [install] Error 1
make[1]: Leaving directory `/usr/local/src/gdal-1.1.7/pymod'
make: *** [install-actions] Error 2

I found cygMakefile in the pymod dir and tried:

$ make clean
rm -f *.o *.so

$ make -f cygMakefile
gcc -c -I. -I.. -I../port -I../core -I../ogr -I/usr/include/python2.2
        -Wall  -O2 -I/usr/local/include    -I/usr/local/include
 -DHAVE_NUMPY gdal_wrap.c -o gdal_wrap.o
gdal_wrap.c: In function `SWIG_GetPtr':
gdal_wrap.c:340: warning: statement with no effect
gdal_wrap.c:344: warning: suggest parentheses around assignment used as
truth va
gdal_wrap.c: At top level:
gdal_wrap.c:193: warning: `SWIG_addvarlink' defined but not used
c++ -c -I. -I.. -I../port -I../core -I../ogr -I/usr/include/python2.2
lude/python2.2 \
         -Wall  -O2  -I/usr/local/include  -DUSE_DL_IMPORT -DHAVE_NUMPY
aset.cpp -o numpydataset.o
c++ -c -I. -I.. -I../port -I../core -I../ogr -I/usr/include/python2.2
lude/python2.2 \
         -Wall  -O2  -I/usr/local/include  -DUSE_DL_IMPORT -DHAVE_NUMPY
ric.cpp -o gdalnumeric.o
/bin/true gdal_wrap.o numpydataset.o gdalnumeric.o \
        ../gdal.a ../ogr/ogr.a ../gdal.a ../port/cpl.a -lz -lm
-lm -L/usr/local/lib/python2.1/config -lpython2.1.dll -o _gdalmodule.dll

$ make -f cygMakefile  install
../install-sh -d /usr/lib/python2.2/site-packages
for f in *.py _gdalmodule.dll ; do ../install-sh -c $f
ackages ; done
install:  _gdalmodule.dll does not exist
make: *** [install] Error 1

In earlier attempts to get python support working I noticed configure was
not finding NumPY. I downloaded the source for that and installed it
(python  install). There were a lot of warnings but no errors
(that I noticed).

comment:2 Changed 14 years ago by alessandro_amici@…


this should be solved in cvs since the libtool transition.

i don't use python bindings on cygwin, so i didn't test it
much, but the easy stuff worked last time i checked.

most probably you may close this bug.


comment:3 Changed 14 years ago by warmerdam

Excellent, thanks!

Note: See TracTickets for help on using tickets.