Solved

About Link library!

Posted on 2003-11-11
9
232 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
  • 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now