Ok, I saw a relocation error, and, if you ever compile your own shared library, you do need to make sure you compile with -fpic (position independent code), but I assume you are not using you own compiled shared libraries? You should run ldd on
libpthread.so so see what libs it wants, and also on your main program. Try to find out which .so file has __libc_stack_end defined. You could do an nm and pipe to grep, or even grep the libs directly. __libc_stack_end probably has something to do with threads. I assume you are linking with -lpthread.
Don.
On 11/21/06, David <> wrote:
you have been a great help - i tried both ways you metioned i copied
the errors below. i looked a busybox - ldconfig is not an option. i
have googled for answer till my eyes crossed.
lib in /usr/local/lib and listed in /etc/ld.so/config
export LD_LIBARAY_PATH='/usr/local/lib'
$ ./autopilot
./autopilot: error while loading shared libraries: libpthread.so.0:
cannot open shared object file: No such file or directory
---------------------------------------------
put lib in /lib dir as follows:
-rwxrwxrwx 1 root root 97552 Jan 7 1970
libpthread-0.10.so
lrwxrwxrwx 1 root root 18 Jan 7 1970 libpthread.so.0
-> libpthread-0.10.so
$ ./autopilot
./autopilot: relocation error: /lib/libpthread.so.0:
symbol __libc_stack_end, version GLIBC_2.1 not defined in file
ld-linux.so.2 with link time reference
David
Don W. Carr wrote:
I added a lib on the TS-7260 I have, but do not remember the
details, and it is loaned out right now, so I can not check it. As I
recall, since the 7260 runs TS-Linux, and not debian, it just loads
anything in finds in /lib or /usr/lib, and maybe /usr/local/lib.
You could also try setting the LD_LIBRARY_PATH environment variable to
see if it can find the .so file, though you really should not use that
for a permanent fix.
I have always been able to figure out how to get it to load libraries
when I need to. Typically, it will always work if you copy the .so file
to /lib, and run ldconfig (if necessary). I prefer to use
/usr/local/lib so it is easy to see the libraries that you added, but
if you can't make it work, just try copying it into /lib. Also look at
the file permissions. Another thing, if you are adding a system
library, you sometimes need symbolic links to point at the .so that
should be used for each version of a library. This happens when the new
library is backward compatible with the old one. As an example, look at
libm below. When you compile a library, it will always create a
dependency on the most recent version in your environment (not sure
exactly how it does it).
-rw-r--r-- 1 root root 132080 2006-05-21 13:46 libm-2.3.6.so
lrwxrwxrwx 1 root root 13 2006-06-12 08:50 libm.so.6 -> libm-2.3.6.so
There are som command line tools that can help when diagnosing problems
with shared libraries:
ldd <filename> will dump the libraries (including versions) that
this shared object or executable references.
nm <filename> will show all of the symbols in a file (remember
for C++ you will have mangled names)
Talking about shared libraries, you can use dlopen(), dlclose(),
dlsym(), and dlerror() to dynamically load shared objects and execute
function inside under program control. Great for adding extensions,
etc. This is what they use for Apache Modules and other types of
plugins.
Well, let us know what you find out.
Just keep snooping, you will figure it out.
Don.
On 11/21/06, David <> wrote:
that works for my system but the TS7260 does not have a ldconfig
or
/etc/ld.so/conf
it is looking in ld-linux.so for the lib name but i can not find a way
to update it.
the cross compiler is fine, the lib i need is there.
any other ideas?
David
Don W. Carr wrote:
You need to run ldconfig for them to be recognized on most
systems, though not all.
Also, it would be a good idea to put your libs in /usr/local/lib
If you do that you might have to add a line to /etc/ld.so.conf
For you cross compiler environment, you also need to copy your library
to one of the directories so the compiler can verify at compile time.
No need to run ldconfig here though.
Don.
On 11/21/06, davidalgeo <>
wrote:
I have had to add a lib to the /lib directory. I seem to
remember you
need to update the lib index but I have not done this in such a long
time I can not remember the command to do so.
Can anyone please help?
David
--
Dr. Don W. Carr
J. G. Montenegro 2258
Guadalajara, Mexico
+52-333-630-0704
+52-333-836-4500 ext 2930
-- David.......... You have been on the computer to long when, You start tilting your head sideways to smile :-)
--
Dr. Don W. Carr
J. G. Montenegro 2258
Guadalajara, Mexico
+52-333-630-0704
+52-333-836-4500 ext 2930
-- David.......... You have been on the computer to long when, You start tilting your head sideways to smile :-)
-- Dr. Don W. Carr J. G. Montenegro 2258 Guadalajara, Mexico +52-333-630-0704 +52-333-836-4500 ext 2930
__._,_.___
SPONSORED LINKS
__,_._,___
|