I am trying to compile phpcompiler from source using this configure command.
./configure --prefix=/opt/phc-0.3.0.1/ --with-php=/opt/php-5.3.17/
The configure error was,
checking for exit in -lboost_regex-mt... no
checking for exit in -lboost_regex-mt... (cached) no
checking for exit in -lboost_regex... no
checking for exit in -lboost_regex... (cached) no
checking for exit in -lboost_regex... (cached) no
configure: error: Could not link against boost_regex
Thats completely wrong as I have both boost and boost_regex packages installed. Both libs and header files. Then I dug this in the config.log file
configure:17053: g++ -o conftest -g -O2 -L/lib/php5 -L/usr/lib/php5 conftest.cpp /usr/lib/libCrun.so.1 -lphp5 -L/opt/php-5.3.17//lib -R/opt/php-5.3.17//lib -ldl >&5
g++-4.6.real: error: /usr/lib/libCrun.so.1: No such file or directory
g++-4.6.real: error: unrecognized option '-R'
So, for this unrecognized option '-R' error, many -lboost_regex checks were failed!
How can I fix this? is there any file that I can edit to fix it? And why -R is used? I think it would be -L flag.
As your comment indicates that this
-Roption comes fromconfigure, the following line inm4/php-embed.m4appears to be the most likely source:If you look at
configure, all other occurrences of-Rwill write that as${wl}-R, where${wl}will most likely expand to-Wl,. So one way to fix this would be adding the${wl}before-Rin the above line and runningautogen.shto recreateconfigure.You may whish to file a bug for this, after checking existing ones.