制作和安装gcc时遇到问题

时间:2018-03-21 18:20:36

标签: gcc makefile rhel rhel7 gcc7

我在安装gcc时遇到问题。鉴于以下信息,我做错了什么?

在我没有root权限的Linux计算机上的$HOME/gcc上,运行以下命令:

$ wget http://mirrors.concertpass.com/gcc/releases/gcc-7.3.0/gcc-7.3.0.tar.gz
$ tar xvf gcc-7.3.0.tar.gz
$ cd gcc-7.3.0
$ ./contrib/download_prerequisites

gmp-6.1.0.tar.bz2: OK
mpfr-3.1.4.tar.bz2: OK
mpc-1.0.3.tar.gz: OK
isl-0.16.1.tar.bz2: OK
All prerequisites downloaded successfully.

$ cd ..
$ mkdir test
$ cd test
$ ../gcc-7.3.0/configure --prefix=$HOME/gcc/test --disable-multilib

这里只显示几行输出:

checking build system type... x86_64-pc-linux-gnu
...
# lots of checking for, where, whether ...
...
/home/clay.stevens/package/gcc/gcc-7.3.0/missing: line 81: makeinfo: command not found
...
# lots of checking for, where, whether ...
...
config.status: creating Makefile

尝试制作:

$ make -j8

-j8标志使用8 cpus
这里只显示几行输出:

...
configure: WARNING:
*** Makeinfo is missing. Info documentation will not be built.
...
configure: WARNING: the "none" host is obsolete, use --disable-assembly
...
configure: summary of build options:

  Version:           GNU MP 6.1.0
  Host type:         none-pc-linux-gnu
  ABI:               standard
  Install prefix:    /home/user.name/gcc/test
  Compiler:          gcc -std=gnu99
  Static libraries:  yes
  Shared libraries:  no
...
...
config.status: executing default commands
make[2]: Leaving directory `/home/user.name/gcc/test'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/user.name/gcc/test'
make: *** [all] Error 2

尝试安装:

$ make install

错误:

make[1]: Entering directory `/home/user.name/gcc/test'
/bin/sh ../gcc-7.3.0/mkinstalldirs /home/user.name/gcc/test /home/user.name/gcc/test
make[2]: Entering directory `/home/user.name/gcc/test/fixincludes'
make[2]: *** No rule to make target `install'.  Stop.
make[2]: Leaving directory `/home/user.name/gcc/test/fixincludes'
make[1]: *** [install-fixincludes] Error 2
make[1]: Leaving directory `/home/user.name/gcc/test'
make: *** [install] Error 2

系统信息:

$ cat /proc/version
Linux version 3.10.0-514.el7.x86_64 (mockbuild@x86-039.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Wed Oct 19 11:24:13 EDT 2016

$ cat /etc/*release  
NAME="Red Hat Enterprise Linux Server"  
VERSION="7.3 (Maipo)"  
ID="rhel"  
ID_LIKE="fedora"  

$ lsb_release -a  
LSB Version: :core-4.1-amd64:core-4.1-noarch  
Distributor ID: RedHatEnterpriseServer  

1 个答案:

答案 0 :(得分:0)

makeinfo程序(创建GNU信息文件)不是像使用download_prerequisites下载的项目那样的先决条件。

要安装makeinfo,请运行

yum install texinfo