Skip to content
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

Support php 7 #43

Closed
alinikkhah opened this Issue Dec 5, 2015 · 11 comments

Comments

Projects
None yet
7 participants
@alinikkhah
Copy link

commented Dec 5, 2015

Does not work with php 7. Initially, it was not building, but pull-request #42 fixes those build errors.

When #42 is applied, jsmin will build, but I get a segmentation fault when using it.

sqmk added a commit that referenced this issue Dec 5, 2015

@sqmk

This comment has been minimized.

Copy link
Owner

commented Dec 5, 2015

I'll introduce a new major version of JSMin to support PHP 7.

sqmk added a commit that referenced this issue Dec 5, 2015

@Jan-E

This comment has been minimized.

Copy link
Contributor

commented Dec 6, 2015

The feature/php7 branch is compiling fine with VC14 on Windows. php_jsmin.dll will be included in my builds on https://www.apachelounge.com/viewtopic.php?t=6359 today (CET).

@sqmk

This comment has been minimized.

Copy link
Owner

commented Dec 6, 2015

It may compile fine, but usage seg faults. It appears to be a memory issue with some of the utf8 code reading javascript.

@tpneumat

This comment has been minimized.

Copy link

commented Mar 16, 2016

still nada on centos. Can't compile.

usr/local/src/pecl-jsmin/php_jsmin.c: In function ‘zif_jsmin’: /usr/local/src/pecl-jsmin/php_jsmin.c:122:63: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3 ZVAL_STRINGL(return_value, jmo->buffer.c, jmo->buffer.len, 1); ^ /usr/local/src/pecl-jsmin/php_jsmin.c:122:3: error: ‘ZVAL_STRINGL’ undeclared (first use in this function) ZVAL_STRINGL(return_value, jmo->buffer.c, jmo->buffer.len, 1); ^ /usr/local/src/pecl-jsmin/php_jsmin.c:122:3: note: each undeclared identifier is reported only once for each function it appears in /usr/local/src/pecl-jsmin/php_jsmin.c: In function ‘zif_jsmin_last_error_msg’: /usr/local/src/pecl-jsmin/php_jsmin.c:151:43: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1 RETURN_STRING("Unterminated comment", 1); ^ /usr/local/src/pecl-jsmin/php_jsmin.c:151:4: error: ‘RETURN_STRING’ undeclared (first use in this function) RETURN_STRING("Unterminated comment", 1); ^ /usr/local/src/pecl-jsmin/php_jsmin.c:154:50: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1 RETURN_STRING("Unterminated string literal", 1); ^ /usr/local/src/pecl-jsmin/php_jsmin.c:157:69: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1 RETURN_STRING("Unterminated set in Regular Expression literal", 1); ^ /usr/local/src/pecl-jsmin/php_jsmin.c:160:31: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1 RETURN_STRING("No error", 1); ^ make: *** [php_jsmin.lo] Error 1

@alinikkhah

This comment has been minimized.

Copy link
Author

commented Dec 2, 2016

Pull request #48 fixes the segfault issue for me.

@joaoguilhermels

This comment has been minimized.

Copy link

commented Feb 28, 2017

Any news?

@Hubaxis7

This comment has been minimized.

Copy link

commented Mar 1, 2017

My system: Ubuntu 16.04, PHP-dev 7.0
Help me. I'm trying to install jsmin and get an error

running: make
/bin/bash /tmp/pear/temp/pear-build-rootBqpc2w/jsmin-2.0.1/libtool --mode=compile cc -I. -I/tmp/pear/temp/jsmin -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootBqpc2w/jsmin-2.0.1/include -I/tmp/pear/temp/pear-build-rootBqpc2w/jsmin-2.0.1/main -I/tmp/pear/temp/jsmin -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/jsmin/utf8.c -o utf8.lo
libtool: compile: cc -I. -I/tmp/pear/temp/jsmin -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootBqpc2w/jsmin-2.0.1/include -I/tmp/pear/temp/pear-build-rootBqpc2w/jsmin-2.0.1/main -I/tmp/pear/temp/jsmin -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/jsmin/utf8.c -fPIC -DPIC -o .libs/utf8.o
/bin/bash /tmp/pear/temp/pear-build-rootBqpc2w/jsmin-2.0.1/libtool --mode=compile cc -I. -I/tmp/pear/temp/jsmin -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootBqpc2w/jsmin-2.0.1/include -I/tmp/pear/temp/pear-build-rootBqpc2w/jsmin-2.0.1/main -I/tmp/pear/temp/jsmin -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/jsmin/php_jsmin.c -o php_jsmin.lo
libtool: compile: cc -I. -I/tmp/pear/temp/jsmin -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootBqpc2w/jsmin-2.0.1/include -I/tmp/pear/temp/pear-build-rootBqpc2w/jsmin-2.0.1/main -I/tmp/pear/temp/jsmin -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/jsmin/php_jsmin.c -fPIC -DPIC -o .libs/php_jsmin.o
In file included from /tmp/pear/temp/jsmin/php_jsmin.c:27:0:
/tmp/pear/temp/jsmin/jsmin.h:7:40: fatal error: ext/standard/php_smart_str.h: No such file or directory
compilation terminated.
Makefile:196: recipe for target 'php_jsmin.lo' failed
make: *** [php_jsmin.lo] Error 1
ERROR: `make' failed

@Jan-E

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2017

@Hubaxis7 Did you use the PHP7 branch?
https://github.com/sqmk/pecl-jsmin/tree/feature/php7
git clone -b feature/php7 https://github.com/sqmk/pecl-jsmin.git

@Hubaxis7

This comment has been minimized.

Copy link

commented Mar 1, 2017

Thank you very helpful!

@agallewale

This comment has been minimized.

Copy link

commented Apr 20, 2017

Is there is more work required to package and move this to official pecl.php.net package repositiory?
pecl install jsmin still pulls in older version which does not build. And its latest version is 2.0.1 So perhaps 3.0.0 need to be released officially?

@sqmk

This comment has been minimized.

Copy link
Owner

commented Jan 23, 2018

Publish on pecl as 3.0. Thank you!

@sqmk sqmk closed this Jan 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.