[gdal-dev] compile error

Even Rouault even.rouault at mines-paris.org
Thu Sep 16 13:39:20 EDT 2010


Murat,

unfortunately, no-one currently maintains the PHP bindings so there's a high 
risk they are not functionnal (PHP mainteners welcome by the way). See 
http://trac.osgeo.org/gdal/wiki/GdalOgrInPhp

Actually I got the same errors as you. It appears the gdal_wrap.cpp in SVN is 
outdated. However I've managed to build the PHP bindings by doing this :

cd swig/php
make veryclean
make build

This assumes you have SWIG somewhere in your path (tested version here : swig 
1.3.39)

This produces a php_gdal.so, but again don't blame me if it doesn't work ;-)

Even

Le mercredi 15 septembre 2010 15:04:24, Murat Beyhan a écrit :
> I tried to install gdal 1.7.2 on mandriva in order to read data from
> mysql.
> So I faced following error
> Please help me How can I solve this problem
> many thanks
> Murat
> 
> 
> g++ -I../../port -I../../gcore -I../../alg -I../../ogr `php-config
> --includes` -fpic -c
> gdal_wrap.cpp
> gdal_wrap.cpp:562: warning: deprecated conversion from string constant
> to
> ‘char*’
> gdal_wrap.cpp:867: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:867: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:867: error: expected primary-expression before ‘*’
> token
> gdal_wrap.cpp:867: error: ‘value’ was not declared in this
> scope
> gdal_wrap.cpp:867: error: initializer expression list treated as
> compound
> expression
> gdal_wrap.cpp:868: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:868: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:868: error: expected primary-expression before ‘*’
> token
> gdal_wrap.cpp:868: error: ‘value’ was not declared in this
> scope
> gdal_wrap.cpp:868: error: initializer expression list treated as
> compound
> expression
> gdal_wrap.cpp:869: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:869: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:870: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:870: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:870: error: expected primary-expression before ‘*’
> token
> gdal_wrap.cpp:870: error: ‘value’ was not declared in this
> scope
> gdal_wrap.cpp:870: error: initializer expression list treated as
> compound
> expression
> gdal_wrap.cpp:882: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:882: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:882: error: expected primary-expression before ‘*’
> token
> gdal_wrap.cpp:882: error: ‘value’ was not declared in this
> scope
> gdal_wrap.cpp:882: error: initializer expression list treated as
> compound
> expression
> gdal_wrap.cpp:883: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:883: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:883: error: expected primary-expression before ‘*’
> token
> gdal_wrap.cpp:883: error: ‘value’ was not declared in this
> scope
> gdal_wrap.cpp:883: error: initializer expression list treated as
> compound
> expression
> gdal_wrap.cpp:884: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:884: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:885: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:885: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:885: error: expected primary-expression before ‘*’
> token
> gdal_wrap.cpp:885: error: ‘value’ was not declared in this
> scope
> gdal_wrap.cpp:885: error: initializer expression list treated as
> compound
> expression
> gdal_wrap.cpp:915: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:915: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:915: error: expected primary-expression before ‘*’
> token
> gdal_wrap.cpp:915: error: ‘value’ was not declared in this
> scope
> gdal_wrap.cpp:915: error: initializer expression list treated as
> compound
> expression
> gdal_wrap.cpp:916: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:916: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:916: error: expected primary-expression before ‘*’
> token
> gdal_wrap.cpp:916: error: ‘value’ was not declared in this
> scope
> gdal_wrap.cpp:916: error: initializer expression list treated as
> compound
> expression
> gdal_wrap.cpp:917: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:917: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:918: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:918: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:918: error: expected primary-expression before ‘*’
> token
> gdal_wrap.cpp:918: error: ‘value’ was not declared in this
> scope
> gdal_wrap.cpp:918: error: initializer expression list treated as
> compound
> expression
> gdal_wrap.cpp:1143: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:1143: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:1143: error: expected primary-expression before ‘*’
> token
> gdal_wrap.cpp:1143: error: ‘value’ was not declared in this
> scope
> gdal_wrap.cpp:1143: error: initializer expression list treated as
> compound
> expression
> gdal_wrap.cpp:1144: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:1144: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:1144: error: expected primary-expression before ‘*’
> token
> gdal_wrap.cpp:1144: error: ‘value’ was not declared in this
> scope
> gdal_wrap.cpp:1144: error: initializer expression list treated as
> compound
> expression
> gdal_wrap.cpp:1145: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:1145: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:1146: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:1146: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:1146: error: expected primary-expression before ‘*’
> token
> gdal_wrap.cpp:1146: error: ‘value’ was not declared in this
> scope
> gdal_wrap.cpp:1146: error: initializer expression list treated as
> compound
> expression
> gdal_wrap.cpp:1261: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:1261: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:1261: error: expected primary-expression before ‘*’
> token
> gdal_wrap.cpp:1261: error: ‘value’ was not declared in this
> scope
> gdal_wrap.cpp:1261: error: initializer expression list treated as
> compound
> expression
> gdal_wrap.cpp:1262: error: ‘zend_property_reference’ was not declared in
> this
> scope
> gdal_wrap.cpp:1262: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:1262: error: expected primary-expression before ‘*’ token
> gdal_wrap.cpp:1262: error: ‘value’ was not declared in this scope
> gdal_wrap.cpp:1262: error: initializer expression list treated as
> compound expression
> gdal_wrap.cpp:1263: error: ‘zend_property_reference’ was not declared in
> this scope
> gdal_wrap.cpp:1263: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:1264: error: ‘zend_property_reference’ was not declared in
> this scope
> gdal_wrap.cpp:1264: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:1264: error: expected primary-expression before ‘*’ token
> gdal_wrap.cpp:1264: error: ‘value’ was not declared in this scope
> gdal_wrap.cpp:1264: error: initializer expression list treated as
> compound expression
> gdal_wrap.cpp:1276: error: ‘zend_property_reference’ was not declared in
> this scope
> gdal_wrap.cpp:1276: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:1276: error: expected primary-expression before ‘*’ token
> gdal_wrap.cpp:1276: error: ‘value’ was not declared in this scope
> gdal_wrap.cpp:1276: error: initializer expression list treated as
> compound expression
> gdal_wrap.cpp:1277: error: ‘zend_property_reference’ was not declared in
> this scope
> gdal_wrap.cpp:1277: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:1277: error: expected primary-expression before ‘*’ token
> gdal_wrap.cpp:1277: error: ‘value’ was not declared in this scope
> gdal_wrap.cpp:1277: error: initializer expression list treated as
> compound expression
> gdal_wrap.cpp:1278: error: ‘zend_property_reference’ was not declared in
> this scope
> gdal_wrap.cpp:1278: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:1279: error: ‘zend_property_reference’ was not declared in
> this scope
> gdal_wrap.cpp:1279: error: ‘property_reference’ was not declared in this
> scope
> gdal_wrap.cpp:1279: error: expected primary-expression before ‘*’ token
> gdal_wrap.cpp:1279: error: ‘value’ was not declared in this scope
> gdal_wrap.cpp:1279: error: initializer expression list treated as
> compound expression
> gdal_wrap.cpp:1536: warning: deprecated conversion from string constant
> to ‘char*’
> gdal_wrap.cpp: In function ‘void _wrap_PushErrorHandler__SWIG_1(int,
> zval*, zval**, zval*, int)’:
> gdal_wrap.cpp:1806: warning: deprecated conversion from string constant
> to ‘char*’
> gdal_wrap.cpp: In function ‘void _wrap_MajorObject_GetDescription(int,
> zval*, zval**, zval*, int)’:
> gdal_wrap.cpp:2128: warning: deprecated conversion from string constant
> to ‘char*’
> gdal_wrap.cpp: In function ‘void _wrap_MajorObject_SetDescription(int,
> zval*, zval**, zval*, int)’:
> gdal_wrap.cpp:2160: warning: deprecated conversion from string constant
> to ‘char*’
> gdal_wrap.cpp: In function ‘void _wrap_MajorObject_GetMetadata_Dict(int,
> zval*, zval**, zval*, int)’:
> gdal_wrap.cpp:2197: warning: deprecated conversion from string constant
> to ‘char*’
> gdal_wrap.cpp: In function ‘void _wrap_MajorObject_GetMetadata_List(int,
> zval*, zval**, zval*, int)’:
> gdal_wrap.cpp:2252: warning: deprecated conversion from string constant
> to ‘char*’
> gdal_wrap.cpp: In function ‘void
> _wrap_MajorObject_SetMetadata__SWIG_0(int, zval*, zval**, zval*, int)’:
> gdal_wrap.cpp:2306: warning: deprecated conversion from string constant
> to ‘char*’
> gdal_wrap.cpp: In function ‘void
> _wrap_MajorObject_SetMetadata__SWIG_1(int, zval*, zval**, zval*, int)’:
> gdal_wrap.cpp:2372: warning: deprecated conversion from string constant
> to ‘char*’
> gdal_wrap.cpp: At global scope:
> gdal_wrap.cpp:2463: error: redefinition of ‘pval
> _wrap_propget_MajorObject’
> gdal_wrap.cpp:869: error: ‘pval _wrap_propget_MajorObject’ previously
> declared here
> gdal_wrap.cpp:2463: error: ‘zend_property_reference’ was not declared in
> this scope
> gdal_wrap.cpp:2463: error: ‘property_reference’ was not declared in this
> scope
> make[2]: *** [gdal_wrap.o] Error 1
> make[2]: Leaving directory `/usr/local/gdal-1.7.2/swig/php'
> make[1]: *** [build] Error 2
> make[1]: Leaving directory `/usr/local/gdal-1.7.2/swig'
> make: *** [swig-modules] Error 2


More information about the gdal-dev mailing list