【问题标题】:install gcc 4.9 under suse10, "checking whether to enable maintainer-specific portions of Makefiles... no"在 suse10 下安装 gcc 4.9,“检查是否启用 Makefiles 的维护者特定部分...否”
【发布时间】:2015-02-18 04:58:34
【问题描述】:

我通过以下步骤安装 gcc 4.9

wget ftp://mirrors.kernel.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.gz
tar -zxvf gcc-4.9.0.tar.gz
cd gcc-4.9.0 
./contrib/download_prerequisites
cd ..
mkdir gcc-build-4.9.0
cd gcc-build-4.9.0
../gcc-4.9.0/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib

当我运行最后一个命令时,它会显示错误消息并停止

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... gawk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
configure: WARNING: using in-tree ISL, disabling version check
configure: WARNING: using in-tree CLooG, disabling version check
*** This configuration is not supported in the following subdirectories:
     gnattools target-libada target-libgfortran target-libgo target-libffi target-libbacktrace target-zlib target-libjava target-libobjc target-boehm-gc
    (Any other directories should still work fine.)
checking for default BUILD_CONFIG... bootstrap-debug
checking for --enable-vtable-verify... no
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for lipo... no
checking for nm... nm
checking for ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking for objcopy... objcopy
checking for objdump... objdump
checking for readelf... readelf
checking for cc... cc
checking for c++... c++
checking for gcc... gcc
checking for gcj... no
checking for gfortran... gfortran
checking for gccgo... no
checking for ar... no
checking for ar... ar
checking for as... no
checking for as... as
checking for dlltool... no
checking for dlltool... no
checking for ld... no
checking for ld... ld
checking for lipo... no
checking for lipo... no
checking for nm... no
checking for nm... nm
checking for objdump... no
checking for objdump... objdump
checking for ranlib... no
checking for ranlib... ranlib
checking for readelf... no
checking for readelf... readelf
checking for strip... no
checking for strip... strip
checking for windres... no
checking for windres... no
checking for windmc... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target gccgo... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target readelf... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
configure: creating ./config.status
config.status: creating Makefile

错误是“检查是否启用 Makefile 的维护者特定部分...否” 有什么想法吗?

【问题讨论】:

  • 这不是错误消息。该脚本成功运行并创建了一个 Makefile。只需运行make
  • 赞成使用contrib/download_prerequisites 脚本而不是尝试自己安装先决条件。

标签: c++ gcc opensuse suse gcc4


【解决方案1】:

正如已经提到的评论,没有错误。下一步是实际开始构建编译器,然后安装它。例如。像


# How many cpu's to use
NCPUS=4
make -j $NCPUS && make install

请注意,由于您没有为您的配置命令指定前缀,默认将是/usr/local,这可能不是您想要的。所以我建议重新运行配置,并添加类似--prefix=/home/sleepworm/gcc-install-4.9.0

另外,4.9.2 已经发布了一些错误修正,为什么还要构建 4.9.0?

FWIW,“检查是否启用 Makefiles 的维护者特定部分...否”可以通过传递 --enable-maintainer-mode 来更改配置。它确实启用了一些额外的东西,例如重新生成某些文件等,只有当您希望开发 gcc 而不是使用 gcc 开发时才会感兴趣。

【讨论】:

  • 没有--prefix,默认是/usr/local/,它可能不会覆盖系统编译器(但是你说覆盖系统编译器是一个坏主意是对的,我总是更喜欢无论如何都要使用明确的--prefix)。我希望我能给你另一个投票来质疑选择 4.9.0 而不是 4.9.2...我不明白为什么这么多人这样做。
  • @JonathanWakely:哎呀,默认前缀当然是对的。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-06-12
  • 1970-01-01
  • 2016-04-26
  • 1970-01-01
  • 1970-01-01
  • 2015-06-07
相关资源
最近更新 更多