[Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library
Arnout Vandecappelle
arnout at mind.be
Mon Sep 7 14:33:30 UTC 2015
On 07-09-15 15:24, Alex Potapenko wrote:
> Dear all,
>
> I'm experiencing a very odd issue on which neither my knowledge, nor googling
> don't shed any light. I am Optware-ng developer (Optware fork), and I use
> toolchains built using Buildroot to cross-compile packages for three archs. One
> of them, armeabi (cortex-A9), was stated to work on AmLogic s812 android box
> (cortex-A9 cpu) (https://github.com/alllexx88/Optware-ng/issues/6). However,
> when I tried to reproduce a similar setup on my android phone Samsung Galaxy SII
> I9100 (cortex-A9 as well), I encountered the issue of all dynamically linked
> programs failing:
>
> root at GT-I9100:/opt # /opt/bin/nano
> /opt/bin/nano: can't load library 'libz.so.1'
> root at GT-I9100:/opt # /opt/bin/file
> /opt/bin/file: can't load library 'libmagic.so.1'
Since you're calling /opt/bin/nano, I guess you have installed the buildroot
rootfs in /opt/. However, the rootfs assumes it will be put in / so the dynamic
linker is configured as /lib/ld-uClibc-1.0.5.so (or the glibc or musl linker).
Since that doesn't exist, the kernel will fall back to the default dynamic
linker, which doesn't know about the shared libraries in /opt and probably even
has a different ABI, so it fails miserably.
Solution: install stuff in /. Since all of the Android stuff is in /system,
there shouldn't be any conflict with the Android install.
Regards,
Arnout
>
>
> Static binaries work fine:
>
> root at GT-I9100:/opt # /opt/bin/ipkg -h
> /opt/bin/ipkg: unrecognized option `-h'
> ipkg: ipkg must have one sub-command argument
> ipkg version 0.99.163
> usage: ipkg [options...] sub-command [arguments...]
> where sub-command is one of:
>
[snip]
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
More information about the buildroot
mailing list