chroot,ldd and shared libraries

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi everybody,

I need to get this straight:
if i compile a binary on my host machine and check it with ldd about
shared libs I get this:

    /opt/embebbed/qt-embedded-free-3.3.3/examples/hello # ldd hello
        linux-gate.so.1 =>  (0xffffe000)
        libqte.so.3 => /opt/embebbed/qt-embedded-free-3.3.3/lib/libqte.so.3
(0x40015000)
        libdl.so.2 => /lib/libdl.so.2 (0x4070b000)
        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4070e000)
        libm.so.6 => /lib/libm.so.6 (0x407ca000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x407ec000)
        libc.so.6 => /lib/libc.so.6 (0x407f4000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

As you can see libqte.so.3 points to
/opt/embebbed/qt-embedded-free-3.3.3/lib/libqte.so.3, but that's not the
directory the lib will be in on my target system!

How do I get the => to point to the right path on the host?

I did my homework and checked what i can do about this. I found chroot!
Some people say you can use chroot to get this right. But how?
Do I have to chroot my target root-filesystem, put the libraries there and
compile my programs in this new root ?

All right,
hope somebody can tell me about it!

thanx chris  





Re: chroot,ldd and shared libraries

Quoted text here. Click to load it

You are trying to solve a problem you don't have.

Install libqte.so.3 in one of the "standard" directories
(e.g. /usr/lib) on the target, and run ldd there.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.

Site Timeline