PDA

View Full Version : FC6 and binary compatibility with other distros


sleeping
4th January 2007, 10:08 PM
While I know it is quite impossible for every application to be compiled in a way that's binary compatible throughout most distros, there are a minimum set of standards (which LSB tries to enforce I think) that allow applications compiled on one distro to run on another.

I have installed Fedora Core 6 on my development machine (upgraded from FC4), and while I could compile applications on FC4 and then run them on Mandriva, Ubuntu or SuSE, now, even the simplest Hello World crashes on about any other distro with a "Floating point exception" error.

Am I missing something or something really went wrong with either FC6 or gcc (or a combination of both)? I use standard packages and my gcc is the one that came with FC6 (g++ (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30))

Hello World compiled on either Mandriva or SuSE runs fine on FC6, but when compiled on FC6, it gets an FPE on other distros. Is there a flag I could pass g++ to have it be compatible?

Thanks.

dherity
8th January 2007, 02:10 PM
This is similar to my problem. See the thread on "Binary Compatibility FC4 <-> FC6".
Did you figure it out?

sleeping
10th January 2007, 10:40 PM

This is similar to my problem. See the thread on "Binary Compatibility FC4 <-> FC6".
Did you figure it out?

Yes, looking at your thread, then at the link you provided in that thread, then at the link provided in that thread... which ends up here : http://fedora.redhat.com/docs/release-notes/fc6/en_US/sn-Devel.html#id2956225

12.2.2. GCC Compiler Collection

This release of Fedora has been built with GCC 4.1, which is included with the distribution.
12.2.2.1. Caveats

*

Fedora developers have introduced changes in the ELF .hash section that provides symbols for dynamic linking. This new .gnu.hash section, which is produced with the new default --hash-style=gnu option for gcc, serves the same purpose as previous hash sections. It provides, however, an approximately 50% increase in dynamic linking speed. Binaries and libraries produced with the new hashing function are incompatible with older glibc and dynamic linker releases. To use the old-style hashing routines for compatibility with older glibc-based systems, pass the --hash-style=sysv option instead.
(emphasis mine)

Thanks