g + + -4.6。真实:错误:未识别选项'-R'

时间:2022-09-09 07:35:45

I am trying to compile phpcompiler from source using this configure command.

我正在尝试用这个配置命令从源代码编译php编译器。

./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

这是完全错误的,因为我已经安装了boost和boost_regex包。libs和头文件。然后我在配置中挖掘这个。日志文件

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!

因此,对于这个无法识别的选项'-R'错误,许多-lboost_regex检查失败!

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.

我怎么解决这个问题?有没有我可以编辑的文件来修复它?为什么使用-R ?我想应该是-L标志。

1 个解决方案

#1


2  

As your comment indicates that this -R option comes from configure, the following line in m4/php-embed.m4 appears to be the most likely source:

正如您的评论指出的,这个-R选项来自configure,下面的行是m4/php-embed。m4似乎是最有可能的来源:

LIBS="-lphp5 -L${PHP_INSTALL_PATH}/lib -R${PHP_INSTALL_PATH}/lib $LIBS"

If you look at configure, all other occurrences of -R will 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 -R in the above line and running autogen.sh to recreate configure.

如果您查看configure,所有其他的-R事件都将写入${wl}-R, ${wl}将很可能扩展到-Wl。因此,解决这个问题的一种方法是在上面一行中添加${wl},然后运行autogen。sh重新配置。

You may whish to file a bug for this, after checking existing ones.

在检查了现有的bug之后,您可能会对其进行归档。

#1


2  

As your comment indicates that this -R option comes from configure, the following line in m4/php-embed.m4 appears to be the most likely source:

正如您的评论指出的,这个-R选项来自configure,下面的行是m4/php-embed。m4似乎是最有可能的来源:

LIBS="-lphp5 -L${PHP_INSTALL_PATH}/lib -R${PHP_INSTALL_PATH}/lib $LIBS"

If you look at configure, all other occurrences of -R will 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 -R in the above line and running autogen.sh to recreate configure.

如果您查看configure,所有其他的-R事件都将写入${wl}-R, ${wl}将很可能扩展到-Wl。因此,解决这个问题的一种方法是在上面一行中添加${wl},然后运行autogen。sh重新配置。

You may whish to file a bug for this, after checking existing ones.

在检查了现有的bug之后,您可能会对其进行归档。