glibcのビルドをしようとしているのですが,失敗してしまいます.なぜでしょうか?
glibc2.20をダウンロードの後,展開し,その上でconfigureスクリプトを走らせると,以下のエラーが生じます.
$ ../configure --prefix=/opt/glibc-2.20
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
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 g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for readelf... readelf
checking for sysdeps preconfigure fragments... aarch64 alpha arm hppa i386 m68k microblaze mips powerpc s3
90 sh sparc tile x86_64 checking whether gcc compiles in -mx32 mode by default... no
configure: running configure fragment for add-on libidn
checking for assembler and linker STT_GNU_IFUNC support... yes
checking whether .text pseudo-op must be used... yes
checking sysdep dirs... sysdeps/unix/sysv/linux/x86_64/64 sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv
/linux/x86 sysdeps/unix/sysv/linux/wordsize-64 sysdeps/x86_64/nptl sysdeps/unix/sysv/linux sysdeps/nptl sy
sdeps/pthread sysdeps/gnu sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix/x86_64 sysdeps/unix sysdeps/pos
ix sysdeps/x86_64/64 sysdeps/x86_64/fpu/multiarch sysdeps/x86_64/fpu sysdeps/x86/fpu sysdeps/x86_64/multia
rch sysdeps/x86_64 sysdeps/x86 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64/wordsize-64 sysdeps/ieee754/
dbl-64 sysdeps/ieee754/flt-32 sysdeps/wordsize-64 sysdeps/ieee754 sysdeps/generic
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether as is GNU as... yes
checking whether ld is GNU ld... yes
checking for as... as
checking version of as... 2.20.51.0.2, ok
checking for ld... ld
checking version of ld... 2.20.51.0.2, ok
checking for gcc... gcc
checking version of gcc... 10.2.0, bad
checking for gnumake... no
checking for gmake... gmake
checking version of gmake... 3.81, ok
checking for gnumsgfmt... no
checking for gmsgfmt... no
checking for msgfmt... msgfmt
checking version of msgfmt... 0.17, ok
checking for makeinfo... no
checking for sed... sed
checking version of sed... 4.2.1, ok
checking for gawk... gawk
checking version of gawk... 3.1.7, ok
checking for nm... nm
configure: error:
*** These critical programs are missing or too old: gcc
*** Check the INSTALL file for required versions.
gccが古いとのことでバージョンを確認したところ,
$ gcc --version
gcc (GCC) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
比較的,新しいバージョンになります.なぜこのようなエラーが発生するのでしょうか?
【ビルド環境】
● RHEL 6.5
● gcc 10.2.0
● ld 2.20
● Make 3.81
下記,ダウンロードからビルドまでのコマンドログになります.
mkdir ~/glibc_install; cd ~/glibc_install
wget http://ftp.gnu.org/gnu/glibc/glibc-2.20.tar.gz
tar zxvf glibc-2.20.tar.gz
cd glibc-2.20
mkdir build
cd build/
../configure --prefix=/opt/glibc-2.20