1

When building v8, I encounter the following error

./bytecode_builtins_list_generator: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./bytecode_builtins_list_generator)

After doing some search, I learn that I have old glibc

GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_2.18
GLIBC_PRIVATE

I know for glibc, I can build from source code from ftp.gnu.org. However I can't find glibc-3.4.21 there.

So I wonder how can I build glibc-3.4.21 from source code?


FOOTNOTE Using yum is not ok, because:

  1. My Centos is too old
  2. I don't want to replace my original glibc
Employed Russian
  • 199,314
  • 34
  • 295
  • 362
calvin
  • 2,125
  • 2
  • 21
  • 38
  • This is not just glibc, but libstdc++, which only comes with gcc. You need to build not only glibc but a newer version of gcc, too. Building gcc is a challenging task even for an experienced developer. It's twice a hard to build and install it in a way that won't brick your existing system. Your only realistic course of action is to update to the current CentOS (assuming it provides a newer-enough gcc). No other alternatives are available. – Sam Varshavchik Nov 12 '20 at 11:44
  • @SamVarshavchik OK, so if I want to build a new GCC, which version should I compile, is there a reference table from GLIBCXX version to gcc version? – calvin Nov 12 '20 at 11:57
  • I see no reason not to compile the latest version of gcc. I don't know if there's a "reference table" of some kind, if there is one it would be somewhere on gcc's site. This is such a rare, unique situation, it is unlikely that it occurs often enough to have a reference table compiled and prominently published somewhere. – Sam Varshavchik Nov 12 '20 at 11:59
  • @SamVarshavchik I am afraid that my current gcc is not new enough to compile the most recent gcc 10 – calvin Nov 12 '20 at 12:00
  • Well, so what did I say right at the beginning? "Your only realistic course of action is to update to the current CentOS". – Sam Varshavchik Nov 12 '20 at 12:01

1 Answers1

1

After doing some search, I learn that I have old glibc

No, you don't. Your problem has nothing to do with GLIBC, and everything to do with libstdc++.so (which is too old).

See this answer for more detailed explanation.

You need to install a newer version of libstdc++.so.6. The good news is that (unlike upgrading GLIBC) upgrading libstdc++ or installing a copy in your home directory and pointing to that copy with LD_LIBRARY_PATH is generally very simple.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362