我正在运行Linux,如下所示:
dbliss@nx4[objdir]> uname -a
Linux nx4.priv 2.6.32-573.3.1.el6.x86_64 #1 SMP Thu Aug 13 22:55:16 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
dbliss@nx4[objdir]> cat /etc/*release
CentOS release 6.7 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
CentOS release 6.7 (Final)
CentOS release 6.7 (Final)
我刚刚下载了
4.8.4
的gcc
版本,并尝试如下进行配置和构建:dbliss@nx4[objdir]> ~/srcdir/configure --prefix=$HOME --with-gmp=$HOME
dbliss@nx4[objdir]> make
这些命令的最后一个引发以下错误:
make[5]: Entering directory `/home/despo/dbliss/objdir/x86_64-unknown-linux-gnu/32/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
DEFINES='' HEADERS='/home/despo/dbliss/srcdir/libgcc/config/i386/value-unwind.h' \
/home/despo/dbliss/srcdir/libgcc/mkheader.sh > tmp-libgcc_tm.h
/bin/sh /home/despo/dbliss/srcdir/libgcc/../move-if-change tmp-libgcc_tm.h libgcc_tm.h
echo timestamp > libgcc_tm.stamp
/home/despo/dbliss/objdir/./gcc/xgcc -B/home/despo/dbliss/objdir/./gcc/ -B/home/despo/dbliss/x86_64-unknown-linux-gnu/bin/ -B/home/despo/dbliss/x86_64-unknown-linux-gnu/lib/ -isystem /home/despo/dbliss/x86_64-unknown-linux-gnu/include -isystem /home/despo/dbliss/x86_64-unknown-linux-gnu/sys-include -g -O2 -m32 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong-double-80 -I. -I. -I../../.././gcc -I/home/despo/dbliss/srcdir/libgcc -I/home/despo/dbliss/srcdir/libgcc/. -I/home/despo/dbliss/srcdir/libgcc/../gcc -I/home/despo/dbliss/srcdir/libgcc/../include -I/home/despo/dbliss/srcdir/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c /home/despo/dbliss/srcdir/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
In file included from /usr/include/features.h:385:0,
from /usr/include/stdio.h:28,
from /home/despo/dbliss/srcdir/libgcc/../gcc/tsystem.h:87,
from /home/despo/dbliss/srcdir/libgcc/libgcc2.c:27:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
# include <gnu/stubs-32.h>
^
compilation terminated.
make[5]: *** [_muldi3.o] Error 1
make[5]: Leaving directory `/home/despo/dbliss/objdir/x86_64-unknown-linux-gnu/32/libgcc'
make[4]: *** [multi-do] Error 1
make[4]: Leaving directory `/home/despo/dbliss/objdir/x86_64-unknown-linux-gnu/libgcc'
make[3]: *** [all-multi] Error 2
make[3]: Leaving directory `/home/despo/dbliss/objdir/x86_64-unknown-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/home/despo/dbliss/objdir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/despo/dbliss/objdir'
make: *** [all] Error 2
我从中得到的是
make
需要stubs-32.h
中的文件/usr/include/gnu/
,但是找不到它。但是,我在此目录中确实有一个文件
stubs-64.h
:dbliss@nx4[objdir]> ls /usr/include/gnu
libc-version.h lib-names.h stubs-64.h stubs.h
我的问题是,我应该在对
configure
的调用中以某种方式指定我使用的是64位系统,因此应该使用stubs-64.h
吗?还是始终需要stubs-32.h
?如果需要stubs-32.h
,对我来说,获取和安装它的最佳方法是什么—鉴于我不是此计算系统的管理员,并且需要在本地安装(并且make
在本地找到它)。 最佳答案
在Ubuntu上
sudo apt install libc6-dev:i386