Forum > Linux

Compiling under Debian

(1/5) > >>

andresayang:
Hello,

I'm using Debian 12 (testing), and I notice that If I compile under Debian 12 (or 11), binaries are not running under Debian 9 and 10. Is there any way to make binaries built on Debian 12 compatible with Debian 9 and 10 ?

Thanks

MarkMLl:
Short answer: no.

I raised this a few months ago and was sent away with a flea in my ear.

MarkMLl

andresayang:
Mark,

Thanks for answer. So I'll use Virtual machine with Debian 9 ...

Cheers

Do you know from where is coming this binary incompatibility ? (Well I need it for something else)

Fred vS:
To complete what Mark said, the main problem is the new libc.so library of Debian 12 that is not compatible with older release.T

That libc.so library is needed at linking after compilation of your program.

If you want make your program compatible with previous Debian release, compile it on a Debian version with a older libc.so.

Чебурашка:

--- Quote from: andresayang on April 13, 2023, 02:20:45 pm ---Hello,

I'm using Debian 12 (testing), and I notice that If I compile under Debian 12 (or 11), binaries are not running under Debian 9 and 10. Is there any way to make binaries built on Debian 12 compatible with Debian 9 and 10 ?

Thanks

--- End quote ---

One possibility is:

1. in your debian 12 computer create a folder say /opt/debian9
2. in your debian 12 computer create a debian 9 files tree in /opt/debian9 using debootstrap
3. in your debian 12 computer chroot into /opt/debian9
4. from within the chroot, install fpc for debian9
5. from within the chroot, compile the code using the compiler of debian9
6. from within the chroot, exit chroot
7. in your debian 12 computer, copy the resulting executable in your debian 9 machine and enjoy.

Navigation

[0] Message Index

[#] Next page

Go to full version