Jump to content

Mandriva 2007/2008 incompatible?


Guest Nevermore
 Share

Recommended Posts

Guest Nevermore

Hi,

I'm having trouble running programs compiled on a Mandriva 2008.0 machine on a Mandriva 2007 one. I get the error: "Floating point exception" when running the compiled program. This even happens with the simple "Hello world!" program, in both c and c++. When the same code is compiled on the 2007 machine itself, or on a Gentoo box, it works fine.

 

2008 machine: gcc 4.2.2, kernel 2.6.22.9-desktop-1mdv

2007 machine: gcc 4.1.1, kernel 2.6.17-5mdv

 

When running "gcc -v" the "Target:" and "Configured with:" options are basically the same (2008 gcc contains a --disable-libjava-multilib)

 

Can this be solved _without_ changing anything on the 2007 machine?

 

gdb output, if that helps... (root login was intentional ;-)):

 

[root@bettie tmp]# ./tst-2008 <--- "Hello world!" compiled on mandriva 2008.0

Floating point exception (core dumped)

 

[root@bettie tmp]# gdb tst-2008 core.17190

 

GNU gdb 6.3-8mdv2007.0 (Mandriva Linux release 2007.0)

Copyright 2004 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB. Type "show warranty" for details.

This GDB was configured as "i586-mandriva-linux-gnu"...Using host libthread_db library "/lib/i686/libthread_db.so.1".

 

Reading symbols from shared object read from target memory...done.

Loaded system supplied DSO at 0xbfffe000

Core was generated by `./tst-2008'.

Program terminated with signal 8, Arithmetic exception.

 

warning: svr4_current_sos: Can't read pathname for load map: Input/output error

 

Reading symbols from /usr/lib/libstdc++.so.6...done.

Loaded symbols for /usr/lib/libstdc++.so.6

Reading symbols from /lib/i686/libc.so.6...done.

Loaded symbols for /lib/i686/libc.so.6

Reading symbols from /lib/i686/libm.so.6...done.

Loaded symbols for /lib/i686/libm.so.6

Reading symbols from /lib/libgcc_s.so.1...done.

Loaded symbols for /lib/libgcc_s.so.1

Reading symbols from /lib/ld-linux.so.2...done.

Loaded symbols for /lib/ld-linux.so.2

#0 0xb7f4f96f in do_lookup_x (undef_name=0xb7ceff67 "pthread_cancel", hash=259062092, ref=0xb7cef5fc, result=0xbfbe4810, scope=0xb7f60838, i=0, version=0x0, flags=1, skip=0x0, type_class=Variable "type_class" is not available.

)

at do-lookup.h:72

72 do-lookup.h: No such file or directory.

in do-lookup.h

(gdb) bt

#0 0xb7f4f96f in do_lookup_x (undef_name=0xb7ceff67 "pthread_cancel", hash=259062092, ref=0xb7cef5fc, result=0xbfbe4810, scope=0xb7f60838, i=0, version=0x0, flags=1, skip=0x0, type_class=Variable "type_class" is not available.) at do-lookup.h:72

#1 0xb7f4fc87 in _dl_lookup_symbol_x (undef_name=0xb7ceff67 "pthread_cancel", undef_map=0xb7f46b70, ref=0xbfbe4930, symbol_scope=0xb7f46d18, version=0x0, type_class=0, flags=1, skip_map=0x0) at dl-lookup.c:233

#2 0xb7f51263 in _dl_relocate_object (l=Variable "l" is not available.) at ../sysdeps/i386/dl-machine.h:354

#3 0xb7f4a31f in dl_main (phdr=0x8048034, phnum=256, user_entry=0xbfbe4d20) at rtld.c:2235

#4 0xb7f5940e in _dl_sysdep_start (start_argptr=0xbfbe4d80, dl_main=0xb7f49050 <dl_main>) at ../elf/dl-sysdep.c:239

#5 0xb7f48709 in _dl_start (arg=0xbfbe4d80) at rtld.c:333

#6 0xb7f47847 in _start () at rtld.c:788

Current language: auto; currently c

(gdb)

Link to comment
Share on other sites

I doubt very much that programs compiled on gcc 4.2x will run under gcc 4.1x because they are newer. However, if they are compiled with gcc 4.1x, then of course gcc 4.2x will be able to run it fine. This is probably why when they are compiled on 2007 or Gentoo that it is working on 2008. You'll have problems mixing it the other way around.

 

The only way, is to either ensure all distros you use are using the same version of gcc, or compile it on both machines so that you have the program compiled with gcc 4.1x and gcc 4.2x.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...