I'm trying to build this extension from source so that I can use it on platform.sh, but I'm running into an error (warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’
) when I run make
.
I don't really understand this error so I'd appreciate if you can give me any suggestions about what may be wrong.
Running PHP 8.1
web@5accffd0f86b:/app/submodules/snuffleupagus/snuffleupagus/src$ phpize
Configuring for:
PHP Api Version: 20210902
Zend Module Api No: 20210902
Zend Extension Api No: 420210902
Next configure:
web@5accffd0f86b:/app/submodules/snuffleupagus/snuffleupagus/src$ ./configure --enable-snuffleupagus
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20210902-zts -I/usr/include/php/20210902-zts/main -I/usr/include/php/20210902-zts/TSRM -I/usr/include/php/20210902-zts/Zend -I/usr/include/php/20210902-zts/ext -I/usr/include/php/20210902-zts/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20210902-zts
checking for PHP installed headers prefix... /usr/include/php/20210902-zts
checking if debug is enabled... no
checking if zts is enabled... yes
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable snuffleupagus support... yes, shared
checking whether to enable coverage support... no
checking whether to enable debug messages... no
checking whether to enable debug messages... no
checking for cc option to accept ISO C99... none needed
checking for cc option to accept ISO Standard C... (cached) none needed
./configure: line 4426: pcre2-config: command not found
checking whether C compiler accepts -Wl,-z,relro,-z,now... yes
checking for pcre_compile in -lpcre... yes
checking for a sed that does not truncate output... /bin/sed
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
And finally make:
web@5accffd0f86b:/app/submodules/snuffleupagus/snuffleupagus/src$ make
/bin/bash /app/submodules/snuffleupagus/snuffleupagus/src/libtool --mode=compile cc -I. -I/app/submodules/snuffleupagus/snuffleupagus/src -I/app/submodules/snuffleupagus/snuffleupagus/src/include -I/app/submodules/snuffleupagus/snuffleupagus/src/main -I/app/submodules/snuffleupagus/snuffleupagus/src -I/usr/include/php/20210902-zts -I/usr/include/php/20210902-zts/main -I/usr/include/php/20210902-zts/TSRM -I/usr/include/php/20210902-zts/Zend -I/usr/include/php/20210902-zts/ext -I/usr/include/php/20210902-zts/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DZEND_COMPILE_DL_EXT=1 -c /app/submodules/snuffleupagus/snuffleupagus/src/snuffleupagus.c -o snuffleupagus.lo -MMD -MF snuffleupagus.dep -MT snuffleupagus.lo
mkdir .libs
cc -I. -I/app/submodules/snuffleupagus/snuffleupagus/src -I/app/submodules/snuffleupagus/snuffleupagus/src/include -I/app/submodules/snuffleupagus/snuffleupagus/src/main -I/app/submodules/snuffleupagus/snuffleupagus/src -I/usr/include/php/20210902-zts -I/usr/include/php/20210902-zts/main -I/usr/include/php/20210902-zts/TSRM -I/usr/include/php/20210902-zts/Zend -I/usr/include/php/20210902-zts/ext -I/usr/include/php/20210902-zts/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DZEND_COMPILE_DL_EXT=1 -c /app/submodules/snuffleupagus/snuffleupagus/src/snuffleupagus.c -MMD -MF snuffleupagus.dep -MT snuffleupagus.lo -fPIC -DPIC -o .libs/snuffleupagus.o
/bin/bash /app/submodules/snuffleupagus/snuffleupagus/src/libtool --mode=compile cc -I. -I/app/submodules/snuffleupagus/snuffleupagus/src -I/app/submodules/snuffleupagus/snuffleupagus/src/include -I/app/submodules/snuffleupagus/snuffleupagus/src/main -I/app/submodules/snuffleupagus/snuffleupagus/src -I/usr/include/php/20210902-zts -I/usr/include/php/20210902-zts/main -I/usr/include/php/20210902-zts/TSRM -I/usr/include/php/20210902-zts/Zend -I/usr/include/php/20210902-zts/ext -I/usr/include/php/20210902-zts/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DZEND_COMPILE_DL_EXT=1 -c /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c -o sp_config.lo -MMD -MF sp_config.dep -MT sp_config.lo
cc -I. -I/app/submodules/snuffleupagus/snuffleupagus/src -I/app/submodules/snuffleupagus/snuffleupagus/src/include -I/app/submodules/snuffleupagus/snuffleupagus/src/main -I/app/submodules/snuffleupagus/snuffleupagus/src -I/usr/include/php/20210902-zts -I/usr/include/php/20210902-zts/main -I/usr/include/php/20210902-zts/TSRM -I/usr/include/php/20210902-zts/Zend -I/usr/include/php/20210902-zts/ext -I/usr/include/php/20210902-zts/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DZEND_COMPILE_DL_EXT=1 -c /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c -MMD -MF sp_config.dep -MT sp_config.lo -fPIC -DPIC -o .libs/sp_config.o
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:8:60: error: initializer element is not constant
{parse_unserialize, SP_TOKEN_UNSERIALIZE_HMAC, &(SPCFG(unserialize))},
^
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:8:60: note: (near initialization for ‘sp_func[0].retval’)
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:8:5: warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’ {aka ‘const struct <anonymous>’} [-Wmissing-field-initializers]
{parse_unserialize, SP_TOKEN_UNSERIALIZE_HMAC, &(SPCFG(unserialize))},
^
In file included from /app/submodules/snuffleupagus/snuffleupagus/src/php_snuffleupagus.h:82,
from /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:5:
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.h:187:9: note: ‘retval’ declared here
void *retval;
^~~~~~
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:9:57: error: initializer element is not constant
{parse_enable, SP_TOKEN_HARDEN_RANDOM, &(SPCFG(random).enable)},
^
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:9:57: note: (near initialization for ‘sp_func[1].retval’)
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:9:5: warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’ {aka ‘const struct <anonymous>’} [-Wmissing-field-initializers]
{parse_enable, SP_TOKEN_HARDEN_RANDOM, &(SPCFG(random).enable)},
^
In file included from /app/submodules/snuffleupagus/snuffleupagus/src/php_snuffleupagus.h:82,
from /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:5:
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.h:187:9: note: ‘retval’ declared here
void *retval;
^~~~~~
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:10:53: error: initializer element is not constant
{parse_log_media, SP_TOKEN_LOG_MEDIA, &(SPCFG(log_media))},
^
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:10:53: note: (near initialization for ‘sp_func[2].retval’)
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:10:5: warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’ {aka ‘const struct <anonymous>’} [-Wmissing-field-initializers]
{parse_log_media, SP_TOKEN_LOG_MEDIA, &(SPCFG(log_media))},
^
In file included from /app/submodules/snuffleupagus/snuffleupagus/src/php_snuffleupagus.h:82,
from /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:5:
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.h:187:9: note: ‘retval’ declared here
void *retval;
^~~~~~
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:12:57: error: initializer element is not constant
{parse_readonly_exec, SP_TOKEN_READONLY_EXEC, &(SPCFG(readonly_exec))},
^
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:12:57: note: (near initialization for ‘sp_func[4].retval’)
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:12:5: warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’ {aka ‘const struct <anonymous>’} [-Wmissing-field-initializers]
{parse_readonly_exec, SP_TOKEN_READONLY_EXEC, &(SPCFG(readonly_exec))},
^
In file included from /app/submodules/snuffleupagus/snuffleupagus/src/php_snuffleupagus.h:82,
from /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:5:
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.h:187:9: note: ‘retval’ declared here
void *retval;
^~~~~~
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:13:57: error: initializer element is not constant
{parse_enable, SP_TOKEN_GLOBAL_STRICT, &(SPCFG(global_strict).enable)},
^
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:13:57: note: (near initialization for ‘sp_func[5].retval’)
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:13:5: warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’ {aka ‘const struct <anonymous>’} [-Wmissing-field-initializers]
{parse_enable, SP_TOKEN_GLOBAL_STRICT, &(SPCFG(global_strict).enable)},
^
In file included from /app/submodules/snuffleupagus/snuffleupagus/src/php_snuffleupagus.h:82,
from /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:5:
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.h:187:9: note: ‘retval’ declared here
void *retval;
^~~~~~
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:14:61: error: initializer element is not constant
{parse_upload_validation, SP_TOKEN_UPLOAD_VALIDATION, &(SPCFG(upload_validation))},
^
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:14:61: note: (near initialization for ‘sp_func[6].retval’)
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:14:5: warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’ {aka ‘const struct <anonymous>’} [-Wmissing-field-initializers]
{parse_upload_validation, SP_TOKEN_UPLOAD_VALIDATION, &(SPCFG(upload_validation))},
^
In file included from /app/submodules/snuffleupagus/snuffleupagus/src/php_snuffleupagus.h:82,
from /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:5:
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.h:187:9: note: ‘retval’ declared here
void *retval;
^~~~~~
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:17:62: error: initializer element is not constant
{parse_enable, SP_TOKEN_AUTO_COOKIE_SECURE, &(SPCFG(auto_cookie_secure).enable)},
^
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:17:62: note: (near initialization for ‘sp_func[9].retval’)
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:17:5: warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’ {aka ‘const struct <anonymous>’} [-Wmissing-field-initializers]
{parse_enable, SP_TOKEN_AUTO_COOKIE_SECURE, &(SPCFG(auto_cookie_secure).enable)},
^
In file included from /app/submodules/snuffleupagus/snuffleupagus/src/php_snuffleupagus.h:82,
from /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:5:
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.h:187:9: note: ‘retval’ declared here
void *retval;
^~~~~~
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:18:58: error: initializer element is not constant
{parse_enable, SP_TOKEN_XXE_PROTECTION, &(SPCFG(xxe_protection).enable)},
^
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:18:58: note: (near initialization for ‘sp_func[10].retval’)
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:18:5: warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’ {aka ‘const struct <anonymous>’} [-Wmissing-field-initializers]
{parse_enable, SP_TOKEN_XXE_PROTECTION, &(SPCFG(xxe_protection).enable)},
^
In file included from /app/submodules/snuffleupagus/snuffleupagus/src/php_snuffleupagus.h:82,
from /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:5:
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.h:187:9: note: ‘retval’ declared here
void *retval;
^~~~~~
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:19:58: error: initializer element is not constant
{parse_eval_filter_conf, SP_TOKEN_EVAL_BLACKLIST, &(SPCFG(eval).blacklist)},
^
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:19:58: note: (near initialization for ‘sp_func[11].retval’)
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:19:5: warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’ {aka ‘const struct <anonymous>’} [-Wmissing-field-initializers]
{parse_eval_filter_conf, SP_TOKEN_EVAL_BLACKLIST, &(SPCFG(eval).blacklist)},
^
In file included from /app/submodules/snuffleupagus/snuffleupagus/src/php_snuffleupagus.h:82,
from /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:5:
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.h:187:9: note: ‘retval’ declared here
void *retval;
^~~~~~
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:20:58: error: initializer element is not constant
{parse_eval_filter_conf, SP_TOKEN_EVAL_WHITELIST, &(SPCFG(eval).whitelist)},
^
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:20:58: note: (near initialization for ‘sp_func[12].retval’)
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:20:5: warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’ {aka ‘const struct <anonymous>’} [-Wmissing-field-initializers]
{parse_eval_filter_conf, SP_TOKEN_EVAL_WHITELIST, &(SPCFG(eval).whitelist)},
^
In file included from /app/submodules/snuffleupagus/snuffleupagus/src/php_snuffleupagus.h:82,
from /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:5:
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.h:187:9: note: ‘retval’ declared here
void *retval;
^~~~~~
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:21:62: error: initializer element is not constant
{parse_session, SP_TOKEN_SESSION_ENCRYPTION, &(SPCFG(session))},
^
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:21:62: note: (near initialization for ‘sp_func[13].retval’)
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:21:5: warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’ {aka ‘const struct <anonymous>’} [-Wmissing-field-initializers]
{parse_session, SP_TOKEN_SESSION_ENCRYPTION, &(SPCFG(session))},
^
In file included from /app/submodules/snuffleupagus/snuffleupagus/src/php_snuffleupagus.h:82,
from /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:5:
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.h:187:9: note: ‘retval’ declared here
void *retval;
^~~~~~
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:22:61: error: initializer element is not constant
{parse_enable, SP_TOKEN_SLOPPY_COMPARISON, &(SPCFG(sloppy).enable)},
^
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:22:61: note: (near initialization for ‘sp_func[14].retval’)
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:22:5: warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’ {aka ‘const struct <anonymous>’} [-Wmissing-field-initializers]
{parse_enable, SP_TOKEN_SLOPPY_COMPARISON, &(SPCFG(sloppy).enable)},
^
In file included from /app/submodules/snuffleupagus/snuffleupagus/src/php_snuffleupagus.h:82,
from /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:5:
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.h:187:9: note: ‘retval’ declared here
void *retval;
^~~~~~
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:23:58: error: initializer element is not constant
{parse_wrapper_whitelist, SP_TOKEN_ALLOW_WRAPPERS, &(SPCFG(wrapper))},
^
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:23:58: note: (near initialization for ‘sp_func[15].retval’)
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:23:5: warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’ {aka ‘const struct <anonymous>’} [-Wmissing-field-initializers]
{parse_wrapper_whitelist, SP_TOKEN_ALLOW_WRAPPERS, &(SPCFG(wrapper))},
^
In file included from /app/submodules/snuffleupagus/snuffleupagus/src/php_snuffleupagus.h:82,
from /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:5:
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.h:187:9: note: ‘retval’ declared here
void *retval;
^~~~~~
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:24:58: error: initializer element is not constant
{parse_ini_protection, SP_TOKEN_INI_PROTECTION, &(SPCFG(ini))},
^
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:24:58: note: (near initialization for ‘sp_func[16].retval’)
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:24:5: warning: missing initializer for field ‘retval’ of ‘sp_config_keyword’ {aka ‘const struct <anonymous>’} [-Wmissing-field-initializers]
{parse_ini_protection, SP_TOKEN_INI_PROTECTION, &(SPCFG(ini))},
^
In file included from /app/submodules/snuffleupagus/snuffleupagus/src/php_snuffleupagus.h:82,
from /app/submodules/snuffleupagus/snuffleupagus/src/sp_config.c:5:
/app/submodules/snuffleupagus/snuffleupagus/src/sp_config.h:187:9: note: ‘retval’ declared here
void *retval;
^~~~~~
make: *** [Makefile:221: sp_config.lo] Error 1
build system