ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi group,
I have this little misunderstanding. I have may programs developed
on my laptop that run just fine but when I try them on my other PCs,
they don't run. They all get 'Floating point exception' when started.
I don't understand why?? The laptop is running FC8 and the others are
running FC5. The makefile looks like this:
Hi group,
I have this little misunderstanding. I have may programs developed
on my laptop that run just fine but when I try them on my other PCs,
they don't run. They all get 'Floating point exception' when started.
I don't understand why?? The laptop is running FC8 and the others are
running FC5. The makefile looks like this:
Well, you're running two different versions of Linux, which also probably have two different versions of GCC, and all of the associated libraries. Your code is probably written to take advantage of the newer stuff on FC8, which isn't present on FC5.
Not real experienced with Linux programmming but on Solaris etc. we used static linking to avoid this type of problem. As long as the system calls did not change (I don't know if that is true) a staticly linked program should work because it will take all of its libraries with it.
=3545== Memcheck, a memory error detector.
==3545== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==3545== Using LibVEX rev 1804, a library for dynamic binary translation.
==3545== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==3545== Using valgrind-3.3.0-Debian, a dynamic binary instrumentation framework.
==3545== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==3545== For more details, rerun with: -v
==3545==
# sema: Version 1.1, Copyright: Mt-Umunhum-Wireless.net
# Oct 30 2008 00:35:23
==3545== Syscall param semctl(arg) points to uninitialised byte(s)
==3545== at 0x41245A9: semctl (in /lib/libc-2.7.so)
==3545== by 0x8048B1C: main (sema.c:55)
==3545== Address 0xbeaa4998 is on thread 1's stack
00:35:44.3869 Main thread
00:35:44.9326 Starting sub1 at +10+0
00:35:45.1047 Starting sub2 at +20+0
00:35:45.4658 Starting sub3 at +30+0
sh: xterm: command not found
00:35:45.5133 Sub3 Lock: 4
00:35:45.7692 Starting sub2 at +40+0
sh: xterm: command not found
00:35:45.7759 Sub3 Lock: 4
sh: xterm: command not found
00:35:45.8950 Sub3 Lock: 4
00:35:45.8968 Main exit
sh: xterm: command not found
00:35:45.9759 Sub3 Lock: 4
00:35:45.9780 Thread 1 exit
00:35:45.9849 Thread 2 exit
00:35:45.9940 Thread 3 exit
00:35:46.0819 SemCTL RMID: 0
00:35:46.1005 Exiting sema
==3545==
==3545== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 13 from 1)
==3545== malloc/free: in use at exit: 413 bytes in 4 blocks.
==3545== malloc/free: 14 allocs, 10 frees, 1,953 bytes allocated.
==3545== For counts of detected errors, rerun with: -v
==3545== searching for pointers to 4 not-freed blocks.
==3545== checked 25,193,232 bytes.
==3545==
==3545== LEAK SUMMARY:
==3545== definitely lost: 0 bytes in 0 blocks.
==3545== possibly lost: 408 bytes in 3 blocks.
==3545== still reachable: 5 bytes in 1 blocks.
==3545== suppressed: 0 bytes in 0 blocks.
==3545== Rerun with --leak-check=full to see details of leaked memory.
The problem doesn't seem relevant to the problem, but may be worth checking.
Do you simply move the executable between the machines or compile on every machine? Also, do the architectures differ (for instance amd64 and i586)?
If the other systems have differernt versions of the libraries (and you indicated that they do) and you do not static link it or otherwise provide the libraries it is very unlikely it will ever work
You can waste as much time as you want but if the libraries are changed in an incompatable manner you are SOL.
If the other systems have differernt versions of the libraries (and you indicated that they do) and you do not static link it or otherwise provide the libraries it is very unlikely it will ever work
You can waste as much time as you want but if the libraries are changed in an incompatable manner you are SOL.
I have also tried the simple "Hello world" programs with the same effect.
I don't think libstdio change that much?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.