[Clfs-support] CLFS embedded and shared libraries
Andrew Bradford
andrew at bradfordembedded.com
Fri Mar 21 08:32:46 PDT 2014
On 03/18/2014 02:00 PM, Vlastimil Slintak wrote:
> Hello,
>
> For last two weeks I am working on my CLFS embedded system for Raspberry Pi. My system is already running, but I had to disable shared libraries for all application (busybox, dropbear and e2fsprogs). When I compile busybox with enabled shared libraries, I get “Kernel panic - not syncing: No init found.” from kernel. When I compile dropbear or e2fsprogs with shared libraries, I get “-ash: dropbearkey: not found”.
>
> Dropbear (for example) needs three libraries (I run this command on my host system):
>
> $ readelf -d targetfs/usr/bin/dropbearmulti
> Dynamic section at offset 0x3400c contains 26 entries:
> Tag Type Name/Value
> 0x00000001 (NEEDED) Shared library: [libz.so.1]
> 0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
> 0x00000001 (NEEDED) Shared library: [libc.so]
>
> And the content of my CLFS /lib is (I run this on my target system):
>
> $ ls /lib
> firmware libgomp.so libitm.so.1.0.0 libstdc++.so.6 libz.so.1.2.8
> ld-musl-arm.so.1 libgomp.so.1 libssp.so libstdc++.so.6.0.17 modules
> libc.so libgomp.so.1.0.0 libssp.so.0 libstdc++.so.6.0.17-gdb.py
> libgcc_s.so libitm.so libssp.so.0.0.0 libz.so
> libgcc_s.so.1 libitm.so.1 libstdc++.so libz.so.1
>
> So I am sure, I have all needed libraries. I compiled them with CLFS gcc. What am I missing? Do you think there is some problem with my lib-musl library or with GCC?
Possibly you're being bit by the target /lib/ld-musl-arm.so.1 symlink
issue [1]. I should really write a trac ticket for this...
[1]:http://lists.cross-lfs.org/pipermail/clfs-support-cross-lfs.org/2014-February/001808.html
Is your target's /lib/ld-musl-arm.so.1 a symlink to /lib/libc.so?
-Andrew
More information about the Clfs-support
mailing list