Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo Embedded (http://www.linux-archive.org/gentoo-embedded/)
-   -   libgcc_s.so and gcc-config on embedded system (http://www.linux-archive.org/gentoo-embedded/497611-libgcc_s-so-gcc-config-embedded-system.html)

Sergey Mironov 03-05-2011 05:23 PM

libgcc_s.so and gcc-config on embedded system
 
Hi. I recently faced (probably well-known) problem while setting up my embedded
/usr/arm-module3-linux-gnueabi system tree. The problem is that
/lib/libgcc_s.so does not exist. Here is typical error message:

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

I know that there is a workaround - copying this lib from
/usr/lib/gcc/.. to /usr/lib (paths are relative to arm's root). Also,
manual [1] suggests installing gcc on target system and using host's
gcc-config. I tried it and failed. My actions were:

emerge-arm-module3-linux-gnueabi gcc
ROOT=/usr/arm-module3-linux-gnueabi gcc-config -l

I looked inside host's gcc-config. Looks like it only works with
NATIVE compiler's libgcc_s.so. It treats arm's gcc as cross-compiler
despite the fact that arm's gcc is actually native for arm system.
Well, I install gcc-config on arm. It turns out, that gcc-config
depends on libgcc_s itself.

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

Funny. Should I mail gcc-config bug?

Sergey.

[1] http://gentoo.mindzoo.de/index.cgi/wiki/Cross%20Install
[2] http://www.gossamer-threads.com/lists/gentoo/amd64/190796

Sergey Mironov 03-05-2011 05:33 PM

libgcc_s.so and gcc-config on embedded system
 
2011/3/5 Sergey Mironov <ierton@gmail.com>:
> Hi. I recently faced (probably well-known) problem while setting up my embedded
> /usr/arm-module3-linux-gnueabi *system tree. The problem is that
> /lib/libgcc_s.so does not exist. Here is typical error message:
>
> ~ # bash
> bash: error while loading shared libraries: libgcc_s.so.1: cannot open
> shared object file: No such file or directory
>
> I know that there is a workaround - *copying this lib from
> /usr/lib/gcc/.. to /usr/lib (paths are relative to arm's root). Also,
> manual [1] suggests installing gcc on target system and using host's
> gcc-config. I tried it and failed. My actions were:
>
> emerge-arm-module3-linux-gnueabi gcc
> ROOT=/usr/arm-module3-linux-gnueabi gcc-config -l
>
> I looked inside host's gcc-config. Looks like it only works with
> NATIVE compiler's libgcc_s.so. It treats arm's gcc as cross-compiler
> despite the fact that arm's gcc is actually native for arm system.
> Well, I install gcc-config on arm. It turns out, that gcc-config
> depends on libgcc_s itself.
>
> ~ # gcc-config
> /bin/bash: error while loading shared libraries: libgcc_s.so.1: cannot
> open shared object file: No such file or directory
>
> Funny. Should I mail gcc-config bug?
>
> Sergey.
>
> [1] http://gentoo.mindzoo.de/index.cgi/wiki/Cross%20Install
> [2] http://www.gossamer-threads.com/lists/gentoo/amd64/190796
>

Heh, too slow. gcc-config is bash-script and it is bash who depends on
libgcc_s.so. Well, looks like choosing bash was not wise enough.

Sergey


All times are GMT. The time now is 02:29 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.