[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

binary backwards compatibility

I was trying to compile a binary on Fedora 7
so that is was portable to as many systems as possible,
but was getting a "Floating point exception" at startup,
on older systems?

I.E. compile the following on Fedora 7:

#include <stdio.h>
int main(void)
    printf ("Hello world\n");
    return 0;

The resultant binary will throw a floating point exception
at startup on ubuntu breezy and debian sarge at least
(but is Ok on ubuntu feisty).

Note, if I link the binary statically on F7, then it
runs everywhere, though we're told that's a bad idea:

Note also, that binaries compiled on Feisty are Ok everywhere.
Pertinent package versions on F7 and Feisty are:
$ dpkg -l libc6 gcc | grep ii
ii  gcc            4.1.2-1ubuntu1 The GNU C compiler
ii  libc6          2.5-0ubuntu14  GNU C Library: Shared libraries
$ rpm -q glibc gcc

any ideas?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]