15.10.2019

Libc.so.6 Glibc_2.4 Version 4.0

92

Symbol errno, version GLIBC_2.0 not defined, in opensuse Linux 11.4. Ask Question. Version GLIBC_2.0 not defined in file libc.so.6 with link time reference.

I'm compiling my C program under Ubuntu 6.10 using KDevelop. Unfortunately, it needs to run on an embedded device with no compiler running Debian. I get the error 'version `GLIBC2.4' not found' and 'version `GCC4.2.0' not found' when I try. Now, I'm not stupid.

Obviously the compiler on the new dev machine uses glibc 2.4. The problem is I can not put a compiler on the target machine. I can add libraries, but I can't replace them, especially not if they make the existing software stop working, so I think updating glibc on the target is right out too. Unless there is a solution I'm not thinking of, I'm going to need to know how to do one of the following: 1. Make ubuntu compile using an older version of gcc and glibc 2. Make ubuntu compile self-contained programs that won't need the external glibc libraries 3. Add glibc 2.4 and gcc 4.2 libraries to the Debian system without overwriting any of the existing libraries.

Any help to do any of these (or a better solution altogether) would be appreciated. Have a look at trhe embedded system to see what revs are installed, e.g 23:32:16$ ls -l /lib/libc.so. lrwxr-xr-x 1 root root 14 2005-01-30 17:52 /lib/libc.so.5 - libc.so.5.4.44 -rwxr-xr-x 1 root root 21-02-22 02:16 /lib/libc.so.5.4.44 lrwxr-xr-x 1 root root 13 2004-11-07 20:00 /lib/libc.so.6 - libc-2.3.3.so 23:33:09$ gcc -version gcc (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Likely you can find an older distro with the required revs to install on a spare system.

Lib64 libc so 6 glibc

Then build on that system. If it's a simple matter to upgrade the embedded one, by all means do so. Another possibility is to use an older live CD to do the build - could be attractive if you don't have a spare old system. Downgrading the libc your system came with would very likely break it.

Upgrading the embedded system is safer, if you can find a build for the architecture. Static linking will give you a huge executable: 23:41:49$ gcc hello.c -static -o hello 23:42:12$ ls -l hello -rwxr-xr-x 1 dunc users 56-04-09 23:42 hello. I tried setting the -static flag in the linker section, and used the automake window to select the bin file, then configured by checking the 'do not link against shared libraries' option. Neither one actually produced a statically linked executable. I also tried importing the project into Eclipse with equal lack of luck on finding any kind of option for static linking. The project is a bit large to be compiled by hand, but if I had to use the make file I could mess with it.

I have checked and the keyword 'static' does not appear anywhere in it no matter how many times it is in the confguration for the project. KDevelop is a pretty nice development environment, but what it lacks in documentation it more than makes up for with bizarre unexpected behavior. It's actually unlikely that the apps on the embedded system 'rely' on the older glibc: glibc usualyy has a degree of backwards compatibility settable at configure time. Just what rev is installed on the embedded system now - can you post that? See my earlier post for how to find out what it is. Fo instance, if it's 2.3.something then you should be OK to upgrade to 2.4. The GCC symbols are in libgccs.so, usually found in /lib.

An upgrade should fix, but you might want to check you don't lose any old GCC symbiols. On my system: 08:24:43$ strings /lib64/libgccs.so.1 grep GCC GCC3.0 GCC3.3 GCC3.3.1 GCC3.4. Libc.so.5 is.old. very different from any libc6. Is that the latest it has? How old is the OS?

What's the linux rev?). While we're at it, what is the architecture? As long as the embedded system has the necessary disk spave, there is no problem at all installing libc6 (glibc2.x) alongside it. I have that setup in my 32-bit partition's /lib (I even have libc.so.4 for the old a.out pre-ELF format binaries). They all coexist, and don't interact. But you'll need.every.

library your app uses - ldd will tell you what these are. Ok you.do. have libc.so.6. Can you post the ldd on the build system as well please, and check whether libgccs.so.1 is a regular file there as well or a symlink. (on my system it's a symlink).

Is this a genuine 80386 btw? The 486 doesn't need a fan either so I'd have expected one of those, unless maybe you don't have a math co-processor either? The point being, you need to get libraries built for the processor (e.g. Really an i386 glibc, not i586 &c.). You are doing that when you configure the app before you build it (aren't you?). Upgrading the libraries by hand is do-able if you know what you're doing, but if you knew enough to do that then you wouldn't be asking, right?

There are lots of little pitfalls (tls/ goes away and.must. be removed, you should really have a kernel 2.6.15.1.) so let's put that option aside for now. You might get the static build to work by changing LDFLAGS or CFLAGS (i.e. Tell configure what to use). But unless your system libraries are built for the target (386), you'll run into that problem (app might start but will get illega; instrn when it tries to use an opcode you haven't got). All in all, the best option seems to me to build in an environment at the same or a lower rev than the target. That's a good rule for build environments in general.

Libgccs.so.1 exists on the development machine and is not a symlink. The embedded device is actually a dual-core Intel Xeon 3.6GHz processor, but the final unit will be a P4 1.6GHz (the test machine is way overpowered). I still have the old redhat system we used to develop on, but that is on its last legs, so I was really hoping to upgrade. It's a laptop and the batteries work fine, but the charger works most infrequently.

According to the package manager, I do have gcc 3.3 installed. So the trick is to get the #%$^#$ KDevelop to use it.

Is there a separate compiler command? What would happen if I just changed the gcc symlink to gcc-3.4? Ok so the target is a 686 - you can upgrade it by copying libraries off the development system. I know I implied it was tricky but it starts to look like the easiest option. Before you start, make sure the target system has sln: 08:01:06$ file `type -p sln` /bin/sln: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped sln is a statically-linked version of the ln command which always makes symbolic links. You shouldn't need it, but it can get you out of trouble. On the BUILD system, determine the exact rev of libc.so.6 by following symlinks using ls -l Make a list of what files to copy with this rev.

What is libc

Here's an example from my system: 08:11:41$ ls -l libc.so.6 lrwxrwxrwx 1 root root 13 2006-05-21 11:33 libc.so.6 - libc-2.3.6.so 08:14:09$ find.name '.2.3.6.' -print./libc-2.3.6.so./ld-2.3.6.so./libm-2.3.6.so./libdl-2.3.6.so./libcidn-2.3.6.so./libcrypt-2.3.6.so./libanl-2.3.6.so./librt-2.3.6.so./libnsl-2.3.6.so./libBrokenLocale-2.3.6.so./libpthread-2.3.6.so./libnssfiles-2.3.6.so./libresolv-2.3.6.so./libnssdns-2.3.6.so./libnsshesiod-2.3.6.so./libutil-2.3.6.so./libnssnis-2.3.6.so./libnssnisplus-2.3.6.so./libnsscompat-2.3.6.so That's your list. Do the same on the TARGET system. For example, my 32-bit partition: 08:18:35$ ls -l libc.so.6 lrwxr-xr-x 1 root root 13 2004-11-07 20:00 libc.so.6 - libc-2.3.3.so 08:20:53$ find. Okay, didn't have sln so I just backed up the hard drive. The technique seems to have solved the GLIBC error (I rebooted just to be sure and even the old stuff still runs) but I'm still having trouble with the '`GCC4.2.0' not found' error.

Libc.so.6 Glibc_2.4 Version 4.0

I looked into it and saw libstdc.so.6 points to libstdc.so.6.0.8 on both systems. There aren't any other libraries marked version '6.0.8' so I'm not sure what needs to be copied (if anything can be). The package manager doesn't list any support files either.

And the real source of my nervousness about using a VM is that it gives me the willies to think that I have to rely on an older OS just to compile the programs. I guess I'm a bit old fashioned about it, but I like having a little more stability in my development process. If you are getting GCC4.2.0 not found, it means you've still got something in your link that depends on a GCC 4.2 shared library (i.e. You've not succeeded in doing a GCC 3.3 build).

Lib64 Libc So 6 Glibc

Assuming your deployment system is Debian 3.1 ('sarge'), if you look at the GCC symbols in libgccs.so.1, you'll see: $ strings /lib/libgccs.so.1 grep GCC GCC3.0 GCC3.3 GCC3.3.1 GCC3.4 GCC3.4.2 i.e. No GCC4.2.0.

That's your culprit, I expect. I guess that's the shared library you want to replace, if that's what you want to do. But my instincts say that you'll have moe work going that route than VM. I shouldn't be wary about developing with Debian 3.1. It is only 2 years old and of course stable.

My preferred ISP still installs a Debian 3.1 base on new dedicated systems, using 'pinning' to allow new hardware support. I was recommended backports.org for installing new software on Debian stable branches. Apparently, you should look at sarge-backports - see - but I've not looked into it myself.

It is conceivable that you can get GCC 4.2 onto the deployment system that way. Hey, that did it! And it seems to be backwards compatible since it survived a reboot. Sorry for repeatedly dismissing teh VM solution.

While it is elegant, I'm not concerned with stability but portability. Handing off my code to someone else is going to cause untold problems if they have to install a certain version of linux or a VM with some tricky whatever. I was looking for a solution that would compile the program correctly. There was also the issue of what happens when updates come out. With any luck they won't be horrific on the compiler, especially using a stable version of debian in a VM, but when I need some new feature due to management request, I'm screwed. And updates to the embedded system are also an issue (they will continue to update for a few more years at least).

I left Windows to get away from these annoyances, not revisit them in a new and intriguing way. But thanks to both of you for getting me through this rather nasty issue.