#3084 closed defect (fixed)
make: swig/perl does not build
Reported by: | fgenolini | Owned by: | Ari Jolma |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.0 |
Component: | ConfigBuild | Version: | svn-trunk |
Severity: | normal | Keywords: | swig perl |
Cc: | warmerdam |
Description (last modified by )
gdal does not build with perl
Linux hostname 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51 UTC 2009 i686 GNU/Linux Ubuntu 9.04
gdal obtained from SVN trunk on Tuesday 28th July 2009 VERSION 1.7.0
Running configure with the following parameters:
./configure --verbose --prefix=/usr/local --with-swig --with-python --with-geos=yes --with-threads --with-perl
issue (make output):
make[2]: Entering directory `/home/me/gdal/src/swig/perl' perl Makefile.PL Building in GDAL distro tree GDAL version (1.7.0) and module version () do not match at Makefile.PL line 50. make[2]: *** [Makefile_Geo__GDAL] Error 255 make[2]: Leaving directory `/home/me/gdal/src/swig/perl' make[1]: *** [build] Error 2 make[1]: Leaving directory `/home/me/gdal/src/swig' make: *** [swig-modules] Error 2
Attachments (1)
Change History (7)
comment:1 by , 15 years ago
Cc: | added |
---|---|
Description: | modified (diff) |
Keywords: | swig perl added |
Owner: | changed from | to
comment:2 by , 15 years ago
The issue is that some swig generated files are not up-to-date into svn, namely swig/perl/lib/Geo/GDAL.pm. Provided that you have SWIG installed, do the following in swig/perl :
make veryclean make generate make build
comment:3 by , 14 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:4 by , 9 years ago
Milestone: | 1.7.0 → 2.0 |
---|---|
Resolution: | invalid |
Status: | closed → reopened |
I gave the make suggestions a try in the swig/perl folder for GDAL 2.0.0RC1 and build is failing with the error:
..kg/gdal-filegdb/src/gdal-2.0/swig/perl (svn)-[gdal:29351] % make generate swig -Wall -I../include -I../include/perl -I../include/perl/docs -DPERL_CPAN_NAMESPACE -I/tmp/makepkg/gdal-filegdb/src/gdal-2.0 -c++ -perl -o gdal_wrap.cpp ../include/gdal.i ../include/perl/ogr_perl.i:112: Error: Unknown SWIG preprocessor directive: wrapped (if this is a block of target language code, delimit it with %{ and %}) ../include/perl/ogr_perl.i:116: Error: Unknown SWIG preprocessor directive: wrapped (if this is a block of target language code, delimit it with %{ and %}) ../include/perl/ogr_perl.i:124: Error: Unknown SWIG preprocessor directive: wrapped (if this is a block of target language code, delimit it with %{ and %}) ../include/perl/ogr_perl.i:128: Error: Unknown SWIG preprocessor directive: wrapped (if this is a block of target language code, delimit it with %{ and %}) ../SWIGmake.base:9: recipe for target 'gdal_wrap.cpp' failed make: *** [gdal_wrap.cpp] Error 1 ..kg/gdal-filegdb/src/gdal-2.0/swig/perl (svn)-[gdal:29351] % make build swig -Wall -I../include -I../include/perl -I../include/perl/docs -DPERL_CPAN_NAMESPACE -I/tmp/makepkg/gdal-filegdb/src/gdal-2.0 -c++ -perl -o gdal_wrap.cpp ../include/gdal.i ../include/perl/ogr_perl.i:112: Error: Unknown SWIG preprocessor directive: wrapped (if this is a block of target language code, delimit it with %{ and %}) ../include/perl/ogr_perl.i:116: Error: Unknown SWIG preprocessor directive: wrapped (if this is a block of target language code, delimit it with %{ and %}) ../include/perl/ogr_perl.i:124: Error: Unknown SWIG preprocessor directive: wrapped (if this is a block of target language code, delimit it with %{ and %}) ../include/perl/ogr_perl.i:128: Error: Unknown SWIG preprocessor directive: wrapped (if this is a block of target language code, delimit it with %{ and %}) ../SWIGmake.base:9: recipe for target 'gdal_wrap.cpp' failed make: *** [gdal_wrap.cpp] Error 1
So I had a quick look at that file and lines and there is just some issue with commented out code. I googled the swig stuff and looked at examples to see that instead of using '#' they were using ''.
Got a successful build after making those changes. Attached my attempt at a patch. ogr_perl_2.0.0.diff
comment:5 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Ari, thoughts?