Downgrade gcc 8.3.1 to gcc 4.8.5 on CENTOS 8 problem
Posted: 2021/05/03 06:13:55
There are errors when I install gcc 4.8.5 on my machine. Can you help me figure out the problem?
CPU: AMD 5950X (Ryzen 9)
Centos version: CentOS Linux release 8.3.2011
The default gcc version: gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)
Below is what I did
$ dnf install -y gcc texinfo-tex flex zip libgcc.i686 glibc-devel.i686
It shows "Error: Unable to find a match: texinfo-tex"
Then, I dowloaded gcc 4.8.5 files
$ wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.gz
$tar zxf gcc-4.8.5.tar.gz
$cd gcc-4.8.5
$./contrib/download_prerequisites
$mkdir gcc-build-4.8.5
$cd gcc-build-4.8.5
$../configure --prefix=/usr
$make
Then many "warning" information occur and the final lines are below
-----------------Error Message -----
../../gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space b 203/295
etween literal and string macro [-Wliteral-suffix] 203/295
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \ 203/295
^
In file included from ../../gcc/cp/except.c 207/295
cfns.gperf:101:1: error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inli 208/295
ne with ‘gnu_inline’ attributeh=] 209/295
cfns.gperf:26:14: note: ‘const char* libc_name_p(const char*, unsigned int)’ previously decla 209/295
red here 210/295
cfns.gperf:26:14: warning: inline function ‘const char* libc_name_p(const char*, unsigned int 211/295
)’ used but never defined 212/295
make[3]: *** [Makefile cp/except.o] Error 1 213/295
make[3]: Leaving directory '/home/Software/gcc-4.8.5/gcc-build-4.8.5/gcc' bool, boo 214/295
make[2]: *** [Makefile:4163: all-stage1-gcc] Error 2 215/295
make[2]: Leaving directory '/home/Software/gcc-4.8.5/gcc-build-4.8.5'h=] 216/295
make[1]: *** [Makefile stage1-bubble] Error 2 217/295
make[1]: Leaving directory '/home/Software/gcc-4.8.5/gcc-build-4.8.5' 217/295
make: *** [Makefile:892: all] Error 2
---------------------------------------------------
CPU: AMD 5950X (Ryzen 9)
Centos version: CentOS Linux release 8.3.2011
The default gcc version: gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)
Below is what I did
$ dnf install -y gcc texinfo-tex flex zip libgcc.i686 glibc-devel.i686
It shows "Error: Unable to find a match: texinfo-tex"
Then, I dowloaded gcc 4.8.5 files
$ wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.gz
$tar zxf gcc-4.8.5.tar.gz
$cd gcc-4.8.5
$./contrib/download_prerequisites
$mkdir gcc-build-4.8.5
$cd gcc-build-4.8.5
$../configure --prefix=/usr
$make
Then many "warning" information occur and the final lines are below
-----------------Error Message -----
../../gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space b 203/295
etween literal and string macro [-Wliteral-suffix] 203/295
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \ 203/295
^
In file included from ../../gcc/cp/except.c 207/295
cfns.gperf:101:1: error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inli 208/295
ne with ‘gnu_inline’ attributeh=] 209/295
cfns.gperf:26:14: note: ‘const char* libc_name_p(const char*, unsigned int)’ previously decla 209/295
red here 210/295
cfns.gperf:26:14: warning: inline function ‘const char* libc_name_p(const char*, unsigned int 211/295
)’ used but never defined 212/295
make[3]: *** [Makefile cp/except.o] Error 1 213/295
make[3]: Leaving directory '/home/Software/gcc-4.8.5/gcc-build-4.8.5/gcc' bool, boo 214/295
make[2]: *** [Makefile:4163: all-stage1-gcc] Error 2 215/295
make[2]: Leaving directory '/home/Software/gcc-4.8.5/gcc-build-4.8.5'h=] 216/295
make[1]: *** [Makefile stage1-bubble] Error 2 217/295
make[1]: Leaving directory '/home/Software/gcc-4.8.5/gcc-build-4.8.5' 217/295
make: *** [Makefile:892: all] Error 2
---------------------------------------------------