sqmk / pecl-jsmin

PHP PECL extension for JavaScript minification
Other
69 stars 21 forks source link

Syntax errors in jsmin.h - cannot install on php7.4.30 #62

Open socialnicheguru opened 2 years ago

socialnicheguru commented 2 years ago

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’ 28 | extern jsmin_obj jsmin(char javascript TSRMLS_DC); | ^~~~~ /tmp/pear/temp/jsmin/jsmin.h:29:43: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 29 | 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’ 108 | 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’ 108 | if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z/", &javascript, &javascript_len, &ret_code) == FAILURE) { | ^~~~~ In file included from /usr/include/php/20210902/main/php.h:36, from /tmp/pear/temp/jsmin/php_jsmin.c:25: /usr/include/php/20210902/Zend/zend_API.h:335:22: note: declared here 335 | 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’ [-Wimplicit-function-declaration] 112 | jmo = jsmin(javascript TSRMLS_CC); | ^~~~~ /tmp/pear/temp/jsmin/php_jsmin.c:112:24: error: expected ‘)’ before ‘TSRMLS_CC’ 112 | 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] 112 | jmo = jsmin(javascript TSRMLS_CC); | ^ /tmp/pear/temp/jsmin/php_jsmin.c:124:2: warning: implicit declaration of function ‘free_jsmin_obj’ [-Wimplicit-function-declaration] 124 | free_jsmin_obj(jmo TSRMLS_CC); | ^~~~~~ /tmp/pear/temp/jsmin/php_jsmin.c:124:20: error: expected ‘)’ before ‘TSRMLS_CC’ 124 | free_jsmin_obj(jmo TSRMLS_CC); | ^~~~~~ | ) make: *** [Makefile:211: php_jsmin.lo] Error 1 ERROR: `make' failed

andypost commented 2 years ago

btw I used to file https://github.com/sqmk/pecl-jsmin/pull/60 which were working this time for me

socialnicheguru commented 2 years ago

I am running php7.4.30. I do have php8.1 installed on the server however