help-gplusplus
[Top][All Lists]
Advanced

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

Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!


From: Robert Heller
Subject: Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!
Date: Thu, 08 Feb 2007 21:35:37 +0100

At Thu, 08 Feb 2007 12:53:54 -0600 troubled_gcc_user@aol.com wrote:

> 
> I wrote this little program hello.c and compiled it on Fedora Core
> 6. It gives a Floating Point Error on Fedora Core 3. What is going on
> here????????
> 
> My problem, obviously, lies with a larger app that I compile on FC6
> and want to run on FC3, this example is just an illustration of the
> problem. I am desperate. I need to solve this shit. 
> 
> See output here:
> 
> FC6:~/tmp ==>cat hello.c
> #include <stdio.h>
> #include <stdlib.h>
> 
> int main( int argtc, char * argv[] ) {
> 
>   printf( "Hello\n" );
> 
>   exit( 0 );
> }
> FC6:~/tmp ==>gcc -o hello hello.c 
> FC6:~/tmp ==>./hello 
> Hello
> 
> @@@@@ Then I move it to a Fedora Core 3 machine and run it:
> 
> FC3: ==>./hello 
> Floating point exception (core dumped)
> 
> FC3: ==>strace ./hello 
> execve("./hello", ["./hello"], [/* 63 vars */]) = 0
> brk(0)                                  = 0x85ff000
> old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
> -1, 0) = 0xb7f4b000
> --- SIGFPE (Floating point exception) @ 0 (0) ---
> +++ killed by SIGFPE (core dumped) +++
> Process 11101 detached

I'm guessing you did not re-compile for FC3?  Most likely the Glibc is
different between FC6 and FC3 and the FC6 build is not (by default)
downward compatible.  What happens when you re-compile it *under* FC3?

>                                                                               
>       

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Linux Installation and Administration
http://www.deepsoft.com/  -- Web Hosting, with CGI and Database
heller@deepsoft.com       -- Contract Programming: C/C++, Tcl/Tk
         


reply via email to

[Prev in Thread] Current Thread [Next in Thread]