Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: Embedded

chroot

 

 

Gentoo embedded RSS feed   Index | Next | Previous | View Threaded


taerwin at gmail

Jun 7, 2009, 6:21 PM

Post #1 of 10 (2132 views)
Permalink
chroot

I am trying to create a stage3 image for my phone. I have
emerge-armv4tl-softfloat-linux-gnueabi -av system successfully and
transferred this to my phone but when I try to chroot into this image I get
the error:

/bin/bash: error while loading shared libraries: libgcc_s.so.1: cannot open
shared object file: No such file or directory

Is there something I am missing?

Regards,

Tim


odinshorse at googlemail

Jun 8, 2009, 12:29 AM

Post #2 of 10 (2061 views)
Permalink
Re: chroot [In reply to]

2009/6/8 Tim Erwin <taerwin [at] gmail>:
> /bin/bash: error while loading shared libraries: libgcc_s.so.1: cannot open
> shared object file: No such file or directory

You need to select a gcc for you chroot. Please take a look at

http://gentoo.mindzoo.de/index.cgi/wiki/Cross%20Install

Especially the step

ROOT=<path to stage3 dir> gcc-config -l
ROOT=<path to stage3 dir> gcc-config <the gcc you want!>

This needs to be executed _before_ executing chroot the first time.

Hope this helps!?

Sven


taerwin at gmail

Jun 8, 2009, 6:09 AM

Post #3 of 10 (2055 views)
Permalink
Re: chroot [In reply to]

> Especially the step
>
> ROOT=<path to stage3 dir> gcc-config -l
> ROOT=<path to stage3 dir> gcc-config <the gcc you want!>
>

Nope not that.

It seems that libgcc_s.so.1 is missing from /lib directory (it exists in
/usr/lib/gcc/armv4tl-softfloat-linux-gnueabi/4.3.2/)

Copied it over and presto! Anyone else with this problem? Cross-compile bug?

Cheers,

Tim


ierton at gmail

Jun 8, 2009, 7:10 AM

Post #4 of 10 (2050 views)
Permalink
Re: chroot [In reply to]

2009/6/8 Tim Erwin <taerwin [at] gmail>:
>
>> Especially the step
>>
>> ROOT=<path to stage3 dir> gcc-config -l
>> ROOT=<path to stage3 dir> gcc-config <the gcc you want!>
>
> Nope not that.
>
> It seems that libgcc_s.so.1 is missing from /lib directory (it exists in
> /usr/lib/gcc/armv4tl-softfloat-linux-gnueabi/4.3.2/)
>
> Copied it over and presto! Anyone else with this problem? Cross-compile bug?
>
> Cheers,
>
> Tim
>
>

I have the same.
Workaround is

1. copy host machine's cross-gcc lib into
/usr/arm-unknown-linux-gnueabi/usr/lib/gcc/arm-unlnown-linux-gnueabi/4.4.0

2. make symlinks /usr/arm-unknown-linux-gnueabi/usr/lib/libgcc_s.so*
(HOST path) to point to
/usr/lib/gcc/arm-unlnown-linux-gnueabi/4.4.0/libgcc_s.so* (TARGET
path)

think, that it is a bug..

--
С Уважением,
Сергей.


odinshorse at googlemail

Jun 8, 2009, 9:18 AM

Post #5 of 10 (2053 views)
Permalink
Re: chroot [In reply to]

2009/6/8 Tim Erwin <taerwin [at] gmail>:
> It seems that libgcc_s.so.1 is missing from /lib directory (it exists in
> /usr/lib/gcc/armv4tl-softfloat-linux-gnueabi/4.3.2/)

Did you install gcc on the target? If not, then this is your problem.
However, I would appreciate if anyone would manage to create a libgcc
ebuild that only builds and installs libgcc without the whole gcc
machinery.

Sven


solar at gentoo

Jun 8, 2009, 9:31 AM

Post #6 of 10 (2054 views)
Permalink
Re: chroot [In reply to]

