小弟我最近嘗試在DEBIAN安裝GCC 4.5.0 我不知道哪兒錯了?
roger@LAPTOP-12345678:~$ mkdir thegccproject
roger@LAPTOP-12345678:~$ cd thegccproject
roger@LAPTOP-12345678:~/thegccproject$ wget https://ftp.gnu.org/gnu/gcc/gcc-4.5.0/gcc-core-4.5.0.tar.gz
--2024-09-21 20:31:36-- https://ftp.gnu.org/gnu/gcc/gcc-4.5.0/gcc-core-4.5.0.tar.gz
Resolving ftp.gnu.org (ftp.gnu.org)... 209.51.188.20, 2001:470:142:3::b
Connecting to ftp.gnu.org (ftp.gnu.org)|209.51.188.20|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 35351708 (34M) [application/x-gzip]
Saving to: ‘gcc-core-4.5.0.tar.gz’
gcc-core-4.5.0.tar.gz 100%[============================================================================>] 33.71M 3.42MB/s in 36s
2024-09-21 20:32:13 (966 KB/s) - ‘gcc-core-4.5.0.tar.gz’ saved [35351708/35351708]
roger@LAPTOP-12345678:~/thegccproject$ wget https://ftp.gnu.org/gnu/gcc/gcc-4.5.0/gcc-g++-4.5.0.tar.gz
--2024-09-21 20:32:57-- https://ftp.gnu.org/gnu/gcc/gcc-4.5.0/gcc-g++-4.5.0.tar.gz
Resolving ftp.gnu.org (ftp.gnu.org)... 209.51.188.20, 2001:470:142:3::b
Connecting to ftp.gnu.org (ftp.gnu.org)|209.51.188.20|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8472574 (8.1M) [application/x-gzip]
Saving to: ‘gcc-g++-4.5.0.tar.gz’
gcc-g++-4.5.0.tar.gz 100%[============================================================================>] 8.08M 1.50MB/s in 14s
2024-09-21 20:33:13 (584 KB/s) - ‘gcc-g++-4.5.0.tar.gz’ saved [8472574/8472574]
roger@LAPTOP-12345678:~/thegccproject$ wget https://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.bz2
--2024-09-21 20:35:31-- https://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.bz2
Resolving ftp.gnu.org (ftp.gnu.org)... 209.51.188.20, 2001:470:142:3::b
Connecting to ftp.gnu.org (ftp.gnu.org)|209.51.188.20|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1897483 (1.8M) [application/x-bzip2]
Saving to: ‘gmp-4.3.2.tar.bz2’
gmp-4.3.2.tar.bz2 100%[============================================================================>] 1.81M 334KB/s in 9.4s
2024-09-21 20:35:42 (198 KB/s) - ‘gmp-4.3.2.tar.bz2’ saved [1897483/1897483]
roger@LAPTOP-12345678:~/thegccproject$ wget https://repository.timesys.com/buildsources/m/mpc/mpc-0.8.1/mpc-0.8.1.tar.gz
--2024-09-21 20:41:01-- https://repository.timesys.com/buildsources/m/mpc/mpc-0.8.1/mpc-0.8.1.tar.gz
Resolving repository.timesys.com (repository.timesys.com)... 100.6.187.45
Connecting to repository.timesys.com (repository.timesys.com)|100.6.187.45|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 544950 (532K) [application/x-gzip]
Saving to: ‘mpc-0.8.1.tar.gz’
mpc-0.8.1.tar.gz 100%[============================================================================>] 532.18K 691KB/s in 0.8s
2024-09-21 20:41:03 (691 KB/s) - ‘mpc-0.8.1.tar.gz’ saved [544950/544950]
roger@LAPTOP-12345678:~/thegccproject$ wget https://ftp.gnu.org/gnu/mpfr/mpfr-2.4.2.tar.gz
--2024-09-21 20:45:55-- https://ftp.gnu.org/gnu/mpfr/mpfr-2.4.2.tar.gz
Resolving ftp.gnu.org (ftp.gnu.org)... 209.51.188.20, 2001:470:142:3::b
Connecting to ftp.gnu.org (ftp.gnu.org)|209.51.188.20|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1412116 (1.3M) [application/x-gzip]
Saving to: ‘mpfr-2.4.2.tar.gz’
mpfr-2.4.2.tar.gz 100%[============================================================================>] 1.35M 243KB/s in 8.6s
2024-09-21 20:46:05 (160 KB/s) - ‘mpfr-2.4.2.tar.gz’ saved [1412116/1412116]
roger@LAPTOP-12345678:~/thegccproject$ tar -xzf gcc-core-4.5.0.tar.gz
roger@LAPTOP-12345678:~/thegccproject$ rm gcc-core-4.5.0.tar.gz
roger@LAPTOP-12345678:~/thegccproject$ tar -xzf gcc-g++-4.5.0.tar.gz
roger@LAPTOP-12345678:~/thegccproject$ rm gcc-g++-4.5.0.tar.gz
roger@LAPTOP-12345678:~/thegccproject$ tar -xf gmp-4.3.2.tar.bz2
roger@LAPTOP-12345678:~/thegccproject$ rm gmp-4.3.2.tar.bz2
roger@LAPTOP-12345678:~/thegccproject$ tar -xzf mpc-0.8.1.tar.gz
roger@LAPTOP-12345678:~/thegccproject$ rm mpc-0.8.1.tar.gz
roger@LAPTOP-12345678:~/thegccproject$ tar -xzf mpfr-2.4.2.tar.gz
roger@LAPTOP-12345678:~/thegccproject$ rm mpfr-2.4.2.tar.gz
roger@LAPTOP-12345678:~/thegccproject$ mv gmp-4.3.2 gcc-4.5.0/gmp
roger@LAPTOP-12345678:~/thegccproject$ mv mpc-0.8.1 gcc-4.5.0/mpc
roger@LAPTOP-12345678:~/thegccproject$ mv mpfr-2.4.2 gcc-4.5.0/mpfr
roger@LAPTOP-12345678:~/thegccproject$ cd gcc-4.5.0
roger@LAPTOP-12345678:~/thegccproject/gcc-4.5.0$ sudo ./configure
[sudo] password for roger:
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 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 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
checking for version 0.10 of PPL... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... no
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking libelf.h usability... no
checking libelf.h presence... no
checking for libelf.h... no
checking gelf.h usability... no
checking gelf.h presence... no
checking for gelf.h... no
checking libelf/libelf.h usability... no
checking libelf/libelf.h presence... no
checking for libelf/libelf.h... no
checking libelf/gelf.h usability... no
checking libelf/gelf.h presence... no
checking for libelf/gelf.h... no
The following languages will be built: c,c++
checking for default BUILD_CONFIG... bootstrap-debug
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 cc... cc
checking for c++... c++
checking for gcc... gcc
checking for gcj... no
checking for gfortran... 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 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 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 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
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
config.status: creating Makefile
roger@LAPTOP-12345678:~/thegccproject/gcc-4.5.0$
跑前面的指令都沒有問題
但是等我跑到sudo make
指令時就出現了一些問題...
By the way, 我是用WSL(windows subsystem of Linux)
有可能是你目前系統上的texinfo版本對於 gcc-4.5.0 來說太新或太舊,在處理cppopts.texi的語法上是不相容的。這種情況下你需要調整cppopts.texi的語法,或是換不同版本的texinfo。