* Problems using shared library in corss environment
@ 2000-08-21 16:22 Seong-kyu Ko
2000-08-21 16:34 ` Mike Wolf
2000-08-22 1:34 ` Graham Stoney
0 siblings, 2 replies; 4+ messages in thread
From: Seong-kyu Ko @ 2000-08-21 16:22 UTC (permalink / raw)
To: linuxppc-embedded
Hi everybody.
First, I'm sorry for my weak English, but please read my problem and help
me.
I have some problems in building a powerpc corss compiler environment.
I'm now trying to build a cross environment, the host is i386 and target
is powerpc.
These are the packages that I used.
1. binutils-2.10
2. gcc-2.95.2
3. glibc-2.1.3 (add-ons : glibc-crypt-2.1, glibc-linuxthreads-2.1.3)
First, I compile the binutils for powerpc cpu.
Second, I build cross compiler with gcc.
Third, I compile glibc for powerpc with cross compiler that I made.
Last, I re-build cross compiler include glibc for library.
And I compiled kernel with cross compiler that I made.
Yeah, it's ok. And I compile 'init' with static library.
but I compile shell with shared labrary, it use ld.so.1 and libc.so.6
The problem is ld.so.1 can't found libc.so.6
The error message is this :
'error in loading shared libraries: libc.so.6: cannot open shared object
file: No such file or directory'
Please tell me why it can't find that and how can I solve this problem.
I'll wait your answers.
thank you.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problems using shared library in corss environment
2000-08-21 16:22 Problems using shared library in corss environment Seong-kyu Ko
@ 2000-08-21 16:34 ` Mike Wolf
2000-08-21 16:45 ` Seong-kyu Ko
2000-08-22 1:34 ` Graham Stoney
1 sibling, 1 reply; 4+ messages in thread
From: Mike Wolf @ 2000-08-21 16:34 UTC (permalink / raw)
To: linuxppc-embedded
Seong-kyu Ko wrote:
>
> Hi everybody.
> First, I'm sorry for my weak English, but please read my problem and help
> me.
>
> I have some problems in building a powerpc corss compiler environment.
> I'm now trying to build a cross environment, the host is i386 and target
> is powerpc.
>
> These are the packages that I used.
> 1. binutils-2.10
> 2. gcc-2.95.2
> 3. glibc-2.1.3 (add-ons : glibc-crypt-2.1, glibc-linuxthreads-2.1.3)
>
> First, I compile the binutils for powerpc cpu.
> Second, I build cross compiler with gcc.
> Third, I compile glibc for powerpc with cross compiler that I made.
> Last, I re-build cross compiler include glibc for library.
>
> And I compiled kernel with cross compiler that I made.
> Yeah, it's ok. And I compile 'init' with static library.
>
> but I compile shell with shared labrary, it use ld.so.1 and libc.so.6
> The problem is ld.so.1 can't found libc.so.6
> The error message is this :
> 'error in loading shared libraries: libc.so.6: cannot open shared object
> file: No such file or directory'
>
> Please tell me why it can't find that and how can I solve this problem.
> I'll wait your answers.
> thank you.
>
You probably have the shared libs in the wrong location. Where ever
they
reside on you cross compiler is where they will need to reside in the
ppc
tree. So instead of putting them in /lib or /usr/lib put them in
/home/.../target/powerpc-linux-gnu/lib or whatever directory the libs
were
installed into when you made the cross compiler.
If you are NFS mounting the root dir then you can use snoop to see
where ld.so is looking for the shared libs.
--
Mike Wolf
Cray Inc
655-F Lone Oak Drive, Eagan, MN 55121
mwolf@cray.com (651)683-5313
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problems using shared library in corss environment
2000-08-21 16:34 ` Mike Wolf
@ 2000-08-21 16:45 ` Seong-kyu Ko
0 siblings, 0 replies; 4+ messages in thread
From: Seong-kyu Ko @ 2000-08-21 16:45 UTC (permalink / raw)
To: Mike Wolf; +Cc: linuxppc-embedded
On Mon, 21 Aug 2000, Mike Wolf wrote:
>
> Seong-kyu Ko wrote:
> >
> > Hi everybody.
> > First, I'm sorry for my weak English, but please read my problem and help
> > me.
> >
> > I have some problems in building a powerpc corss compiler environment.
> > I'm now trying to build a cross environment, the host is i386 and target
> > is powerpc.
> >
> > These are the packages that I used.
> > 1. binutils-2.10
> > 2. gcc-2.95.2
> > 3. glibc-2.1.3 (add-ons : glibc-crypt-2.1, glibc-linuxthreads-2.1.3)
> >
> > First, I compile the binutils for powerpc cpu.
> > Second, I build cross compiler with gcc.
> > Third, I compile glibc for powerpc with cross compiler that I made.
> > Last, I re-build cross compiler include glibc for library.
> >
> > And I compiled kernel with cross compiler that I made.
> > Yeah, it's ok. And I compile 'init' with static library.
> >
> > but I compile shell with shared labrary, it use ld.so.1 and libc.so.6
> > The problem is ld.so.1 can't found libc.so.6
> > The error message is this :
> > 'error in loading shared libraries: libc.so.6: cannot open shared object
> > file: No such file or directory'
> >
> > Please tell me why it can't find that and how can I solve this problem.
> > I'll wait your answers.
> > thank you.
> >
> You probably have the shared libs in the wrong location. Where ever
> they
> reside on you cross compiler is where they will need to reside in the
> ppc
> tree. So instead of putting them in /lib or /usr/lib put them in
> /home/.../target/powerpc-linux-gnu/lib or whatever directory the libs
> were
> installed into when you made the cross compiler.
>
> If you are NFS mounting the root dir then you can use snoop to see
> where ld.so is looking for the shared libs.
>
> --
> Mike Wolf
> Cray Inc
> 655-F Lone Oak Drive, Eagan, MN 55121
> mwolf@cray.com (651)683-5313
Thank you for your answer but I put the libs /lib.
So I think it's not the problem of the worng location.
Sorry.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problems using shared library in corss environment
2000-08-21 16:22 Problems using shared library in corss environment Seong-kyu Ko
2000-08-21 16:34 ` Mike Wolf
@ 2000-08-22 1:34 ` Graham Stoney
1 sibling, 0 replies; 4+ messages in thread
From: Graham Stoney @ 2000-08-22 1:34 UTC (permalink / raw)
To: Seong-kyu Ko; +Cc: linuxppc-embedded
Seong-kyu Ko writes:
> First, I compile the binutils for powerpc cpu.
> Second, I build cross compiler with gcc.
> Third, I compile glibc for powerpc with cross compiler that I made.
> Last, I re-build cross compiler include glibc for library.
OK, sounds good.
> but I compile shell with shared labrary, it use ld.so.1 and libc.so.6
> The problem is ld.so.1 can't found libc.so.6
> The error message is this :
> 'error in loading shared libraries: libc.so.6: cannot open shared object
> file: No such file or directory'
In order to find libc.so.6 on the host, I found that I needed to edit
$prefix/powerpc-linux/lib/libc.so to use an absolute path to refer to
$prefix/powerpc-linux/lib/libc.so.6. For some reason, gcc wouldn't find it
otherwise, even when I specified --rpath.
Next, to ensure that the dynamic linker could find libc.so.6 in the right
place on the target, I edited $prefix/lib/gcc-lib/powerpc-linux/2.95.2/specs
to add this right after -dynamic-linker:
--rpath /lib --rpath-link /opt/gcc-2.95.2/powerpc-linux/lib
Good luck,
Graham
--
Graham Stoney
Principal Hardware/Software Engineer
Canon Information Systems Research Australia
Ph: +61 2 9805 2909 Fax: +61 2 9805 2929
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-08-22 1:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-21 16:22 Problems using shared library in corss environment Seong-kyu Ko
2000-08-21 16:34 ` Mike Wolf
2000-08-21 16:45 ` Seong-kyu Ko
2000-08-22 1:34 ` Graham Stoney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).