Floating point exception

I have application compiled on rather NEW ubunto distribution (kernel 3.2.0-53-virtual) using g++ 4.7.2. After compilation completes (and works on this machine), I'm taking the products to OLD Debian 4 distribution (kernel 2.6.34.10). I currently CANNOT change distribution. I'm trying to run the application and get:

1
2
3
4
5
6
7
Bin/MY_APP: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by Bin/MY_APP)
Bin/MY_APP: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by Bin/MY_APP)
Bin/MY_APP: /lib/tls/libc.so.6: version `GLIBC_2.15' not found (required by Bin/MY_APP)
Bin/MY_APP: /lib/tls/libc.so.6: version `GLIBC_2.11' not found (required by Bin/MY_APP)
Bin/MY_APP: /lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by Bin/MY_APP)
Bin/MY_APP: /lib/tls/libc.so.6: version `GLIBC_2.12' not found (required by Bin/MY_APP)
Bin/MY_APP: /lib/tls/libc.so.6: version `GLIBC_2.7' not found (required by Bin/MY_APP) 


I tried to solve the issue, and took from the machine I compiled the application (NEW ubunto) libstdc++.so.6 & libc.so.6 and put them on /usr/lib/MY_APP_LIB/ , but when I run:
 
env LD_PRELOAD=/usr/lib/MY_APP_LIB/libstdc++.so.6:/usr/lib/MY_APP_LIB/libc.so.6  /opt/MY_APP/MY_appp


I get:
 
Floating point exception


even if I run ls or any linux command:
 
env LD_PRELOAD=/usr/lib/MY_APP_LIB/libstdc++.so.6:/usr/lib/MY_APP_LIB/libc.so.6  ls


I get the "Floating point exception"

of course also when I try to point LD_LIBRARY_PATH to the /usr/lib/MY_APP_LIB same result.

dmesg shows:
1
2
3
4
Process 394(MY_APP) has RLIMIT_CORE set to 0
Aborting core
Process 422(ls) has RLIMIT_CORE set to 0
Aborting core


How can I solve this?
Last edited on
Recompile the app in the old computer -- or compile a statically linked binary in the new.
thanks, I recompiled on the NEW machine with -static-libstdc++ -static-libgcc but I still getting the same errors when running on my OLD machine:

1
2
3
4
5
6
7
Bin/MY_APP: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by Bin/MY_APP)
Bin/MY_APP: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by Bin/MY_APP)
Bin/MY_APP: /lib/tls/libc.so.6: version `GLIBC_2.15' not found (required by Bin/MY_APP)
Bin/MY_APP: /lib/tls/libc.so.6: version `GLIBC_2.11' not found (required by Bin/MY_APP)
Bin/MY_APP: /lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by Bin/MY_APP)
Bin/MY_APP: /lib/tls/libc.so.6: version `GLIBC_2.12' not found (required by Bin/MY_APP)
Bin/MY_APP: /lib/tls/libc.so.6: version `GLIBC_2.7' not found (required by Bin/MY_APP)  
I bet that
ldd Bin/MY_APP

shows that the executable still depends on some dynamically linked libraries (which in turn pull in more).

Compile with -static. That should create a non-dynamic executable.
Topic archived. No new replies allowed.