A
Anonymous
Guest
Hello!
I'm trying to compile FileInfo ext but I'm getting errors when running make.
gcc version 9.3.0 (Arch Linux 9.3.0-1)
Am I missing a depedency or something? But ./configure should tell me if there was something missing...
GCC Error Output:
Thank you.
I'm trying to compile FileInfo ext but I'm getting errors when running make.
gcc version 9.3.0 (Arch Linux 9.3.0-1)
Am I missing a depedency or something? But ./configure should tell me if there was something missing...
GCC Error Output:
Code:
/bin/sh /home/babaliaris/dev/web/php/php-src/ext/fileinfo/libtool --mode=compile cc -I/home/babaliaris/dev/web/php/php-src/ext/fileinfo/libmagic -I. -I/home/babaliaris/dev/web/php/php-src/ext/fileinfo -DPHP_ATOM_INC -I/home/babaliaris/dev/web/php/php-src/ext/fileinfo/include -I/home/babaliaris/dev/web/php/php-src/ext/fileinfo/main -I/home/babaliaris/dev/web/php/php-src/ext/fileinfo -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c -o fileinfo.lo
mkdir .libs
cc -I/home/babaliaris/dev/web/php/php-src/ext/fileinfo/libmagic -I. -I/home/babaliaris/dev/web/php/php-src/ext/fileinfo -DPHP_ATOM_INC -I/home/babaliaris/dev/web/php/php-src/ext/fileinfo/include -I/home/babaliaris/dev/web/php/php-src/ext/fileinfo/main -I/home/babaliaris/dev/web/php/php-src/ext/fileinfo -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c -fPIC -DPIC -o .libs/fileinfo.o
In file included from /home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c:35:
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo_arginfo.h:35:60: error: expected ‘)’ before numeric constant
35 | ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_finfo_file, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
| ^~
| )
In file included from /usr/include/php/main/php.h:37,
from /home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c:20:
/usr/include/php/Zend/zend_API.h:98:97: error: expected identifier or ‘(’ before ‘,’ token
98 | #define ZEND_ARG_INFO(pass_by_ref, name) { #name, 0, pass_by_ref, 0},
| ^
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo_arginfo.h:36:2: note: in expansion of macro ‘ZEND_ARG_INFO’
36 | ZEND_ARG_INFO(0, finfo)
| ^~~~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:103:136: error: expected identifier or ‘(’ before ‘,’ token
103 | #define ZEND_ARG_TYPE_INFO(pass_by_ref, name, type_hint, allow_null) { #name, ZEND_TYPE_ENCODE(type_hint, allow_null), pass_by_ref, 0 },
| ^
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo_arginfo.h:37:2: note: in expansion of macro ‘ZEND_ARG_TYPE_INFO’
37 | ZEND_ARG_TYPE_INFO(0, file_name, IS_STRING, 0)
| ^~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:103:136: error: expected identifier or ‘(’ before ‘,’ token
103 | #define ZEND_ARG_TYPE_INFO(pass_by_ref, name, type_hint, allow_null) { #name, ZEND_TYPE_ENCODE(type_hint, allow_null), pass_by_ref, 0 },
| ^
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo_arginfo.h:38:2: note: in expansion of macro ‘ZEND_ARG_TYPE_INFO’
38 | ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
| ^~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:98:97: error: expected identifier or ‘(’ before ‘,’ token
98 | #define ZEND_ARG_INFO(pass_by_ref, name) { #name, 0, pass_by_ref, 0},
| ^
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo_arginfo.h:39:2: note: in expansion of macro ‘ZEND_ARG_INFO’
39 | ZEND_ARG_INFO(0, context)
| ^~~~~~~~~~~~~
In file included from /home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c:35:
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo_arginfo.h:42:62: error: expected ‘)’ before numeric constant
42 | ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_finfo_buffer, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
| ^~
| )
In file included from /usr/include/php/main/php.h:37,
from /home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c:20:
/usr/include/php/Zend/zend_API.h:98:97: error: expected identifier or ‘(’ before ‘,’ token
98 | #define ZEND_ARG_INFO(pass_by_ref, name) { #name, 0, pass_by_ref, 0},
| ^
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo_arginfo.h:43:2: note: in expansion of macro ‘ZEND_ARG_INFO’
43 | ZEND_ARG_INFO(0, finfo)
| ^~~~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:103:136: error: expected identifier or ‘(’ before ‘,’ token
103 | #define ZEND_ARG_TYPE_INFO(pass_by_ref, name, type_hint, allow_null) { #name, ZEND_TYPE_ENCODE(type_hint, allow_null), pass_by_ref, 0 },
| ^
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo_arginfo.h:44:2: note: in expansion of macro ‘ZEND_ARG_TYPE_INFO’
44 | ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
| ^~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:103:136: error: expected identifier or ‘(’ before ‘,’ token
103 | #define ZEND_ARG_TYPE_INFO(pass_by_ref, name, type_hint, allow_null) { #name, ZEND_TYPE_ENCODE(type_hint, allow_null), pass_by_ref, 0 },
| ^
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo_arginfo.h:45:2: note: in expansion of macro ‘ZEND_ARG_TYPE_INFO’
45 | ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
| ^~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:98:97: error: expected identifier or ‘(’ before ‘,’ token
98 | #define ZEND_ARG_INFO(pass_by_ref, name) { #name, 0, pass_by_ref, 0},
| ^
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo_arginfo.h:46:2: note: in expansion of macro ‘ZEND_ARG_INFO’
46 | ZEND_ARG_INFO(0, context)
| ^~~~~~~~~~~~~
In file included from /home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c:35:
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo_arginfo.h:49:67: error: expected ‘)’ before numeric constant
49 | ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mime_content_type, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
| ^~
| )
In file included from /usr/include/php/main/php.h:37,
from /home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c:20:
/usr/include/php/Zend/zend_API.h:98:97: error: expected identifier or ‘(’ before ‘,’ token
98 | #define ZEND_ARG_INFO(pass_by_ref, name) { #name, 0, pass_by_ref, 0},
| ^
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo_arginfo.h:50:2: note: in expansion of macro ‘ZEND_ARG_INFO’
50 | ZEND_ARG_INFO(0, filename)
| ^~~~~~~~~~~~~
In file included from /usr/include/php/main/php.h:37,
from /home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c:20:
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c:150:22: error: ‘arginfo_finfo_file’ undeclared here (not in a function); did you mean ‘arginfo_finfo_close’?
150 | PHP_FE(finfo_file, arginfo_finfo_file)
| ^~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:67:75: note: in definition of macro ‘ZEND_FENTRY’
67 | #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
| ^~~~~~~~
/usr/include/php/main/php.h:386:18: note: in expansion of macro ‘ZEND_FE’
386 | #define PHP_FE ZEND_FE
| ^~~~~~~
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c:150:2: note: in expansion of macro ‘PHP_FE’
150 | PHP_FE(finfo_file, arginfo_finfo_file)
| ^~~~~~
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c:151:23: error: ‘arginfo_finfo_buffer’ undeclared here (not in a function); did you mean ‘arginfo_finfo_close’?
151 | PHP_FE(finfo_buffer, arginfo_finfo_buffer)
| ^~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:67:75: note: in definition of macro ‘ZEND_FENTRY’
67 | #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
| ^~~~~~~~
/usr/include/php/main/php.h:386:18: note: in expansion of macro ‘ZEND_FE’
386 | #define PHP_FE ZEND_FE
| ^~~~~~~
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c:151:2: note: in expansion of macro ‘PHP_FE’
151 | PHP_FE(finfo_buffer, arginfo_finfo_buffer)
| ^~~~~~
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c:152:28: error: ‘arginfo_mime_content_type’ undeclared here (not in a function); did you mean ‘zif_mime_content_type’?
152 | PHP_FE(mime_content_type, arginfo_mime_content_type)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:67:75: note: in definition of macro ‘ZEND_FENTRY’
67 | #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
| ^~~~~~~~
/usr/include/php/main/php.h:386:18: note: in expansion of macro ‘ZEND_FE’
386 | #define PHP_FE ZEND_FE
| ^~~~~~~
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c:152:2: note: in expansion of macro ‘PHP_FE’
152 | PHP_FE(mime_content_type, arginfo_mime_content_type)
| ^~~~~~
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c: In function ‘zif_finfo_open’:
/home/babaliaris/dev/web/php/php-src/ext/fileinfo/fileinfo.c:246:3: warning: implicit declaration of function ‘RETURN_THROWS’; did you mean ‘RETURN_TRUE’? [-Wimplicit-function-declaration]
246 | RETURN_THROWS();
| ^~~~~~~~~~~~~
| RETURN_TRUE
make: *** [Makefile:192: fileinfo.lo] Error 1
Thank you.