Downgrade gcc 8.3.1 to gcc 4.8.5 on CENTOS 8 problem

Issues related to applications and software problems and general support
Post Reply
jing.xie
Posts: 2
Joined: 2021/05/03 05:40:42

Downgrade gcc 8.3.1 to gcc 4.8.5 on CENTOS 8 problem

Post by jing.xie » 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:1008: 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:1059: 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:23565: 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
---------------------------------------------------

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Downgrade gcc 8.3.1 to gcc 4.8.5 on CENTOS 8 problem

Post by jlehtone » 2021/05/03 10:17:30

jing.xie wrote:
2021/05/03 06:13:55
when I install gcc 4.8.5 on my machine
Why do you try to do that?

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Downgrade gcc 8.3.1 to gcc 4.8.5 on CENTOS 8 problem

Post by TrevorH » 2021/05/03 14:52:24

If you want gcc 4.8.5 then use CentOS 7 where it is the default compiler. It doesn't exist on CentOS 8.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

jing.xie
Posts: 2
Joined: 2021/05/03 05:40:42

Re: Downgrade gcc 8.3.1 to gcc 4.8.5 on CENTOS 8 problem

Post by jing.xie » 2021/05/04 01:25:41

Thanks for you answer.
I bought AMD 5950X cpu and install CENTOS 7 was failed and install CENTOS 8 succeeded. But the software I would like to use seems to denpend on the version of gcc.
Do you know a way to install CENTOS 7 on AMD 5950X cpu?

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Downgrade gcc 8.3.1 to gcc 4.8.5 on CENTOS 8 problem

Post by jlehtone » 2021/05/04 06:22:57

jing.xie wrote:
2021/05/04 01:25:41
the software I would like to use seems to denpend on the version of gcc.
I'm skeptic about such claims.

There are virtualization and containers, if one really has to.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Downgrade gcc 8.3.1 to gcc 4.8.5 on CENTOS 8 problem

Post by TrevorH » 2021/05/04 09:02:49

You could run 7 in a VM on 8.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply