Are libc versions tied to kernel versions?

After reading the answers to my previous question I have come to the conclusion that an answer to the following question is what I was actually looking for:

Does a particular version of the kernel require a particular version of libc to run properly?

Basically my problem stems from building an application on my 12.04 ubuntu and trying to run it on 8.04. I have since learned from this and other stackexchange forums that it is backward compatibility of libc that causes these problems. Therefore what I am perhaps naively trying to do is build the same version of libc that exists on my target and then link against that on my host when I build the application. Then in an ideal world when I copy this to the host, having been linked to the "correct" libc it should work (in my head at least). I have been totally unable to find a way to install an older libc on my system, and wondered if each version is tightly bound to a kernel version, hence the above question.


They are tied to each other, in a way.

  • The kernel you're running on was compiled with a specific libc.
  • The libc you have was compiled to only support kernels above a specific version.

So if you are installing the kernel packages and libc packages from the Ubuntu repos, as opposed to compiling them yourself, you're stuck with the above dilemma.

As far as libc goes, one way to do what you propose is to compile the 12.04 kernel from source on 8.04, thus linking it against the 8.04 libc. Then you use that custom kernel to boot 12.04, upon which you compile the libc version that's on 8.04, also from source. You install that, and your applications should share the same old 8.04 libc.

I assume you are also aware that any other 12.04 libraries your application is linked against may not be available in 8.04, so you will have to compile them from source too...

To sum up, it's best to just compile on 8.04.


Does a particular version of the kernel require a particular version of libc to run properly?

Yes, unless you build the kernel yourself from source with your preferred libc version. The Ubuntu kernels are built on the LTS release prior to the target release, so the "latest" Ubuntu kernels compatible with 8.04 libc were those for Ubuntu 9.10.