Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

build failure in PHP 8.1 #12

Closed
Joungkyun opened this issue Feb 13, 2022 · 0 comments
Closed

build failure in PHP 8.1 #12

Joungkyun opened this issue Feb 13, 2022 · 0 comments

Comments

@Joungkyun
Copy link
Member

Joungkyun commented Feb 13, 2022

In PHP 8.1, mod_magic fails to build.

libtool: compile:  cc -std=gnu99 -I. -I/root/work/github/php/mod_magic -I/root/work/github/php/mod_magic/include -I/root/work/github/php/mod_magic/main -I/root/work/github/php/mod_magic -I/opt/php-qa/php81/include/php -I/opt/php-qa/php81/include/php/main -I/opt/php-qa/php81/include/php/TSRM -I/opt/php-qa/php81/include/php/Zend -I/opt/php-qa/php81/include/php/ext -I/opt/php-qa/php81/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -DZEND_COMPILE_DL_EXT=1 -c /root/work/github/php/mod_magic/magic.c -MMD -MF magic.dep -MT magic.lo  -fPIC -DPIC -o .libs/magic.o
In file included from /opt/php-qa/php81/include/php/main/fopen_wrappers.h:21:0,
                 from /opt/php-qa/php81/include/php/main/php.h:419,
                 from /root/work/github/php/mod_magic/magic.c:49:
/root/work/github/php/mod_magic/magic.c: In function 'magic_set_error':
/opt/php-qa/php81/include/php/main/php_globals.h:29:29: error: 'struct _php_core_globals' has no member named 'log_errors_max_len'
 # define PG(v) (core_globals.v)
                             ^
/root/work/github/php/mod_magic/magic.c:164:35: note: in expansion of macro 'PG'
  buffer_len = vspprintf (&buffer, PG(log_errors_max_len), format, args);
                                   ^
/root/work/github/php/mod_magic/magic.c:218:24: warning: assignment from incompatible pointer type [enabled by default]
   PG (last_error_file) = strdup (ZSTR_VAL (zend_get_compiled_filename ()));
                        ^
/root/work/github/php/mod_magic/magic.c:221:24: warning: assignment from incompatible pointer type [enabled by default]
   PG (last_error_file) = strdup (zend_get_executed_filename ());
                        ^
make: *** [magic.lo] 오류 1
  1. Since PHP 8.1, removed log_errors_max_len ini entry
  2. change proto type of PG(last_error_file) to (zend_string *) from (char *)
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant