I'm trying to install MapServer version 7.0.6. I also want php MapScript so I'm doing it by compiling from source. I've installed two versions of PHP (5.6 and 7) on my system (Linux Mint 18.1) but I've downgraded to 5.6 since as far as I'm concerned version 7 is still in development. So everything worked well until I got this error:
[ 82%] Building C object
mapscript/php/CMakeFiles/php_mapscript.dir/mapscript_error.c.o
In file included from
/usr/local/src/mapserver/mapscript/php/php_mapscript.h:37:0,
from
/usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:
/usr/local/src/mapserver/mapscript/php/php_mapscript_util.h:267:1:
error: unknown type name ‘zend_object_value’
zend_object_value mapscript_object_new(zend_object *zobj,
^
In file included from
/usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:0:
/usr/local/src/mapserver/mapscript/php/php_mapscript.h:461:8: error:
unknown type name ‘zend_object_value’
extern zend_object_value mapscript_object_new(zend_object *zobj,
zend_class_entry *ce,
^
/usr/local/src/mapserver/mapscript/php/php_mapscript.h:463:8: error:
unknown type name ‘zend_object_value’
extern zend_object_value mapscript_object_new_ex(zend_object *zobj,
zend_class_entry *ce,
^
/usr/local/src/mapserver/mapscript/php/mapscript_error.c: In function
‘mapscript_throw_exception’:
/usr/local/src/mapserver/mapscript/php/mapscript_error.c:53:10:
warning: return from incompatible pointer type [-Wincompatible-
pointer-types]
return zend_throw_exception(mapscript_ce_mapscriptexception, message,
0 TSRMLS_CC);
^
/usr/local/src/mapserver/mapscript/php/mapscript_error.c: In function
‘zm_startup_mapscript_error’:
/usr/local/src/mapserver/mapscript/php/mapscript_error.c:114:37:
error: too many arguments to function
‘zend_register_internal_class_ex’
mapscript_ce_mapscriptexception =
zend_register_internal_class_ex(&ce,
zend_exception_get_default(TSRMLS_C), "Exception" TSRMLS_CC);
^
In file included from /usr/include/php/20160303/main/php.h:40:0,
from
/usr/local/src/mapserver/mapscript/php/php_mapscript.h:35,
from
/usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:
/usr/include/php/20160303/Zend/zend_API.h:292:28: note: declared here
ZEND_API zend_class_entry
*zend_register_internal_class_ex(zend_class_entry *class_entry,
zend_class_entry *parent_ce);
^
mapscript/php/CMakeFiles/php_mapscript.dir/build.make:62: recipe for
target
'mapscript/php/CMakeFiles/php_mapscript.dir/mapscript_error.c.o'
failed
make[2]: ***
[mapscript/php/CMakeFiles/php_mapscript.dir/mapscript_error.c.o]
Error 1
CMakeFiles/Makefile2:547: recipe for target
'mapscript/php/CMakeFiles/php_mapscript.dir/all' failed
make[1]: *** [mapscript/php/CMakeFiles/php_mapscript.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
I've also installed php5.6-dev on my system.
Is there any fix for this?