pbiggar / phc

A compiler for PHP
132 stars 37 forks source link

Error: gcc exited with error 256 #159

Open pbiggar opened 9 years ago

pbiggar commented 9 years ago
What steps will reproduce the problem?
1../configure 
2.install phc 
3.compiling a hello world example with following command:
phc -c helloworld.php -o helloworld

What is the expected output? What do you see instead?
i see following error message:

Error: gcc exited with error 256 (executed via 'gcc -I/usr/local/include/php -I/usr/local/include/php/main
-I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -L/usr/local/lib -Wl,-R/usr/local/lib
-lphp5 -xc - -O2 -DNDEBUG -g -otest ')

What version of the product are you using? On what operating system?
i use las svn of phc, and php version 5.3.26,

Please provide any additional information below.
i don't know why because i use last svn version phc but i get this message yet! do
you know why?

Original issue reported on code.google.com by masadeghister on 2013-07-28 08:00:36

pbiggar commented 9 years ago
Hello,

   The problem happens when linking against the libphp5. I don't know why, but if we
move the -lphp5 to the end of the gcc command line we can achieve our desired goal.
I have pushed a commit to the svn trunk to fix this issue. Please update your trunk
with the latest, compile and check again.

   If you are considering using code generator, I strongly suggest you to try with
php 5.2.x. phc is known to be broken with newest versions of PHP.

  []z, Andrei

Original issue reported on code.google.com by logytech on 2013-07-28 13:40:54