Unable to Build gdal 1.9.0 on 9-RELEASE

Hello,

I am trying to upgrade the KDE metaport and it seems that gdal is needing an upgrade to 1.9.0. I am on 9.0-RELEASE amd64. gdal continues to fail in the build with the same error. It seemed related to swig, which I did not have installed. I have since tried to build gdal after installation of either swig13 or swig20 and it does not help. I do not see an option in the gdal config to turn off something related to swig. I have only the default options set.

Any suggestions would be greatly appreciated.

Thanks, Aric

Code:
extensions/gdalconst_wrap.c:2807: error: parameter 'swig_cast_initial' is initialized
extensions/gdalconst_wrap.c:2808: warning: initialization from incompatible pointer type
extensions/gdalconst_wrap.c:2814: error: storage class specified for parameter 'swig_const_table'
extensions/gdalconst_wrap.c:2814: error: parameter 'swig_const_table' is initialized
extensions/gdalconst_wrap.c:2815: warning: braces around scalar initializer
extensions/gdalconst_wrap.c:2815: warning: (near initialization for 'swig_const_table')
extensions/gdalconst_wrap.c:2815: warning: excess elements in scalar initializer
extensions/gdalconst_wrap.c:2815: warning: (near initialization for 'swig_const_table')
extensions/gdalconst_wrap.c:2815: warning: excess elements in scalar initializer
extensions/gdalconst_wrap.c:2815: warning: (near initialization for 'swig_const_table')
extensions/gdalconst_wrap.c:2815: warning: excess elements in scalar initializer
extensions/gdalconst_wrap.c:2815: warning: (near initialization for 'swig_const_table')
extensions/gdalconst_wrap.c:2815: warning: excess elements in scalar initializer
extensions/gdalconst_wrap.c:2815: warning: (near initialization for 'swig_const_table')
extensions/gdalconst_wrap.c:2815: warning: excess elements in scalar initializer
extensions/gdalconst_wrap.c:2815: warning: (near initialization for 'swig_const_table')
extensions/gdalconst_wrap.c:2874: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
extensions/gdalconst_wrap.c:3027: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
extensions/gdalconst_wrap.c:3077: error: storage class specified for parameter 'swig_globalvar'
extensions/gdalconst_wrap.c:3081: error: expected specifier-qualifier-list before 'swig_globalvar'
extensions/gdalconst_wrap.c:3082: error: storage class specified for parameter 'swig_varlinkobject'
extensions/gdalconst_wrap.c:3085: error: expected ')' before '*' token
extensions/gdalconst_wrap.c:3094: error: expected ')' before '*' token
extensions/gdalconst_wrap.c:3132: error: expected ')' before '*' token
extensions/gdalconst_wrap.c:3143: error: expected ')' before '*' token
extensions/gdalconst_wrap.c:3154: error: expected ')' before '*' token
extensions/gdalconst_wrap.c:3171: error: expected ')' before '*' token
extensions/gdalconst_wrap.c:3188: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
extensions/gdalconst_wrap.c:3248: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
extensions/gdalconst_wrap.c:3257: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
extensions/gdalconst_wrap.c:3274: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
extensions/gdalconst_wrap.c:3286: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
extensions/gdalconst_wrap.c:3316: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
extensions/gdalconst_wrap.c:3366: error: expected declaration specifiers before '__attribute__'
extensions/gdalconst_wrap.c:3514: error: old-style parameter declarations in prototyped function definition
/usr/ports/graphics/gdal/work/gdal-1.9.0/port/cpl_vsi.h:81: error: parameter name omitted
/usr/ports/graphics/gdal/work/gdal-1.9.0/port/cpl_vsi.h:81: error: parameter name omitted
extensions/gdalconst_wrap.c:3514: error: expected '{' at end of input
error: command '/bin/sh' failed with exit status 1
gmake[2]: *** [build] Error 1
gmake[2]: Leaving directory `/usr/ports/graphics/gdal/work/gdal-1.9.0/swig/python'
gmake[1]: *** [build] Error 2
gmake[1]: Leaving directory `/usr/ports/graphics/gdal/work/gdal-1.9.0/swig'
gmake: *** [swig-modules] Error 2
*** Error code 1

Stop in /usr/ports/graphics/gdal.
*** Error code 1

Stop in /usr/ports/graphics/gdal.
 
It turns out that my swig associated error is because I was building gdal with the Python option turned on. I did not realize this. Removing the Python option from gdal's make file (the default is off) allowed gdal to build. Maybe I would need to build Python differently to have the swig option on. I don't know. I do know that there is/was a problem on 10-CURRENT related to swig and gdal as well, as you point out.

Fortunately I have not had the iconv error you mention. Sorry I cannot be of help with that.

Aric
 
He wants you to send the output of this command:

# make showconfig
 
Ah, OK, but this is not necessary anymore. Sunpoet, the maintainer of the port is preparing a new release with 1.9.1. In this version my problem is solved.
 
I know, he told me he's planning to commit the update today. Let's see how it works out, as I am waiting for it as well :-)
 
Back
Top