-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to install on PHP 8.1.6 #61
Comments
@web-masta You will need to use branch |
@krystalcode, I've tried to install that fork, but it doesn't work. This is the error message what I receive:
What should be done? |
Not sure that I can help with these error messages, but it works for me with the following commands on the latest Debian.
Which platform are you building it on? |
Ubuntu 22.04, sorry for the late reply. |
I was advised to install jsmin extension by Advagg Drupal module.
Here is my php version:
When i tried to install jsmin extension, this is what happened in the end:
Full console output (spoiler)
root@server0:~# pecl install jsminWARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading jsmin-3.0.0.tgz ...
Starting to download jsmin-3.0.0.tgz (13,156 bytes)
.....done: 13,156 bytes
8 source files, building
running: phpize
Configuring for:
PHP Api Version: 20210902
Zend Module Api No: 20210902
Zend Extension Api No: 420210902
building in /tmp/pear/temp/pear-build-rootSg0dlQ/jsmin-3.0.0
running: /tmp/pear/temp/jsmin/configure --with-php-config=/opt/php81/bin/php-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/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... /opt/php81
checking for PHP includes... -I/opt/php81/include/php -I/opt/php81/include/php/main -I/opt/php81/include/php/TSRM -I/opt/php81/include/php/Zend -I/opt/php81/include/php/ext -I/opt/php81/include/php/ext/date/lib
checking for PHP extension directory... /opt/php81/lib/php/modules
checking for PHP installed headers prefix... /opt/php81/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... gawk
checking whether to enable jsmin support... yes, shared
checking for ANSI C header files... yes
checking for a sed that does not truncate output... /usr/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 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
running: make
/bin/bash /tmp/pear/temp/pear-build-rootSg0dlQ/jsmin-3.0.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/jsmin -I/tmp/pear/temp/pear-build-rootSg0dlQ/jsmin-3.0.0/include -I/tmp/pear/temp/pear-build-rootSg0dlQ/jsmin-3.0.0/main -I/tmp/pear/temp/jsmin -I/opt/php81/include/php -I/opt/php81/include/php/main -I/opt/php81/include/php/TSRM -I/opt/php81/include/php/Zend -I/opt/php81/include/php/ext -I/opt/php81/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/jsmin/utf8.c -o utf8.lo -MMD -MF utf8.dep -MT utf8.lo
mkdir .libs
cc -I. -I/tmp/pear/temp/jsmin -I/tmp/pear/temp/pear-build-rootSg0dlQ/jsmin-3.0.0/include -I/tmp/pear/temp/pear-build-rootSg0dlQ/jsmin-3.0.0/main -I/tmp/pear/temp/jsmin -I/opt/php81/include/php -I/opt/php81/include/php/main -I/opt/php81/include/php/TSRM -I/opt/php81/include/php/Zend -I/opt/php81/include/php/ext -I/opt/php81/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/jsmin/utf8.c -MMD -MF utf8.dep -MT utf8.lo -fPIC -DPIC -o .libs/utf8.o
/bin/bash /tmp/pear/temp/pear-build-rootSg0dlQ/jsmin-3.0.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/jsmin -I/tmp/pear/temp/pear-build-rootSg0dlQ/jsmin-3.0.0/include -I/tmp/pear/temp/pear-build-rootSg0dlQ/jsmin-3.0.0/main -I/tmp/pear/temp/jsmin -I/opt/php81/include/php -I/opt/php81/include/php/main -I/opt/php81/include/php/TSRM -I/opt/php81/include/php/Zend -I/opt/php81/include/php/ext -I/opt/php81/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/jsmin/php_jsmin.c -o php_jsmin.lo -MMD -MF php_jsmin.dep -MT php_jsmin.lo
cc -I. -I/tmp/pear/temp/jsmin -I/tmp/pear/temp/pear-build-rootSg0dlQ/jsmin-3.0.0/include -I/tmp/pear/temp/pear-build-rootSg0dlQ/jsmin-3.0.0/main -I/tmp/pear/temp/jsmin -I/opt/php81/include/php -I/opt/php81/include/php/main -I/opt/php81/include/php/TSRM -I/opt/php81/include/php/Zend -I/opt/php81/include/php/ext -I/opt/php81/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/jsmin/php_jsmin.c -MMD -MF php_jsmin.dep -MT php_jsmin.lo -fPIC -DPIC -o .libs/php_jsmin.o
In file included from /tmp/pear/temp/jsmin/php_jsmin.c:27:
/tmp/pear/temp/jsmin/jsmin.h:28:42: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’
extern jsmin_obj* jsmin(char *javascript TSRMLS_DC);
^~~~~~~~~
/tmp/pear/temp/jsmin/jsmin.h:29:43: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’
extern void free_jsmin_obj(jsmin_obj *jmo TSRMLS_DC);
^~~~~~~~~
/tmp/pear/temp/jsmin/php_jsmin.c: In function ‘zif_jsmin’:
/tmp/pear/temp/jsmin/php_jsmin.c:108:44: error: expected ‘)’ before ‘TSRMLS_CC’
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z/", &javascript, &javascript_len, &ret_code) == FAILURE) {
^~~~~~~~~
/tmp/pear/temp/jsmin/php_jsmin.c:108:6: error: too few arguments to function ‘zend_parse_parameters’
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z/", &javascript, &javascript_len, &ret_code) == FAILURE) {
^~~~~~~~~~~~~~~~~~~~~
In file included from /opt/php81/include/php/main/php.h:35,
from /tmp/pear/temp/jsmin/php_jsmin.c:25:
/opt/php81/include/php/Zend/zend_API.h:335:22: note: declared here
ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
^~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/jsmin/php_jsmin.c:112:8: warning: implicit declaration of function ‘jsmin’; did you mean ‘fmin’? [-Wimplicit-function-declaration]
jmo = jsmin(javascript TSRMLS_CC);
^~~~~
fmin
/tmp/pear/temp/jsmin/php_jsmin.c:112:24: error: expected ‘)’ before ‘TSRMLS_CC’
jmo = jsmin(javascript TSRMLS_CC);
^~~~~~~~~~
)
/tmp/pear/temp/jsmin/php_jsmin.c:112:6: warning: assignment to ‘jsmin_obj *’ {aka ‘struct *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
jmo = jsmin(javascript TSRMLS_CC);
^
/tmp/pear/temp/jsmin/php_jsmin.c:124:2: warning: implicit declaration of function ‘free_jsmin_obj’; did you mean ‘free_estring’? [-Wimplicit-function-declaration]
free_jsmin_obj(jmo TSRMLS_CC);
^~~~~~~~~~~~~~
free_estring
/tmp/pear/temp/jsmin/php_jsmin.c:124:20: error: expected ‘)’ before ‘TSRMLS_CC’
free_jsmin_obj(jmo TSRMLS_CC);
^~~~~~~~~~
)
make: *** [Makefile:208: php_jsmin.lo] Error 1
ERROR: `make' failed
Also there are some failures with zend.
Am I missing something, doing it wrong way or this extension is not ready yet for php 8.1.6?
The text was updated successfully, but these errors were encountered: