编译 GCC 5.3.0 时出现编译器错误(-Lyes/lib 和 -Iyes/include)
Compiler Error when Compiling GCC 5.3.0 (-Lyes/lib and -Iyes/include)
尝试编译 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 系统上。我相信我已经满足了所有 prerequisites, and Google wasn't been much help.
有什么想法吗?
更新:
我将以下内容用于 运行 配置脚本:
../gcc-5.3.0/configure --disable-multilib --with-mpc --with-isl --with-mpfr --with-gmp
罪魁祸首似乎是启动 configure
脚本时的 --with-gmp
、--with-mpc
和 --with-mpfr
开关。我怀疑因为 libgmp
是 libmpc
和 libmpfr
的先决条件,所以 configure
脚本中的 bug 功能将包含有问题的 -I
和 -L
指令。包含其中任何一个都会在根 Makefile
中产生以下内容
HOST_GMPLIBS = -Lyes/lib -lmpc -lmpfr -lgmp
HOST_GMPINC = -Iyes/include
我还没有确认其他 Makefile 中的情况是否如此,但我怀疑其他地方正在发生类似的事情,这就是我 运行 在尝试构建 libjavamath.la
.
解决方法是从配置调用中省略这些开关。它们应该包含在任何事件中,因为如果主机上不存在它们,configure
脚本将失败。
听起来你 运行 "configure" 不正确。例如:
https://software.ecmwf.int/issues/browse/SUP-676
OK, I see a problem already, the "--with-jasper" option must point the
to the prefix of the "jasper" installation, for example
$./configure --with-jasper=/usr/local/jasper --with-png-support.
Otherwise the value "yes" is set as prefix..
例如,如果您看这里:
http://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html
您会看到 ‘--with-headers=directory’
之类的标志要求您输入目录路径 。我怀疑你的“-with-mpc”等也发生了同样的事情
建议:清理您的构建目录,并(小心!)重新 运行 ./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-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 系统上。我相信我已经满足了所有 prerequisites, and Google wasn't been much help.
有什么想法吗?
更新:
我将以下内容用于 运行 配置脚本:
../gcc-5.3.0/configure --disable-multilib --with-mpc --with-isl --with-mpfr --with-gmp
罪魁祸首似乎是启动 configure
脚本时的 --with-gmp
、--with-mpc
和 --with-mpfr
开关。我怀疑因为 libgmp
是 libmpc
和 libmpfr
的先决条件,所以 configure
脚本中的 bug 功能将包含有问题的 -I
和 -L
指令。包含其中任何一个都会在根 Makefile
HOST_GMPLIBS = -Lyes/lib -lmpc -lmpfr -lgmp
HOST_GMPINC = -Iyes/include
我还没有确认其他 Makefile 中的情况是否如此,但我怀疑其他地方正在发生类似的事情,这就是我 运行 在尝试构建 libjavamath.la
.
解决方法是从配置调用中省略这些开关。它们应该包含在任何事件中,因为如果主机上不存在它们,configure
脚本将失败。
听起来你 运行 "configure" 不正确。例如:
https://software.ecmwf.int/issues/browse/SUP-676
OK, I see a problem already, the "--with-jasper" option must point the to the prefix of the "jasper" installation, for example
$./configure --with-jasper=/usr/local/jasper --with-png-support.
Otherwise the value "yes" is set as prefix..
例如,如果您看这里:
http://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html
您会看到 ‘--with-headers=directory’
之类的标志要求您输入目录路径 。我怀疑你的“-with-mpc”等也发生了同样的事情
建议:清理您的构建目录,并(小心!)重新 运行 ./configure
.