zenovich / runkit

Runkit (official PECL PHP Runkit extension)
http://pecl.php.net/runkit
Other
611 stars 136 forks source link

runkit does not compile against php 5.4 #17

Closed ubermuda closed 12 years ago

ubermuda commented 12 years ago

Trying to compile runkit against php 5.4RC5 on Macos Lion, I get the following error:

/Users/ash/git/runkit/runkit.c: In function 'php_runkit_register_auto_global':
/Users/ash/git/runkit/runkit.c:285: warning: passing argument 3 of 'zend_register_auto_global' makes integer from pointer without a cast
/Users/ash/git/runkit/runkit.c:285: error: too few arguments to function 'zend_register_auto_global'
/Users/ash/git/runkit/runkit.c: In function 'zm_deactivate_runkit':
/Users/ash/git/runkit/runkit.c:378: warning: passing argument 2 of 'zend_hash_apply' from incompatible pointer type
/Users/ash/git/runkit/runkit.c:388: warning: passing argument 2 of 'zend_hash_apply' from incompatible pointer type
/Users/ash/git/runkit/runkit.c:396: warning: passing argument 2 of 'zend_hash_apply_with_arguments' from incompatible pointer type
make: *** [runkit.lo] Error 1

Not sure what other infos I should include here, just ask and I'll provide!

mikeyp commented 12 years ago

Confirmed same failure on 5.4.0 on Lion.

gsuess commented 12 years ago

Same on Ubuntu 11.10

LeonBlade commented 12 years ago

Confirmed on Mac OS X 10.7.2 PHP 5.4.0.

amal commented 12 years ago

Confirmed on Ubuntu 11.04 PHP 5.4.2

mtorromeo commented 12 years ago

I successfully compiled runkit on php 5.4.3 with this set of changes: https://github.com/mtorromeo/runkit/compare/1e98a9e256...725defd0cc

I am not sure if everything is fine, the test suite has some failures. A couple of them are surely related to features that were removed in php 5.4 but I am not sure about the others.

freeone3000 commented 12 years ago

With PHP 5.4.4, zend_auto_global_disable_jit was removed from the public API. Commenting out this function allowed a compile-and-load. Test suite refuses to run at all.

Changes are in runkit.c and runkit_sandbox.c, simply commenting out the function calls to zend_auto_global_disable_jit. Sorry for not posting a git fork.

zenovich commented 12 years ago

PHP5.4.x is supported since the 3b227ecae13a8df89fb9910d4976098da192e7f9. Please, check if it works now.

bkonia commented 12 years ago

I'm getting an error when installing the latest build:

[root@web1 zenovich-runkit-d791284]# pecl install package.xml parsePackageName(): invalid package name "package.xml" in "package.xml" XML Error: 'XML_ERR_NAME_REQUIRED' on line '47' install failed

zenovich commented 12 years ago

Sorry for that. It should be OK after b82db510601a6a3a03412e5edefa6d380892a53b

bkonia commented 12 years ago

Yes, that fixed the compile error. However, after testing this, it seems it's not able to redefine a system-predefined constant like E_DEPRECATED. Is that correct? Is there any way to accomplish that?

zenovich commented 12 years ago

Yes, this is correct. The runkit always used to work this way. Sorry, this behaviour cannot be changed, since non-user-defined constants are persistent for all threads.