LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-30-2005, 06:27 AM   #1
nignogeta
LQ Newbie
 
Registered: Jun 2005
Posts: 1

Rep: Reputation: 0
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem installing - libtool: link: cannot find the library `__LIBGL_PATH__/libGL.la' sparX CG Linux - Software 4 11-14-2005 05:45 PM
GNU based c++ cross compiler unable to link c library k_taid Programming 1 06-29-2005 09:38 AM
How to link a library to gcc? Andrea_81 Programming 6 05-05-2005 04:22 AM
KDevelop, how to link a library?? Umanga Programming 1 01-10-2005 05:13 PM
how to static link a specific library? koodailar Programming 3 07-26-2004 03:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration