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

Static compilation: segmentation fault in execution [host=x86_64, target: ia64]


I have installed in my x86_64 machine running Debian Sid the cross
compiler for ia64 from emdebian squeeze. I need to run my programs in
an old Altix 3700 Bx2 machine with 64 CPUs, and I need the cross
compiler because the machine has very old compilers (no OpenMP, etc.)
Because the machine has old libraries and kernel (Linux 2.4) I need to
generate the executables statically linked. The problem is when I run

I have problems with a simple Hello world program

int main()
    printf("Hello world\n");
    return 0;

If I compile it dynamically linked, the executable runs without
problems in the ia64 environment, but if I compile it statically
linked (ia64-linux-gnu-gcc -static hello.c -o hello), when I try to
run in the ia64 machine I obtain a segmentation fault:

ia64-linux-gnu-gcc -static hello.c -o hello_static
Segmentation fault

Is it a bug?


José Luis García Pallero
/ / \
Use Debian GNU/Linux and enjoy!

Reply to: