LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Searching for GLIBCXX_3.4.20 (https://www.linuxquestions.org/questions/linux-newbie-8/searching-for-glibcxx_3-4-20-a-4175552395/)

Mycado 09-02-2015 03:19 AM

Searching for GLIBCXX_3.4.20
 
Hello,

I want to run a program on my rhel, but seems it's missing some glibc.

About the server:
Code:

[root@xxx bin]# uname -a
Linux telesto 3.10.0-229.el7.x86_64 #1 SMP Thu Jan 29 18:37:38 EST 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@xxx bin]# more /etc/redhat-release
Red Hat Enterprise Linux Server release 7.1 (Maipo)

Bug from the app:
Code:

[root@xxx bin]# ./vcp
./vcp: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./vcp)

I check in the libstdc lib:
Code:

[root@xxx MBT]# strings /usr/lib/libstdc++.so.6 | grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBC_2.3
GLIBC_2.0
GLIBC_2.4
GLIBC_2.1
GLIBC_2.1.3
GLIBC_2.3.2
GLIBC_2.2
GLIBCXX_DEBUG_MESSAGE_LENGTH

glic from rpm:
Code:

[root@xxx bin]# rpm -q glibc
glibc-2.17-78.el7.x86_64
glibc-2.17-78.el7.i686
[root@telesto bin]# rpm -qa glibc-devel
glibc-devel-2.17-78.el7.x86_64

This server isn't connected to the internet, and I want to know which package should I install to get the GLIBCXX_3.4.20.


Thanks!

knudfl 09-02-2015 05:50 AM

Not "glibc" : G..LIBCXX.. means "gnu libc++", which we know as libstdc++, a gcc library.

GLIBCXX_3.4.20 is an object from the gcc-4.9.x libstdc++.so.6.0.20

The trick is to find a libstdc++-4.9.x, which is compiled with <=glibc-2.17 :

Found http://rpm.pbone.net/index.php3/stat...86_64.rpm.html
>>> ftp://ftp.pbone.net/mirror/ftp.sourc....99.x86_64.rpm
>> gcc-libstdc++-4.9.1-1.ram0.99.x86_64.rpm

Unpack the package in a new folder :
$ rpm2cpio gcc-libstdc++-4.9.1-1.ram0.99.x86_64.rpm | cpio -idmv
... and copy libstdc++.so.6.0.20 to /usr/lib64/
Next : 1) $ cd /usr/lib64/
2) # rm libstdc++.so.6
3) # ln -s libstdc++.so.6.0.20 libstdc++.so.6
... and you can use applications requiring "GLIBCXX_3.4.20".
( Tested OK on one of my CentOS 7 installs.)


-

Mycado 09-03-2015 03:59 AM

Quote:

Originally Posted by knudfl (Post 5414708)
Not "glibc" : G..LIBCXX.. means "gnu libc++", which we know as libstdc++, a gcc library.

GLIBCXX_3.4.20 is an object from the gcc-4.9.x libstdc++.so.6.0.20

The trick is to find a libstdc++-4.9.x, which is compiled with <=glibc-2.17 :

Found http://rpm.pbone.net/index.php3/stat...86_64.rpm.html
>>> ftp://ftp.pbone.net/mirror/ftp.sourc....99.x86_64.rpm
>> gcc-libstdc++-4.9.1-1.ram0.99.x86_64.rpm

Unpack the package in a new folder :
$ rpm2cpio gcc-libstdc++-4.9.1-1.ram0.99.x86_64.rpm | cpio -idmv
... and copy libstdc++.so.6.0.20 to /usr/lib64/
Next : 1) $ cd /usr/lib64/
2) # rm libstdc++.so.6
3) # ln -s libstdc++.so.6.0.20 libstdc++.so.6
... and you can use applications requiring "GLIBCXX_3.4.20".
( Tested OK on one of my CentOS 7 installs.)

Just tried it, and it's working perfectly.

Thanks a lot for your help :-)

avadon 04-04-2019 09:29 AM

Hello i have same issue and link not exist anymore any other? tyyyy


PS: i am run centos 7

knudfl 04-05-2019 07:12 AM

Post #4, @avadon : Welcome to LQ.

A new link, to gcc49-c++-4.9.3-1.el6.x86_64.rpm, built for EL6, EL7
https://drive.google.com/file/d/1Pwq...ew?usp=sharing
→ Provides /usr/local/gcc493/lib64/libstdc++.so.6.0.20


-

pan64 04-05-2019 07:16 AM

do you think the same lib will work on all platforms (Centos 6/7 Redhar 6/7)?

knudfl 04-05-2019 08:19 AM

Re #6.

The mentioned "gcc49-c++-4.9.3-1.el6.x86_64.rpm" is used as an extra compiler in CentOS 6, 7 and RHEL 6, 7 .... and in other rpm based OS, e.g. PCLinuxOS 2019.
https://stackoverflow.com/questions/...89915#47189915 → My answer.

`libstdc++´ in /usr/lib*/ : Usually you can use any later libstdc++.so.6.x.xx in any OS.
( If built with the same or an earlier glibc as the system glibc.)

Note : If the system libstdc++.so.6.x.xx is updated, a redo of the linking to the non-system library is required.

-

pan64 04-05-2019 08:38 AM

RHEL6 has 2.6.x and RHEL7 has 3.10.x (kernel version).
It looks strange for me (to use gcc*el6*rpm on RHEL7).

knudfl 04-05-2019 11:38 AM

Re #8.

I wouldn't know how any gcc version could be related to the kernel.
... Please explain.

pan64 04-06-2019 03:21 AM

hm. actually I think libc is strictly tied to kernel, because the kernel itself handles the hardware and has special drivers. When you develop kernel you will (may) change its internal structures, device drivers. Therefore previous version of libc may or may not work together with the newer kernel. For me it means the libc (which also belongs to a specific version of gcc) is something like a "bridge" between the compiled app and kernel. Using a different kernel/gcc will/may require a different libc too. Although there is something called backward compatibility (but that exists only among different versions of the compiler).
But I guess only, I don't know exactly how it works.

knudfl 04-06-2019 06:03 AM

Re #10.

These extra gcc´s are of course not meant for kernel compiling. Applications only.

No issues ever with my extra gcc´s. Have built those for years.
... And they are publicly available ... and frequently downloaded / used.

Some RPM examples
https://stackoverflow.com/questions/...89915#47189915

And some Ubuntu examples
https://drive.google.com/drive/folde...Jm?usp=sharing

-


All times are GMT -5. The time now is 11:57 PM.