08-14-2008
gcc compiled executable not working across x86_64 linux platforms
Hi
I compiled a hello world program on two different 64-bit Linux machines, named quimby and node0331. When I compile on quimby and run on node0331 I get a "Floating exception (core dumped)" error. But if I do it in reverse, things work fine.
Here's my compilation on quimby:
$ uname -a
Linux quimby 2.6.18-8.1.15.el5 #1 SMP Mon Oct 22 08:32:28 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
$ cat hello.c
#include <stdio.h>
int main()
{
printf("Hello World\n");
return 0;
}
$ gcc -c hello.c -o hello.o ;
$ gcc -o hello hello.o
$ ./hello
Hello World
The I go to node0331 and run there:
$ uname -a
Linux node0331 2.6.9-42.0.3.ELsmp #1 SMP Fri Oct 6 06:28:26 CDT 2006 x86_64 x86_64 x86_64 GNU/Linux
$ ./hello
Floating exception (core dumped)
But again if I do this in reverse, things work fine. Has anyone ever experienced this problem.
Thanks in advance,
Sam
10 More Discussions You Might Find Interesting
1. Programming
Hi,
We are trying to run dbx on a core file for which we have the original executable and libs, but not the source / object tree. We have recompiled the objects from the original source, but dbx complains that they were compiled at a different time, and refuses to read them:
Object file:... (0 Replies)
Discussion started by: Sabari Nath S
0 Replies
2. Linux
Hi,
I am building GCC cross compiler for x86_64-elf
for that a have followed steps,
1. mkdir build-gmp build-mpfr
2. cd build-gmp
3. ../gmp-4.2/configure --prefix=/usr/local
4. make all install
5. make check
6.cd ../build-mpfr
7. ../mpfr-2.3.2/configure... (5 Replies)
Discussion started by: Mandar123
5 Replies
3. Linux
Hi,
I am tried to install GCC cross compiler for 64-bit machine.
i want compile one application for 64 bit machine.
I have followed steps form GCC Cross-Compile - OSDev Wiki .
Please if anybody have installed cross compiler successfully, please tell me the steps followed by you.
Thanking... (0 Replies)
Discussion started by: Mandar123
0 Replies
4. Solaris
Hi
I compiled an executable on Solaris 10 which creates semaphore ( semget)
but it didn't work on solaris 9 , while it is executing sucessfully on solaris 10. It is throwing the system error that Invalid arguments ( system error 22) on solaris 9.
the ldd for the executable on two servers is as... (4 Replies)
Discussion started by: ash_bit2k2
4 Replies
5. Programming
Hi,
Can anyone tell me how to find out how many bits a c executable was compiled in?
I am trying to do some investigation of running 32bit programs in 64bit systems. (1 Reply)
Discussion started by: Leion
1 Replies
6. UNIX for Advanced & Expert Users
I've got a executable binary file (source code fortran77, compiled using gfortran).
I'm not sure this is even possible but I remember someone I knew was able to view the source code that created this binary file, i.e. he used a program that enabled him to see what the source code was.
Is this... (2 Replies)
Discussion started by: lost.identity
2 Replies
7. Programming
I have put some yellow color codes and works well.
I call the funstion using
print_usage(stderr, 0);
I would like to know if there is any way, to store the ansi color codes in variables and then call them inside fprintf.
Or have a format followed by the strings I want to output.
... (5 Replies)
Discussion started by: kristinu
5 Replies
8. Solaris
Hello experts,
This issue has kept me busy all day long. It started off with openssl compilation which was giving linking error with following message:
/usr/local/bin/ld: target elf32-sparc not found
collect2: ld returned 1 exit status
I tried every step possible thing that I could think... (2 Replies)
Discussion started by: d_shanke
2 Replies
9. Linux
Hello Friends,
I tried to take tar backup in my server, but it ended with an error.
It said that:
/home/back/pallava_backup/fbackup_backup/stape_config
/home/back/romam_new.tar.gz
tar: /home/backup/back.tar.gz: Cannot write: No space left on device
tar: Error is not recoverable: exiting... (10 Replies)
Discussion started by: siva3492
10 Replies
10. Programming
Hi,
I am working in UEFI EDK2 Bios source. We created a platform related new package in the EDK2 source. I find a strange issue with the platform related code we added.
When I did source level debugging I noticed the
local variable in a C function is not getting created in stack when its... (6 Replies)
Discussion started by: Divya R
6 Replies
LEARN ABOUT CENTOS
grub2-file
GRUB-FILE(1) General Commands Manual GRUB-FILE(1)
NAME
grub-file -- Check if FILE is of specified type.
SYNOPSIS
grub-file (--is-i386-xen-pae-domu | --is-x86_64-xen-domu |
--is-x86-xen-dom0 | --is-x86-multiboot |
--is-x86-multiboot2 | --is-arm-linux | --is-arm64-linux |
--is-ia64-linux | --is-mips-linux | --is-mipsel-linux |
--is-sparc64-linux | --is-powerpc-linux | --is-x86-linux |
--is-x86-linux32 | --is-x86-kfreebsd | --is-i386-kfreebsd |
--is-x86_64-kfreebsd | --is-x86-knetbsd |
--is-i386-knetbsd | --is-x86_64-knetbsd | --is-i386-efi |
--is-x86_64-efi | --is-ia64-efi | --is-arm64-efi |
--is-arm-efi | --is-hibernated-hiberfil | --is-x86_64-xnu |
--is-i386-xnu | --is-xnu-hibr | --is-x86-bios-bootsector)
FILE
DESCRIPTION
grub-file is used to check if FILE is of a specified type.
OPTIONS
--is-i386-xen-pae-domu
Check if FILE can be booted as i386 PAE Xen unprivileged guest kernel
--is-x86_64-xen-domu
Check if FILE can be booted as x86_64 Xen unprivileged guest kernel
--is-x86-xen-dom0
Check if FILE can be used as Xen x86 privileged guest kernel
--is-x86-multiboot
Check if FILE can be used as x86 multiboot kernel
--is-x86-multiboot2
Check if FILE can be used as x86 multiboot2 kernel
--is-arm-linux
Check if FILE is ARM Linux
--is-arm64-linux
Check if FILE is ARM64 Linux
--is-ia64-linux
Check if FILE is IA64 Linux
--is-mips-linux
Check if FILE is MIPS Linux
--is-mipsel-linux
Check if FILE is MIPSEL Linux
--is-sparc64-linux
Check if FILE is SPARC64 Linux
--is-powerpc-linux
Check if FILE is POWERPC Linux
--is-x86-linux
Check if FILE is x86 Linux
--is-x86-linux32
Check if FILE is x86 Linux supporting 32-bit protocol
--is-x86-kfreebsd
Check if FILE is x86 kFreeBSD
--is-i386-kfreebsd
Check if FILE is i386 kFreeBSD
--is-x86_64-kfreebsd
Check if FILE is x86_64 kFreeBSD
--is-x86-knetbsd
Check if FILE is x86 kNetBSD
--is-i386-knetbsd
Check if FILE is i386 kNetBSD
--is-x86_64-knetbsd
Check if FILE is x86_64 kNetBSD
--is-i386-efi
Check if FILE is i386 EFI file
--is-x86_64-efi
Check if FILE is x86_64 EFI file
--is-ia64-efi
Check if FILE is IA64 EFI file
--is-arm64-efi
Check if FILE is ARM64 EFI file
--is-arm-efi
Check if FILE is ARM EFI file
--is-hibernated-hiberfil
Check if FILE is hiberfil.sys in hibernated state
--is-x86_64-xnu
Check if FILE is x86_64 XNU (Mac OS X kernel)
--is-i386-xnu
Check if FILE is i386 XNU (Mac OS X kernel)
--is-xnu-hibr
Check if FILE is XNU (Mac OS X kernel) hibernated image
--is-x86-bios-bootsector
Check if FILE is BIOS bootsector
SEE ALSO
info grub
Web Feb 26 2014 GRUB-FILE(1)