编译GCC 5.3.0时出现编译器错误(-Lyes/lib和-Iyes/include)

编译GCC 5.3.0时出现编译器错误(-Lyes/lib和-Iyes/include),gcc,configure,Gcc,Configure,当试图编译GNU GCC 5.3.0时,我在尝试构建libjavamath.la时遇到了以下错误 /bin/bash ../../../libtool --tag=CC --mode=link /home/borish/Downloads/gcc-build/./gcc/xgcc -B/home/borish/Downloads/gcc-build/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-un

当试图编译GNU GCC 5.3.0时,我在尝试构建
libjavamath.la
时遇到了以下错误

/bin/bash ../../../libtool --tag=CC   --mode=link /home/borish/Downloads/gcc-build/./gcc/xgcc -B/home/borish/Downloads/gcc-build/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include    -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long  -Iyes/include -g -O2 -module -version-info 0:0:0 -no-undefined -Lyes/lib -lgmp -avoid-version  -o libjavamath.la -rpath /usr/local/lib/../lib64/gcj-5.3.0-16 gnu_java_math_GMP.lo ../../../native/jni/classpath/jcl.lo 
../../../libtool: line 5209: cd: yes/lib: No such file or directory
libtool: link: cannot determine absolute directory name of `yes/lib'
Makefile:403: recipe for target 'libjavamath.la' failed
这是在安装了GCC 4.9.2-10的Debian 8.4系统上。我相信我已经满足了所有的要求

有什么想法吗

更新:

我使用以下方法运行配置脚本:

../gcc-5.3.0/configure --disable-multilib --with-mpc --with-isl --with-mpfr --with-gmp

在启动
配置
脚本时,罪魁祸首似乎是
--带有gmp
--带有mpc
--带有mpfr
开关。我怀疑由于
libgmp
libmpc
libmpfr
的先决条件,
configure
脚本中的bug功能将包括违规的
-I
-L
指令。在根Makefile中包含它们中的任何一个都将导致以下结果

HOST_GMPLIBS = -Lyes/lib -lmpc -lmpfr -lgmp
HOST_GMPINC = -Iyes/include 
我还没有在任何其他Makefile中证实这一点,但我怀疑其他地方也发生了类似的事情,这就是我在尝试构建
libjavamath.la
时遇到的情况

/bin/bash ../../../libtool --tag=CC   --mode=link /home/borish/Downloads/gcc-build/./gcc/xgcc -B/home/borish/Downloads/gcc-build/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include    -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long  -Iyes/include -g -O2 -module -version-info 0:0:0 -no-undefined -Lyes/lib -lgmp -avoid-version  -o libjavamath.la -rpath /usr/local/lib/../lib64/gcj-5.3.0-16 gnu_java_math_GMP.lo ../../../native/jni/classpath/jcl.lo 
../../../libtool: line 5209: cd: yes/lib: No such file or directory
libtool: link: cannot determine absolute directory name of `yes/lib'
Makefile:403: recipe for target 'libjavamath.la' failed

解决方法是在configure调用中省略这些开关。在任何情况下都应该包含它们,因为如果它们不在主机上,配置脚本将失败。

听起来您没有正确运行“配置”。例如:

好的,我已经看到一个问题,“--with jasper”选项必须指向 例如,“jasper”安装的前缀

$./configure --with-jasper=/usr/local/jasper --with-png-support.
否则,将值“是”设置为前缀

例如,如果您看这里:

您将看到一个类似于
”--headers=directory'
的标志要求您输入目录路径。我怀疑同样的事情也发生在你的“-与mpc”等


建议:清理构建目录,然后(小心地!)重新运行
/configure

-Lyes/lib
在我看来很奇怪。显然,问题的关键在于
libtool
文件。
yes/lib
来自哪里?另外,
configure
命令的外观也很有趣。@RuslanOsmanov它在几个Makefiles中被引用,并且通常与
libgmp
关联。我再次尝试使用XXX
开关,不使用所有的
,只包括
--禁用多库
,看看会发生什么。@palsm4否;主机上的任何位置都没有这样的目录。有一个名为
/usr/bin/yes
()的文件,但没有文件夹。看起来配置脚本根据switches.Yup插入了一个
yes
。下面是一个示例,说明了如果您未能提供参数或其他参数,“configure”如何将“yes”作为前缀插入:。建议:清理所有内容,然后重新运行。./configure.@paulsm4是的,这就是我要做的。