• Register
1 vote

Problem :

I want to run the newly compiled binary on some of the very oldish 32bits RedHat distribution.
This binary is compiled C (not C++) on the CentOS 32bits VM running the libc v2.12.

RedHat complains about the libc version as below:

“Error while loading shared libraries: requires glibc 2.5 or later dynamic linker”

Since the program is very simplistic, that’s why it is most likely not using anything new from the libc.

Is there any way to reduce the libc version requirement?

6 5 3
7,540 points

1 Answer

0 votes

Solution :

I already had the same problem in the recent past while I was trying to compile the little tool which I wrote for the old machine for which I had not any compiler. I compiled it on the up to date machine, and that binary required at least GLIBC 2.14 in order to run it.

By making the dump of a binary with xxd, I found below lines :

5f64 736f 5f68 616e 646c 6500 6d65 6d63  _dso_handle.memc
7079 4040 474c 4942 435f 322e 3134 005f  py@@GLIBC_2.14._

So I simply replaced my memcpy calls in the code by the call to a home-made memcpy, and a dependency with a glibc 2.14 magically disappeared.

I hope the above solution helps you in resolving your issue.

9 7 4
38,600 points

Related questions

1 vote
2 answers 93 views
Problem : I am trying to learn the GCC. If I execute the below command then I always face the following error. make -j4 Error received: checking for suffix of object files... configure: error: in `/mnt/LFS/source/gcc-4.6.2/x86_64-lfs-linux-gnu/libgcc': configure: ... See `config.log' for more details. make[1]: *** [configure-target-libgcc] Error 1 Can somebody guide me in fixing above error?
asked Mar 27 morrisBson 3.2k points
2 votes
1 answer 30 views
Problem: I started learning C++ programming recently and trying to write my very first program in C++. Here is my sample code #include <iostream> #include <Stdio.h> using namespace std; int main(){ cout << "I am a C++ program" << endl; return 0; } As ... last thirty minutes and failed to gather the information about it. Could you, please save my day? I must recognize your kind help. Thanks, guys.
asked Apr 16 Gavin 15.3k points
0 votes
1 answer 63 views
Problem : I am facing following MinGW issue: 'gcc' is not recognized as an internal or external command, operable program or batch file.
asked Nov 18, 2019 peterlaw 6.9k points
1 vote
1 answer 273 views
Problem: I am very new to Programming. I want to compile my recently written program it is called myes3 but when I try to write from the terminal: gcc myes3.c -o myes3 I always face below error message: /usr/lib/gcc/i686-linux-gnu/4.4.5/../../. ... collect2: ld returned 1 exit status I have very elementary knowledge of programming so unable to fix above error. Please help me in fixing above error.
asked May 27 Martin K 6.6k points
1 vote
1 answer 19 views
Problem: I am getting an error message: windows error 2 occurred while loading the java VM I was just wondering if anyone had seen this kind of error before and if so, how to solve it. The very few answers I can find online relate to this issue. Somebody please step ahead and pull me up. Thanks
asked Mar 26 Gavin 15.3k points