id summary reporter owner description type status priority milestone component version severity resolution keywords cc 6770 "compilation fails when '--with-php' is passed to configure. Error: gdal_wrap.cpp:861:52: error: macro ""ZVAL_STRING"" passed 3 arguments, but takes just 2" dreieck warmerdam "When I compile gdal 2.1.1 on my arch linux system (64 bit) and I have the option `--with-php` passed to `configure`, at some point the build process fails with a lot of error messages. (Without that/ with `--without-php` it compiles fine.) Here I give the first and the last error messages; see the attached file `makepkg.with-php.log.xz` for complete: {{{ gdal_wrap.cpp:861:52: error: macro ""ZVAL_STRING"" passed 3 arguments, but takes just 2 ZVAL_STRING(classname, (char*)type->name+3, 1); ^ gdal_wrap.cpp:872:105: error: macro ""zend_hash_update"" passed 6 arguments, but takes just 3 zend_hash_update(HASH_OF(z), (char*)""_cPtr"", sizeof(""_cPtr""), (void*)&resource, sizeof(zval), NULL); ^ gdal_wrap.cpp:2950:50: error: macro ""ZVAL_STRING"" passed 3 arguments, but takes just 2 ZVAL_STRING(return_value, (char *)result, 1); [...] /usr/include/php/Zend/zend_alloc.h:163:34: note: in definition of macro ‘efree’ #define efree(ptr) _efree((ptr) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) ^~~ gdal_wrap.cpp: In function ‘void _wrap_destroy_p_p_GDALRasterBandShadow(zend_resource*)’: gdal_wrap.cpp:13149:9: error: ‘rsrc’ was not declared in this scope efree(rsrc->ptr); ^ /usr/include/php/Zend/zend_alloc.h:163:34: note: in definition of macro ‘efree’ #define efree(ptr) _efree((ptr) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) ^~~ gdal_wrap.cpp: In function ‘int zm_startup_gdal(int, int)’: gdal_wrap.cpp:13735:22: error: ‘MAKE_STD_ZVAL’ was not declared in this scope MAKE_STD_ZVAL(z_var); ^ gdal_wrap.cpp:13742:48: error: cannot convert ‘char*’ to ‘zend_string* {aka _zend_string*}’ in assignment c.name = zend_strndup(""GDALTermProgress"", len); ^ gdal_wrap.cpp:13743:5: error: ‘zend_constant {aka struct _zend_constant}’ has no member named ‘name_len’; did you mean ‘name’? c.name_len = len+1; ^~~~~~~~ make[2]: *** [GNUmakefile:40: gdal_wrap.o] Error 1 make[2]: Leaving directory '/var/abs/local/own/gdal-custom/src/gdal-2.1.1/swig/php' make[1]: *** [GNUmakefile:30: build] Error 2 make[1]: Leaving directory '/var/abs/local/own/gdal-custom/src/gdal-2.1.1/swig' make: *** [GNUmakefile:104: swig-modules] Error 2 }}} I use the following commands to build gdal (taken from the official Arch Linux PKGBUILD, and modified): {{{ #!bash export CFLAGS=""$CFLAGS -fno-strict-aliasing"" # bug #23654 export LDFLAGS=""$LDFLAGS -Wl,--as-needed"" would be build. ./configure --enable-shared --disable-static --with-pic --with-gnu-ld --without-libtool --prefix=/usr \ --with-rename-internal-libtiff-symbols=yes --with-rename-internal-libgeotiff-symbols=yes \ --with-netcdf=/usr --with-libtiff=internal --with-sqlite3 --with-geotiff \ --with-mysql --with-python --with-curl=/usr/bin/curl-config --with-hdf5 --with-perl --with-geos \ --with-png --with-poppler --with-spatialite=dlopen --with-spatialite-soname=/usr/lib/libspatialite.so --with-openjpeg=/usr \ --with-libz --with-liblzma --with-pg=/usr/bin/pg_config --with-grass=/opt/grass --with-cfitsio --with-pcraster=internal --with-pcidsk=internal --with-jpeg=internal --with-gif=/usr/include --with-kea=/usr/bin/kea-config --with-jasper=no --without-fgdb --with-ecw=/usr --with-bsb --with-grib --with-gnm --with-mysql --with-expat=/usr --with-libkml --with-odbc --with-xml2=/usr/bin/xml2-config --with-webp --with-qhull=internal --with-freexl --with-libjson-c=internal --with-pam --with-podofo --with-php --with-java=/usr/lib/jvm/java-8-openjdk --with-jvm-lib-add-rpath=yes --with-armadillo --with-cryptopp # workaround for bug #13646 sed -i 's/PY_HAVE_SETUPTOOLS=1/PY_HAVE_SETUPTOOLS=/g' ./GDALmake.opt sed -i 's/EXE_DEP_LIBS/KILL_EXE_DEP_LIBS/' apps/GNUmakefile make make man }}} I attach the following additional information as files: * The complete `PKGBUILD` to build the package in the way the error occurs, * the log of `stdout` and `stderr` (combined) when configuring and building the package that way, * the log of `stdout` and `stderr` (combined) when configuring and succesfully building the package with `--without-php`. " defect closed normal closed_because_of_github_migration default 2.1.1 normal wontfix build, compilation, php