Hi!
I just compiled phc against php 5.2. Now, when I call phc to compile a simple php file, I get a 256 error from g++.
Code:
$ /usr/local/phc/bin/phc -c Hello.php -o hello
Error: gcc exited with error 256 (executed via 'gcc -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -L/usr/local/php/lib -Wl,-R/usr/local/php/lib -lphp5 -xc - -ggdb3 -O0 -ohello ')
So, I asked phc to generate C code and saved it into a file. When I tried to compile it, no surprises, it fails.... when I se the generated code, I find that main is incomplete.
File ends up like this:
Code:
int
main (int argc, char* argv[])
{
int phc_exit_status;
signal(SIGABRT, sighandler);
signal(SIGSEGV, sighandler);
TSRMLS_D;
php_embed_init (argc, argv PTSRMLS_CC);
zend_first_try
{
// load the compiled extension
zend_startup_module (&app_module_entry);
zval main_name;
ZVAL_STRING (&main_name, "__MAIN__", NULL);
zval retval;
Just like that. What's going on?