Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

About Link library!

Posted on 2003-11-11
9
Medium Priority
?
242 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 200 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

715 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