Solved

About Link library!

Posted on 2003-11-11
9
235 Views
Last Modified: 2010-04-22
System: Readhat Linux System
kernerl:2.4.e16smp
gcc version: 2.2.4.96
I compile a file and create a executable file,
when linking the file, it need a library "libma00000.so" in Dir [/home/cmgs/lib ]
but After I create the file, when I run it , some errors occured.
error message:
bash-2.05$ make -f bb0dl000.mk
cc -O2 -march=i686 -Wall -g -ansi -fPIC -c -I/home/cmgs/include bb0dl000.c
cc  -o bb0dl000 bb0dl000.o -L /home/cmgs/lib -lma00000 -g
bash-2.05$ ./bb0dl000
./bb0dl000: error while loading shared libraries: libma00000.so: cannot open shared object file: No
such file or directory


wait for your answer! Thanks!
0
Comment
Question by:lakeryu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
9 Comments
 
LVL 5

Expert Comment

by:g0rath
ID: 9722528
This is because when it attempts to execute the program it shows that it needs to link to a shared object, it will look for then in the paths as defined in /etc/ld.so.conf.

You can override this at run time to have it look in your local directory by setting the LD_LIBRARY_PATH

$ export "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/cmgs/lib"
0
 

Author Comment

by:lakeryu
ID: 9736419
Thank you very much for your answer!
that problem has been soluted. but when execute the application(bb0dl000) a new error occured.following is the error message:
./bb0dl000: /lib/i686/libc.so.6: version `GLIBC_2.0' not found (required by /home/cmgs/lib/libma00000.so)

comment:the libma00000.so is complied by another machine.But I do not know the machine`s glibc version. by the error message, is it possible to be sure that the machine`s glibc version is glibc~2.0???

how can I solute it?? wait for your answer? thank you!
0
 
LVL 5

Expert Comment

by:g0rath
ID: 9737279
it would apprear that the other machine that compiled the .so file had the newer glibc, and your running on an older glibc...

easiest method would be to get the source and remake the .so file.

glibc is mostly backward binary compatible, but not forward.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:lakeryu
ID: 9737422
hello, g0rath
but it looks like that my glibc version is newer than the compile machine.
And I can not get the lib source, how can I do??
g0rath, can you help me?
wait for your answer!
0
 

Author Comment

by:lakeryu
ID: 9737425
hello, g0rath
but it looks like that my glibc version is newer than the compile machine.
And I can not get the lib source, how can I do??
g0rath, can you help me?
wait for your answer!
0
 
LVL 5

Accepted Solution

by:
g0rath earned 50 total points
ID: 9739253
So you need the glibc-compat rpms

Follow this link and find the one that you need

http://rpmfind.net/linux/rpm2html/search.php?query=compat-glibc
0
 

Author Comment

by:lakeryu
ID: 9745559
Yes I have soluted it,
But now when I debug it using gdb, it found some serious problem.
for example:
In gdb when I break it at line88, and press "next" to run the next step, but it don't  run the next step line89, thought it return the less than line88(for example line 80 81 and so on)..

what cause the phenomina? and how can I solute it?? Why ? and I confused it!
wait for your answer!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question