link using libuClibc-0.9.20.so library
Hi, i have a problem with compile a simple program in a machine an execute it on an other. I'm not a linux expert so i try to illustrate my situation.
I have 2 system with the same version of linux kernel 2.4.19.
I need to compile the simple code on the first machine and then run on the other because the second system is a very reduced installation (it is on a flash ramdisk).
I compile the code on the first machine with : "gcc source.c -lm -o source.o"
and when i use ldd cmd i obtain this:
libm.so.6 => /lib/libm.so.6 (0x4001b000)
libc.so.6 => /lib/libc.so.6 (0x40038000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Version information:
./test_time.out:
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
libm.so.6 (GLIBC_2.0) => /lib/libm.so.6
/lib/libm.so.6:
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
/lib/libc.so.6:
ld-linux.so.2 (GLIBC_2.1.1) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2
Where ld-linux.so.2 -> ld-2.1.3.so
libc.so.6 -> libc-2.1.3.so
libm.so.6 -> libm-2.1.3.so
The executable file can't run in the second machine because it have only the 0.9.20.so library.
I tried the "-static" option with gcc and the program run but it work uncorrectly.
MY QUESTION IS: what is the best solution for this problem ? Compile the code using the 0.9.20 library or install the 2.1.3 on the secon system? Is possible to use cross-compiling ?
Thank in advance for any help
|