Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
862 views
in Technique[技术] by (71.8m points)

c - /lib64/libc.so.6: version `GLIBC_2.14' not found

I am facing the following error regarding glibc.

./simulator: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./simulator)

I have gone through several documents regarding this error and I understand that the program simulator was compiled with higher version of glibc and the machine it is running on has a lower version. simulator was compiled with glibc 2.19 on Ubuntu 14.04 machine. So why am I getting GLIBC_2.14 error ? Shouldn't it be 2.19 error ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

So why am I getting GLIBC_2.14 error?

Because your program depends on a symbol with that version, and you are running it on a system which doesn't provide it.

Shouldn't it be 2.19 error?

No.

When a new symbol is introduced, it gets a version assigned to it. Usually that version is the not yet released glibc version, i.e. if the current released version is 2.13, the new symbol gets version 2.14 assigned to it.

That version stays with this symbol (unless a new and incompatible version of the same symbol is introduced later).

The x86_64 GLIBC-2.19 has the following versioned symbols:

$ objdump -T /lib/x86_64-linux-gnu/libc.so.6 | grep ' g ' | head
0000000000078110 g    DF .text  0000000000000124  GLIBC_2.2.5 putwchar
0000000000096a70 g    DF .text  0000000000000020  GLIBC_2.2.5 __strspn_c1
000000000010a2b0 g    DF .text  0000000000000010  GLIBC_2.4   __gethostname_chk
0000000000096a90 g    DF .text  000000000000001a  GLIBC_2.2.5 __strspn_c2
0000000000110570 g    DF .text  00000000000000a5  GLIBC_2.2.5 setrpcent
00000000000a7ba0 g    DF .text  000000000000000a  GLIBC_2.2.5 __wcstod_l
0000000000096ab0 g    DF .text  0000000000000022  GLIBC_2.2.5 __strspn_c3
00000000000fa950 g    DF .text  0000000000000021  GLIBC_2.3.2 epoll_create
000000000010a2c0 g    DF .text  0000000000000010  GLIBC_2.4   __getdomainname_chk
00000000000fab60 g    DF .text  0000000000000021  GLIBC_2.2.5 klogctl
....

That is, if I link a program that calls putwchar, I will need at minimum version 2.2.5, but if my program also calls epoll_create, then I will need a minimum version of 2.3.2.

Your program calls some symbol with version GLIBC_2.14, most likely this one:

0000000000091620 g   iD  .text  000000000000003d  GLIBC_2.14  memcpy

Your program is known to not call any of the symbols below (or you would have gotten a different required version):

$ objdump -T /lib/x86_64-linux-gnu/libc.so.6 | egrep 'GLIBC_2.1[5-9]'
000000000010ab30 g    DF .text  0000000000000014  GLIBC_2.16  __ppoll_chk
00000000001087d0  w   DF .text  000000000000003e  GLIBC_2.17  clock_getcpuclockid
000000000010aaf0 g    DF .text  0000000000000017  GLIBC_2.15  __fdelt_warn
000000000010aaf0 g    DF .text  0000000000000017  GLIBC_2.15  __fdelt_chk
000000000003c6b0 g    DF .text  00000000000000fc  GLIBC_2.18  __cxa_thread_atexit_impl
00000000000fb070 g    DF .text  0000000000000024  GLIBC_2.15  process_vm_writev
00000000000bd420 g    DF .text  00000000000001ba  GLIBC_2.15  scandirat
00000000000af970 g    DF .text  0000000000000019  GLIBC_2.16  c16rtomb
00000000001088f0  w   DF .text  0000000000000090  GLIBC_2.17  clock_nanosleep
00000000000af6e0 g    DF .text  0000000000000282  GLIBC_2.16  mbrtoc16
00000000000a3c70  w   DF .text  0000000000000230  GLIBC_2.16  mbrtoc32
0000000000000000 g    DO *ABS*  0000000000000000  GLIBC_2.15  GLIBC_2.15
0000000000000000 g    DO *ABS*  0000000000000000  GLIBC_2.16  GLIBC_2.16
0000000000000000 g    DO *ABS*  0000000000000000  GLIBC_2.17  GLIBC_2.17
0000000000000000 g    DO *ABS*  0000000000000000  GLIBC_2.18  GLIBC_2.18
00000000000b9f40 g    DF .text  0000000000000042  GLIBC_2.16  timespec_get
0000000000083120  w   DF .text  0000000000000009  GLIBC_2.16  aligned_alloc
0000000000108810  w   DF .text  0000000000000025  GLIBC_2.17  clock_getres
0000000000108880  w   DF .text  0000000000000064  GLIBC_2.17  clock_settime
00000000000f8240  w   DF .text  0000000000000068  GLIBC_2.16  getauxval
00000000000e44f0 g    DF .text  0000000000000015  GLIBC_2.15  posix_spawn
0000000000108840  w   DF .text  000000000000003b  GLIBC_2.17  clock_gettime
00000000000a3ea0  w   DF .text  00000000000001ea  GLIBC_2.16  c32rtomb
000000000003c0b0  w   DF .text  000000000000001b  GLIBC_2.17  secure_getenv
000000000010ab10 g    DF .text  0000000000000014  GLIBC_2.16  __poll_chk
00000000000f8240 g    DF .text  0000000000000068  GLIBC_2.16  __getauxval
00000000000fb040 g    DF .text  0000000000000024  GLIBC_2.15  process_vm_readv
00000000000bd420  w   DF .text  00000000000001ba  GLIBC_2.15  scandirat64
00000000000e4510 g    DF .text  0000000000000015  GLIBC_2.15  posix_spawnp

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...