Hello,
The errors you see are likely not from CDT or Eclipse.
Are you building the gdb on the same system that you run it on later or are you perhaps building it on some other system
with a newer version of libstdc++?
The errors are usually an indicator that the libs used to link the application is newer than the ones used to run the application
and there might be some ABI incompatibility.
Another potential reason is that you are using the LD_LIBRARY_PATH environment variable, but I do not think you are based
on that the lib is found in /lib64/.
Could you perhaps run
ldd /somepath/bin/gdb in a terminal and paste the result?
Maybe gdb loads some library that requires a different version of libstdc++ than what is provided in RHEL7?
Another step would be to do a small wrapper script that you run instead of your home built gdb that simply saves the environment
variables to a file that you can review.
Something as simple as this would do:
#!/bin/bash
declare > /tmp/gdb.env
ldd /somepath/bin/gdb >> /tmp/gdb.env
/somepath/bin/gdb "$@"
Then review the content of /tmp/gdb.env and it should contain both the environment and also what libraries that was used
to start gdb.
Kind regards,
Torbjörn
From: cdt-dev <cdt-dev-bounces@xxxxxxxxxxx>
On Behalf Of Sai Krishna Tati Pati
Sent: den 3 mars 2021 12:30
To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
Subject: [cdt-dev] CDT support for GDB 10.1 - Issue with gdb --version on Eclipse
Hi CDT devs,
I was experimenting with a combination of CDT 9.10, Eclipse 4.14 and gdb 10.1.
I am seeing some issues with this combination. It will be great if someone can help me out here. :)
Pre-requesities
1) I downloaded the package at
https://www.eclipse.org/downloads/packages/release/2019-12/r/eclipse-ide-cc-developers with CDT 9.10.
2) Downloaded the source of gdb 10.1 from
https://ftp.gnu.org/gnu/gdb/
3) I followed the steps mentioned in
http://www.gdbtutorial.com/tutorial/how-install-gdb to install gdb.
4) I installed gdb at other location than the default "/usr/local/bin" using "./configure --prefix=/my/custom/location" during the configure step in point 3.
Configuration
RHEL 7 - Red Hat Enterprise Linux Workstation release 7.3 (Maipo)
No sudo access.
On eclipse
1) I created a "c managedbuild project"
2) In the source file, just added some integers and initialized them with some values.
3) Built the project.
4) Created a new debug configuration and changed the gdb to use using the Debugger tab of the debug configurations dialog.
5) Clicking on "Debug" is giving me the following error.
Could not determine GDB version using command: /somepath/bin/gdb --version
/somepath/bin/gdb: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /somepath/bin/gdb)
/somepath/bin/gdb: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /somepath/bin/gdb)
/somepath/bin/gdb: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /somepath/bin/gdb)
Now, this is not seen when I am running gdb on the terminal.
I have two questions..
Does this have anything to do with the earlier CDT and Eclipse that I am using?
Is gdb10.1 support added in CDT? If yes, what is the earliest CDT where it is supported?
Thanks
Sai Krishna.