On Mon, 2009-06-08 at 23:09 +1000, Tim Erwin wrote:
>
> Especially the step
>
> ROOT=<path to stage3 dir> gcc-config -l
> ROOT=<path to stage3 dir> gcc-config <the gcc you want!>
>
> Nope not that.
>
> It seems that libgcc_s.so.1 is missing from /lib directory (it exists
> in /usr/lib/gcc/armv4tl-softfloat-linux-gnueabi/4.3.2/)
>
> Copied it over and presto! Anyone else with this problem?
> Cross-compile bug?


When you enter the chroot. You most likely forget to initialy run an
env-update. Which should update the /etc/ld.so.conf and then the
ld.so.cache

Or simply:

echo /usr/lib/gcc/armv4tl-softfloat-linux-gnueabi/4.3.2/ \
>> $ROOT/etc/ld.so.conf ; chroot $ROOT /sbin/ldconfig -a


vapier at gentoo

Jun 8, 2009, 5:55 PM

Post #7 of 10 (2052 views)
Permalink
Re: chroot [In reply to]

On Monday 08 June 2009 09:09:45 Tim Erwin wrote:
> > Especially the step
> >
> > ROOT=<path to stage3 dir> gcc-config -l
> > ROOT=<path to stage3 dir> gcc-config <the gcc you want!>
>
> Nope not that.

except that it's *exactly* that

> It seems that libgcc_s.so.1 is missing from /lib directory (it exists in
> /usr/lib/gcc/armv4tl-softfloat-linux-gnueabi/4.3.2/)

that's because gcc-config handles the installation

> Copied it over and presto! Anyone else with this problem? Cross-compile
> bug?

not-following-good-directions bug
-mike
Attachments: signature.asc (0.82 KB)


taerwin at gmail

Jun 8, 2009, 7:06 PM

Post #8 of 10 (2052 views)
Permalink
Re: chroot [In reply to]

>
>
> > > Especially the step
> > >
> > > ROOT=<path to stage3 dir> gcc-config -l
> > > ROOT=<path to stage3 dir> gcc-config <the gcc you want!>
> >
> > Nope not that.
>
> except that it's *exactly* that
>

Then it is definitely something I am missing ...

# ROOT=/mnt/gentoo_arm_stage3/ gcc-config -l
Using gcc-config info in /mnt/gentoo_arm_stage3/
[1] armv4tl-softfloat-linux-gnueabi-4.3.2 *

# ls /mnt/gentoo_arm_stage3/lib/libgcc*
ls: cannot access /mnt/gentoo_arm_stage3/lib/libgcc*: No such file or
directory

> Did you install gcc on the target?

Sure did gets pulled in with emerge system

Cheers,

Tim


odinshorse at googlemail

Jun 9, 2009, 5:26 AM

Post #9 of 10 (2048 views)
Permalink
Re: chroot [In reply to]

2009/6/9 Tim Erwin <taerwin [at] gmail>:
> # ROOT=/mnt/gentoo_arm_stage3/ gcc-config -l
> Using gcc-config info in /mnt/gentoo_arm_stage3/
> [1] armv4tl-softfloat-linux-gnueabi-4.3.2 *
>
> # ls /mnt/gentoo_arm_stage3/lib/libgcc*
> ls: cannot access /mnt/gentoo_arm_stage3/lib/libgcc*: No such file or
> directory

Then this is really strange, as it works for me exactly like it is
written in the guide at gentoo.mindzoo.de... Can you please check if
"ls /mnt/gentoo_arm_stage3/usr/lib/libgcc*" gives you any file!?

Sven


taerwin at gmail

Jun 9, 2009, 5:35 AM

Post #10 of 10 (2042 views)
Permalink
Re: chroot [In reply to]

> Then this is really strange, as it works for me exactly like it is
> written in the guide at gentoo.mindzoo.de... Can you please check if
> "ls /mnt/gentoo_arm_stage3/usr/lib/libgcc*" gives you any file!?
>

Nope, no file, I seem to other problems as well so I think it is something
that I have done somewhere along the line. I am currently rebuilding the
stage3 again and will see how that goes.

Cheers,

Tim

Gentoo embedded RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.