-1

I am trying to install a program on CentOS 6.10 and at the end of the installation, it gave an error saying that Glibc-2.14 is necessary. I upgraded the current Glibc and this time the error below occurred:

* These critical programs are missing or too old: gcc * Check the INSTALL file for required versions.

I upgraded the gcc and tried to configure again. However, the same error persists. Hence I read the INSTALL file as it suggests, and I see this section:

You may also need to reconfigure GCC to work with the new library. The easiest way to do that is to figure out the compiler switches to make it work again (`-Wl,--dynamic-linker=/lib/ld-linux.so.2' should work on GNU/Linux systems) and use them to recompile gcc.

So should I go to where gcc is built and do: $ ./configure -Wl,--dynamic-linker=/lib/ld-linux.so.2 ?? Do I understand the instructions correctly? If so, then how will I be able to configure only gcc and not the other executable files as they are all in the same folder? (e.g gcc-5, git, idle, python, python-build.. etc) The directory is something like: home/linuxbrew/.linuxbrew/bin/gcc

I'm asking this because GNU compiler and GCC are fundamental in Linux system, and I'm not sure if those are the correct steps.

lale
  • 21
  • 2
  • What is your GCC version and which GCC version is required? Maybe this helps: https://access.redhat.com/documentation/en-us/red_hat_developer_toolset/7/html/user_guide/chap-gcc – Erki Aring Jan 17 '19 at 14:25
  • @ErkiA it prints: gcc (Homebrew gcc 5.5.0_4) 5.5.0 when I type gcc --version. No specific version is described in the error notes. Thank you for the suggestion. – lale Jan 18 '19 at 10:26
  • @jww you probably recommend https://unix.stackexchange.com/ then? – lale Jan 18 '19 at 10:28
  • Perhaps https://stackoverflow.com/a/74195386/7268445 will help – Bart Oct 25 '22 at 14:11

1 Answers1

0

You are probably using a really old compiler (the one that comes with CentOS by default).

You need to install Red Hat Developer Toolset which provides up-to-date versions, see https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/ for more details:

Developer Toolset is designed for developers working on CentOS or Red Hat Enterprise Linux platform. It provides current versions of the GNU Compiler Collection, GNU Debugger, and other development, debugging, and performance monitoring tools.

Maxim Egorushkin
  • 131,725
  • 17
  • 180
  • 271
  • Red Hat engineering is so f**k'd up at times. They make the typical use case the special case; and a useless case the default one. Who the hell wants to run 10 year old abandoned software by default, and then do something special to run current software? Epic engineering failure... – jww Jan 17 '19 at 20:01
  • Maxim, thank you for your suggestion. However, looks like it's already installed on the system (when I type yum list devtoolset-7\* it lists many tools: Available Packages devtoolset-7.x86_64 7.1-4.el6 centos-sclo-rh devtoolset-7-all.x86_64 7.0-5.el6 centos-sclo-rh devtoolset-7-binutils.x86_64 2.28-11.el6 centos-sclo .... and so on. – lale Jan 18 '19 at 10:41
  • @lale When you compile software you may need to specify explicitly the compilers, otherwise it uses the system default ones. E.g. `CC=gcc7 CXX=g++7 make ...`. – Maxim Egorushkin Jan 18 '19 at 10:44
  • @MaximEgorushkin thanks, I'll definitely keep that in mind. – lale Jan 18 '19 at 10:47