1

I downloaded glibc 2.3.1 source code and tried compiling it, the compilation failed saying gcc and make are too old:

../glibc-2.3.1_src/configure  --prefix=/home/user/download/glibc-2.3.1/install

checking version of gcc... 9.4.0, bad
checking for gnumake... no
checking for gmake... no
checking for make... make
checking version of make... 4.2.1, bad
configure: error:
*** These critical programs are missing or too old: gcc make
*** Check the INSTALL file for required versions.

This is odd as INSTALL says gcc needs to be 3.2 or newer. Yet you can see from the above message that gcc is 9.4.

You see what is wrong? How to fix it?

Rachid K.
  • 4,490
  • 3
  • 11
  • 30
my_question
  • 3,075
  • 2
  • 27
  • 44
  • Can you upload the file `config.log` somewhere we can see it? (It's too long to edit into your question.) – zwol Sep 12 '22 at 23:32
  • 1
    Your compiler is so new that it's *too new*. Unfortunately old glibc isn't usually very forwards compatible with newer GCC versions. You will not be able to compile it unless you use an older GCC version. By the way, looks like the configure script stopped because of `make`... which is also probably incompatible :') – Marco Bonelli Sep 12 '22 at 23:32
  • You could create a directory and put two scripts there, `gcc` and `make`, that just forwards the arguments given to them to the real programs - unless the `--version` argument is given, then you just fake the output so it looks like the older versions of these programs. Put that directory first in your `PATH` before running `configure`. Very hacky but may work. – Ted Lyngmo Sep 13 '22 at 00:15

2 Answers2

2

your specified glibc is ancient, released 20 years ago

2002-10-10 GLIBC 2.3.1

glibc probably has some problem recognizing or parsing versions from make and gcc that new (or the flags used to get the versions of make and gcc changed along the way)...

you are probably looking for 2020-02-01 GLIBC 2.31

Grady Player
  • 14,399
  • 2
  • 48
  • 76
0

The configure script does not check for 'too new' versions.

Fix for 'too old' make, see comment in GLIBC install failed, programs are missing or too old

Fix for 'too old' gcc: search for missing gcc in configure. Then look a bit higher (near ac_prog_version) to see 4.[3-9].* | 4.[1-9][0-9].* | [5-9].* Put | 9.* after that (where 9 denotes the gcc version you want to use).

Bart
  • 179
  • 1
  • 9