g ++-4.6.real:错误:无法识别的选项"-R" [英] g++-4.6.real: error: unrecognized option '-R'

查看:126
本文介绍了g ++-4.6.real:错误:无法识别的选项"-R"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用此configure命令从源代码编译 phpcompiler .

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/

配置错误为

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 

那是完全错误的,因为我同时安装了boost和boost_regex软件包.库和头文件.然后,我在config.log文件中将其挖出

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'

因此,对于此unrecognized option '-R'错误,许多-lboost_regex检查失败!

So, for this unrecognized option '-R' error, many -lboost_regex checks were failed!

我该如何解决?我可以编辑任何文件来修复它吗?为什么使用-R?我认为这将是-L标志.

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.

推荐答案

m4/php-embed.m4 似乎是最可能的来源:

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:

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

如果您查看configure,其他所有出现的-R都将其写为${wl}-R,其中${wl}最有可能扩展为-Wl,.因此,解决此问题的一种方法是在上一行的-R之前添加${wl}并运行autogen.sh来重新创建configure.

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.

您可能希望在检查现有的问题后为此提交错误一个.

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

这篇关于g ++-4.6.real:错误:无法识别的选项"-R"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