在Ubuntu 20.04.1 LTS上安装GCC 4.6.2

时间:2020-10-08 10:46:34

标签: linux bash ubuntu gcc

我目前正在使用Ubuntu 20.04.1,并且想安装GCC 4.6.2,以便可以编译cd-hit-v4.5.7-2011-12-16。

我有一个从#{3}}下载的GCC压缩版本

我已使用tar -xzf .tar.gz

提取了文件

我导航到提取的文件并使用以下命令

./contrib/download_prerequisites
./configure
make

GCC的编译开始,但是会出现此错误:

In file included from ../../.././libgcc/../gcc/tsystem.h:87:0,
                 from ../../.././libgcc/../gcc/libgcc2.c:29:
/usr/include/stdio.h:27:36: fatal error: bits/libc-header-start.h: No such file or directory
compilation terminated.
make[5]: *** [Makefile:377: _muldi3.o] Error 1
make[5]: Leaving directory '/home/user/Desktop/RETROCLONE/RETROCLONE_BCR_PROCESSING_PIPELILNE/gcc-4.6.2/x86_64-unknown-linux-gnu/32/libgcc'
make[4]: *** [Makefile:1007: multi-do] Error 1
make[4]: Leaving directory '/home/user/Desktop/RETROCLONE/RETROCLONE_BCR_PROCESSING_PIPELILNE/gcc-4.6.2/x86_64-unknown-linux-gnu/libgcc'
make[3]: *** [Makefile:110: all-multi] Error 2
make[3]: Leaving directory '/home/user/Desktop/RETROCLONE/RETROCLONE_BCR_PROCESSING_PIPELILNE/gcc-4.6.2/x86_64-unknown-linux-gnu/libgcc'
make[2]: *** [Makefile:18509: all-stage1-target-libgcc] Error 2
make[2]: Leaving directory '/home/user/Desktop/RETROCLONE/RETROCLONE_BCR_PROCESSING_PIPELILNE/gcc-4.6.2'
make[1]: *** [Makefile:23788: stage1-bubble] Error 2
make[1]: Leaving directory '/home/user/Desktop/RETROCLONE/RETROCLONE_BCR_PROCESSING_PIPELILNE/gcc-4.6.2'
make: *** [Makefile:899: all] Error 2

然后我尝试通过以下方式对此进行更改:

sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
cd /Desktop/RETROCLONE/RETROCLONE_BCR_PROCESSING_PIPELILNE/gcc-4.6.2
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
    cd ../gcc-build/
   ../gcc-4.6.2/configure --prefix=/usr \
    >     --libexecdir=/usr/lib --enable-shared \
    >     --enable-threads=posix --enable-__cxa_atexit \
    >     --enable-clocale=gnu --enable-languages=c,c++ \
    >     --disable-multilib --disable-bootstrap --with-system-zlib
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking target system type... x86_64-unknown-linux-gnu
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether ln works... yes
    checking whether ln -s works... yes
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for gawk... no
    checking for mawk... mawk
    configure: error: building out of tree but ../gcc-4.6.2 contains host-x86_64-unknown-linux-gnu.
    Use a pristine source tree when building in a separate tree

0 个答案:

没有答案