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.
strace -o st.log -s 10240 -f -e open,read ./configure
to see which files are opened and read by configure and its child processes. You can searchst.log
to see where-R
was read from, and with a bit of luck edit the file in question.-R
option is probably intended for the linker, so when you find it try adding a-Wl,
in front of it (with no space). Also, note that the-R
linker option probably really should be-rpath
(-R
behaves differently if the argument is a file or directory; if it's a directory it's treated as a-rpath
option).-Wl
? like-WlR
or-Wl-R
?-Wl,-R/opt/php-5.3.17//lib
Note the comma and there can't be any spaces (if you need spaces, use additional-Wl,
options).