Any way to keep statically linked programs working on older kernels (like around 3.4)?

I’ve been building a few programs through static linking so I can run the program in different environments, with one being a system based on Debian 7.6 with 3.4 kernel.

This worked fine until very recently when I tried to run a program on that environment, that I just compiled using the same build commands as I used to. The program now immediately aborts with this error:

FATAL: kernel too old
Aborted

I suspect some most recent Stable updates to glibc and related stuffs caused this. This is devastating as I still need the program to be able to run on such environments, so now I’ll have to create another VM with a distro that ships a relatively older version of libc to keep maintaining, and I might end up locking myself out of some new, useful C++ features that I might need, due to these distros usually ship with ancient compilers.

Is there any solution inside Manjaro to resolve this at the moment?

Debian 7 reached End of Life status almost 3 years ago. Why bother supporting it?

I know Debian 7 has ended support long ago.

I’m actually trying to deploy and run my program on a device that’s running such an environment. Due to the requirement of some vendor software on that device (which I don’t have control of), it’s not a good idea to update its system version for now.

Static linking has always worked fine the last few years, until very recently, as I keep my work laptop which mainly runs Manjaro up-to-date.

But anyway, this is a good lesson learned, that even with static linking, it’ll eventually fail one day… I think I’ll just look for another suitable distro for the purpose then.

EDIT: By the way, I’m considering building the program against musl which Manjaro has a package for, but I don’t know how to let the compiler use it here, so I’m using Alpine Linux for that purpose…

EDIT 2: I’ll probably have to scrap that idea if it involves C++ threads. The programs I compiled under that environment segfaults immediately upon creating threads, and I’m currently looking for the reason…

EDIT 3: Okay. It seems that particular Alpine version (with which I set up the VM about 2 years ago) had some issues with my use case. Just built a new VM with the most recent version of Alpine and the segfault went away.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.