* [Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library @ 2015-09-07 13:24 Alex Potapenko 2015-09-07 14:33 ` Arnout Vandecappelle 0 siblings, 1 reply; 12+ messages in thread From: Alex Potapenko @ 2015-09-07 13:24 UTC (permalink / raw) To: buildroot 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' > 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: > > ... > I then compiled static strace to try to debug this, and this is what I got: root at GT-I9100:/opt # /opt/bin/strace /opt/bin/file > execve("/opt/bin/file", ["/opt/bin/file"], [/* 18 vars */]) = 0 > mmap2(NULL, 4096, PROT_READ|PROT_WRITE, > MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x400cb000 > open("/opt/lib/libmagic.so.1", O_RDONLY) = 3 > fstat(3, 0xbe845054) = -1 EOVERFLOW (Value too large > for defined data type) > close(3) = 0 > open("/system/lib/libmagic.so.1", O_RDONLY) = -1 ENOENT (No such file or > directory) > open("/opt/lib/libmagic.so.1", O_RDONLY) = 3 > fstat(3, 0xbe845054) = -1 EOVERFLOW (Value too large > for defined data type) > close(3) = 0 > open("/opt/lib/libmagic.so.1", O_RDONLY) = 3 > fstat(3, 0xbe845044) = -1 EOVERFLOW (Value too large > for defined data type) > close(3) = 0 > open("/opt/X11R6/lib/libmagic.so.1", O_RDONLY) = 3 > fstat(3, 0xbe845044) = -1 EOVERFLOW (Value too large > for defined data type) > close(3) = 0 > mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) > = 0x4017a000 > write(2, "", 0) = 0 > write(2, "/opt/bin/file", 13/opt/bin/file) = 13 > write(2, ": can't load library '", 22: can't load library ') = 22 > write(2, "libmagic.so.1", 13libmagic.so.1) = 13 > write(2, "'\n", 2' > ) = 2 > munmap(0x4017a000, 4096) = 0 > exit(16) = ? > root at GT-I9100:/opt # /opt/bin/strace /opt/bin/nano > execve("/opt/bin/nano", ["/opt/bin/nano"], [/* 18 vars */]) = 0 > mmap2(NULL, 4096, PROT_READ|PROT_WRITE, > MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x400f0000 > open("/opt/lib/libz.so.1", O_RDONLY) = 3 > fstat(3, 0xbe8ed054) = -1 EOVERFLOW (Value too large > for defined data type) > close(3) = 0 > open("/system/lib/libz.so.1", O_RDONLY) = -1 ENOENT (No such file or > directory) > open("/opt/lib/libz.so.1", O_RDONLY) = 3 > fstat(3, 0xbe8ed054) = -1 EOVERFLOW (Value too large > for defined data type) > close(3) = 0 > open("/opt/lib/libz.so.1", O_RDONLY) = 3 > fstat(3, 0xbe8ed044) = -1 EOVERFLOW (Value too large > for defined data type) > close(3) = 0 > open("/opt/X11R6/lib/libz.so.1", O_RDONLY) = 3 > fstat(3, 0xbe8ed044) = -1 EOVERFLOW (Value too large > for defined data type) > close(3) = 0 > mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) > = 0x4014d000 > write(2, "", 0) = 0 > write(2, "/opt/bin/nano", 13/opt/bin/nano) = 13 > write(2, ": can't load library '", 22: can't load library ') = 22 > write(2, "libz.so.1", 9libz.so.1) = 9 > write(2, "'\n", 2' > ) = 2 > munmap(0x4014d000, 4096) = 0 > exit(16) = ? > Unfortunately, this is as far as I got, googling this kind of error (EOVERFLOW) lead no nothing. I was wondering If maybe some Buildroot (Target?) options could lead to this kind of issue? See attached two configs: Buildroot-2015.02 (was used to build most of the feed) and Buildroot-2015.08 (recently upgraded to). Some system info: root at GT-I9100:/opt # uname -a > Linux localhost 3.0.64-CM-g987cf93 #1 SMP PREEMPT Sat Jun 20 04:51:08 CEST > 2015 armv7l GNU/Linux > root at GT-I9100:/opt # cat /proc/cpuinfo > Processor : ARMv7 Processor rev 1 (v7l) > processor : 0 > BogoMIPS : 1592.52 > > Features : swp half thumb fastmult vfp edsp neon vfpv3 tls > CPU implementer : 0x41 > CPU architecture: 7 > CPU variant : 0x2 > CPU part : 0xc09 > CPU revision : 1 > > Hardware : SMDK4210 > Revision : 000e > Serial : 304d199de663701f > root at GT-I9100:/opt # env > _=/system/xbin/env > ANDROID_DATA=/data > HOSTNAME=GT-I9100 > > BOOTCLASSPATH=/system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar > PATH=/sbin:/system/sbin:/system/bin:/system/xbin:/opt/bin:/opt/sbin > ANDROID_ROOT=/system > SHELL=/system/bin/sh > MKSH=/system/bin/sh > USER=root > LOGNAME=root > ANDROID_PROPERTY_WORKSPACE=10,32768 > EXTERNAL_STORAGE=/sdcard > ANDROID_ASSETS=/system/app > TERM=xterm > RANDOM=20786 > LD_LIBRARY_PATH=/system/lib > HOME=/sdcard > ANDROID_BOOTLOGO=1 And here's an ARM router with which everything works fine [root at unknown root]$ uname -a > Linux unknown 2.6.36.4brcmarm #26 SMP PREEMPT Mon Feb 9 14:40:52 CET 2015 > armv7l GNU/Linux > [root at unknown root]$ cat /proc/cpuinfo > Processor : ARMv7 Processor rev 0 (v7l) > processor : 0 > BogoMIPS : 1599.07 > > processor : 1 > BogoMIPS : 1595.80 > > Features : swp half thumb fastmult edsp > CPU implementer : 0x41 > CPU architecture: 7 > CPU variant : 0x3 > CPU part : 0xc09 > CPU revision : 0 > > Hardware : Northstar Prototype > Revision : 0000 > Serial : 0000000000000000 I'd be very thankful if someone could help me solve this mystery, since this goes beyond my knowledge and experience. -- Best regards, Alex Potapenko -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150907/d740960b/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: config Type: application/octet-stream Size: 55941 bytes Desc: not available URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150907/d740960b/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: config.old Type: application/x-trash Size: 50658 bytes Desc: not available URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150907/d740960b/attachment.old> ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library 2015-09-07 13:24 [Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library Alex Potapenko @ 2015-09-07 14:33 ` Arnout Vandecappelle [not found] ` <CAF5aO=LYm6GYVXv0gJW9fS3A8JXMAeZwnEokG0Htpac4SZuJVQ@mail.gmail.com> 0 siblings, 1 reply; 12+ messages in thread From: Arnout Vandecappelle @ 2015-09-07 14:33 UTC (permalink / raw) To: buildroot 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <CAF5aO=LYm6GYVXv0gJW9fS3A8JXMAeZwnEokG0Htpac4SZuJVQ@mail.gmail.com>]
* [Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library [not found] ` <CAF5aO=LYm6GYVXv0gJW9fS3A8JXMAeZwnEokG0Htpac4SZuJVQ@mail.gmail.com> @ 2015-09-07 14:53 ` Alex Potapenko 2015-09-07 15:17 ` Arnout Vandecappelle 0 siblings, 1 reply; 12+ messages in thread From: Alex Potapenko @ 2015-09-07 14:53 UTC (permalink / raw) To: buildroot Thank you for your response, Arnout! Unfortunately, that is not the reason here. I use Buildroot to build the toolchain only. And then use modified Optware build system to cross-compile the packages. armeabi feed is built with ' -Wl,--dynamic-linker=/opt/lib/ld-uClibc.so.0' ld flag, so they know where the linker resides. 7 ???. 2015 17:33 "Arnout Vandecappelle" <arnout@mind.be> ????: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150907/b417b21d/attachment.html> ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library 2015-09-07 14:53 ` Alex Potapenko @ 2015-09-07 15:17 ` Arnout Vandecappelle 2015-09-07 17:49 ` Alex Potapenko 0 siblings, 1 reply; 12+ messages in thread From: Arnout Vandecappelle @ 2015-09-07 15:17 UTC (permalink / raw) To: buildroot On 07-09-15 16:53, Alex Potapenko wrote: > Thank you for your response, Arnout! > Unfortunately, that is not the reason here. I use Buildroot to build the > toolchain only. And then use modified Optware build system to cross-compile the > packages. armeabi feed is built with ' > -Wl,--dynamic-linker=/opt/lib/ld-uClibc.so.0' ld flag, so they know where the > linker resides. Weird, since strace shows that it is looking inside /system and lc-uClibc.so would never do that... Your kernel does have CONFIG_AEABI I hope? Could you try to build without the --dynamic-linker and install in / ? Just to exclude that potential issue. Regards, Arnout PS Please don't top-post. [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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library 2015-09-07 15:17 ` Arnout Vandecappelle @ 2015-09-07 17:49 ` Alex Potapenko 2015-09-07 20:40 ` Arnout Vandecappelle 0 siblings, 1 reply; 12+ messages in thread From: Alex Potapenko @ 2015-09-07 17:49 UTC (permalink / raw) To: buildroot Sorry, top posting was an accident: I first pressed 'Reply' instead of 'Reply to all', then typed the message, and then noticed it. Thought if I only change the recipients, not the topic, it'll be OK. Anyway, /system/lib appears in strace output only because of LD_LIBRARY_PATH env variable, which is populated by android as '/system/lib' and is respected by uclibc. If I empty this variable, those entries go away. Optware-ng is designed to reside in /opt, be firmware-independed and run fine as long as the arch is right. At least if it doesn't pick up wrong libs first because of LD_LIBRARY_PATH containing conflicting libs. That is why I expected it to work with my phone, arch seems right... But it doesn't! And that's the mystery, the strace EOVERFLOW error tells me nothing, and I don't even know where to look, what to try, etc. Thanks 7 ???. 2015 18:17 "Arnout Vandecappelle" <arnout@mind.be> ????: > On 07-09-15 16:53, Alex Potapenko wrote: > > Thank you for your response, Arnout! > > Unfortunately, that is not the reason here. I use Buildroot to build the > > toolchain only. And then use modified Optware build system to > cross-compile the > > packages. armeabi feed is built with ' > > -Wl,--dynamic-linker=/opt/lib/ld-uClibc.so.0' ld flag, so they know > where the > > linker resides. > > Weird, since strace shows that it is looking inside /system and > lc-uClibc.so > would never do that... > > Your kernel does have CONFIG_AEABI I hope? > > > Could you try to build without the --dynamic-linker and install in / ? > Just to > exclude that potential issue. > > > Regards, > Arnout > > PS Please don't top-post. > > [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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150907/72f17c57/attachment.html> ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library 2015-09-07 17:49 ` Alex Potapenko @ 2015-09-07 20:40 ` Arnout Vandecappelle 2015-09-08 9:07 ` Waldemar Brodkorb 0 siblings, 1 reply; 12+ messages in thread From: Arnout Vandecappelle @ 2015-09-07 20:40 UTC (permalink / raw) To: buildroot On 07-09-15 19:49, Alex Potapenko wrote: > Sorry, top posting was an accident: I first pressed 'Reply' instead of 'Reply to > all', then typed the message, and then noticed it. Thought if I only change the > recipients, not the topic, it'll be OK. Well, you're still top-posting... [1] > Anyway, /system/lib appears in strace output only because of LD_LIBRARY_PATH env > variable, which is populated by android as '/system/lib' and is respected by > uclibc. If I empty this variable, those entries go away. Ah OK. > Optware-ng is designed to reside in /opt, be firmware-independed and run fine as > long as the arch is right. And the kernel ABI is compatible of course. Hm, you're running 2.6.36 headers against a 3.0 kernel... Normally that shouldn't be an issue, but maybe there are some LARGEFILE related changes that are not entirely ABI-compatible - or perhaps it's a uClibc bug to not do this in an ABI-compatible way. I see in fs/compat.c that cp_compat_stat() can return -EOVERFLOW if the inode is 64 bit while the syscall is 32 bit. But since the toolchain is LFS I don't see how this could happen... > At least if it doesn't pick up wrong libs first > because of LD_LIBRARY_PATH containing conflicting libs. That is why I expected > it to work with my phone, arch seems right... But it doesn't! And that's the > mystery, the strace EOVERFLOW error tells me nothing, and I don't even know > where to look, what to try, etc. It would help if you would have your phone's kernel config. Do you have it? Regards, Arnout [1] https://en.wikipedia.org/wiki/Posting_style#Top-posting > > Thanks > > 7 ???. 2015 18:17 "Arnout Vandecappelle" <arnout@mind.be > <mailto:arnout@mind.be>> ????: > > On 07-09-15 16:53, Alex Potapenko wrote: > > Thank you for your response, Arnout! > > Unfortunately, that is not the reason here. I use Buildroot to build the > > toolchain only. And then use modified Optware build system to > cross-compile the > > packages. armeabi feed is built with ' > > -Wl,--dynamic-linker=/opt/lib/ld-uClibc.so.0' ld flag, so they know where the > > linker resides. > > Weird, since strace shows that it is looking inside /system and lc-uClibc.so > would never do that... > > Your kernel does have CONFIG_AEABI I hope? > > > Could you try to build without the --dynamic-linker and install in / ? Just to > exclude that potential issue. > > > Regards, > Arnout > > PS Please don't top-post. > > [snip] > > -- > Arnout Vandecappelle arnout at mind be > Senior Embedded Software Architect +32-16-286500 > <tel:%2B32-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 > -- 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library 2015-09-07 20:40 ` Arnout Vandecappelle @ 2015-09-08 9:07 ` Waldemar Brodkorb 2015-09-08 14:59 ` Alex Potapenko 0 siblings, 1 reply; 12+ messages in thread From: Waldemar Brodkorb @ 2015-09-08 9:07 UTC (permalink / raw) To: buildroot Hi, Arnout Vandecappelle wrote, > And the kernel ABI is compatible of course. > > Hm, you're running 2.6.36 headers against a 3.0 kernel... Normally that > shouldn't be an issue, but maybe there are some LARGEFILE related changes that > are not entirely ABI-compatible - or perhaps it's a uClibc bug to not do this in > an ABI-compatible way. I see in fs/compat.c that cp_compat_stat() can return > -EOVERFLOW if the inode is 64 bit while the syscall is 32 bit. But since the > toolchain is LFS I don't see how this could happen... I would like to know if your nano configure says something like this: checking for _FILE_OFFSET_BITS value needed for large files... 64 Is your filesystem on the Android device bigger than 2 GB? (where /opt and nano + libraries lives in) best regards Waldemar ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library 2015-09-08 9:07 ` Waldemar Brodkorb @ 2015-09-08 14:59 ` Alex Potapenko 2015-09-08 15:24 ` Arnout Vandecappelle 0 siblings, 1 reply; 12+ messages in thread From: Alex Potapenko @ 2015-09-08 14:59 UTC (permalink / raw) To: buildroot Thank you for your responses, Arnout and Waldemar! > Well, you're still top-posting... [1] ... [1] https://en.wikipedia.org/wiki/Posting_style#Top-posting Very foolish of me, I misunderstood the meaning of this notion. I now understand what it means and will avoid doing so. I would like to know if your nano configure says something like > this: > checking for _FILE_OFFSET_BITS value needed for large files... 64 > Is your filesystem on the Android device bigger than 2 GB? > (where /opt and nano + libraries lives in) Yes, looking at nano config.log reveals this: > configure:5147: checking for _FILE_OFFSET_BITS value needed for large files > ... > configure:5204: result: 64 And /data partition that contains /opt is exactly 2 GB. Does this mean that it is a 32 bit file system, while the toolchain uses 64 bit file system interface? Will it work if I create an ext2 partition larger than 2 GB on my memory card and mount it as /opt? It would help if you would have your phone's kernel config. Do you have it? Unfortunately, no, I don't have the exact config used to build the kernel. I know it was compiled from this source: https://github.com/CyanogenMod/android_kernel_samsung_smdk4412 I ran `make exynos4_defconfig`, then manually selected arch (exynos4) and mach (not sure I selected right, but that probably doesn't matter here). See the result attached. Thanks a lot! -- Best regards, Alex Potapenko -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150908/ea77de0e/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: kernel-config Type: application/octet-stream Size: 33757 bytes Desc: not available URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150908/ea77de0e/attachment.obj> ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library 2015-09-08 14:59 ` Alex Potapenko @ 2015-09-08 15:24 ` Arnout Vandecappelle 2015-09-08 15:29 ` Alex Potapenko 0 siblings, 1 reply; 12+ messages in thread From: Arnout Vandecappelle @ 2015-09-08 15:24 UTC (permalink / raw) To: buildroot On 08-09-15 16:59, Alex Potapenko wrote: [snip] > I would like to know if your nano configure says something like > this: > checking for _FILE_OFFSET_BITS value needed for large files... 64 > Is your filesystem on the Android device bigger than 2 GB? > (where /opt and nano + libraries lives in) > > > Yes, looking at nano config.log reveals this: > > configure:5147: checking for _FILE_OFFSET_BITS value needed for large files > ... > configure:5204: result: 64 > > > And /data partition that contains /opt is exactly 2 GB. Does this mean that it > is a 32 bit file system, while the toolchain uses 64 bit file system interface? The -EOVERFLOW suggests the reverse: it's a large filesystem and we're making a 32-bit syscall. However, since we're building with LARGEFILE (which is forced in current buildroot), all syscalls should be largefile syscalls so this issue should not occur... However, in your 2015.08 config, I see you're using a custom uClibc config. You're not turning off any largefile options there, are you? Regards, Arnout > Will it work if I create an ext2 partition larger than 2 GB on my memory card > and mount it as /opt? > > It would help if you would have your phone's kernel config. Do you have it? > > > Unfortunately, no, I don't have the exact config used to build the kernel. I > know it was compiled from this source: > https://github.com/CyanogenMod/android_kernel_samsung_smdk4412 > > I ran `make exynos4_defconfig`, then manually selected arch (exynos4) and mach > (not sure I selected right, but that probably doesn't matter here). See the > result attached. > > Thanks a lot! > > -- > Best regards, > Alex Potapenko -- Arnout Vandecappelle arnout dot vandecappelle at essensium dot com Senior Embedded Software Architect . . . . . . +32-478-010353 (mobile) Essensium, Mind division . . . . . . . . . . . . . . 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library 2015-09-08 15:24 ` Arnout Vandecappelle @ 2015-09-08 15:29 ` Alex Potapenko 2015-09-08 15:58 ` Alex Potapenko 0 siblings, 1 reply; 12+ messages in thread From: Alex Potapenko @ 2015-09-08 15:29 UTC (permalink / raw) To: buildroot > > The -EOVERFLOW suggests the reverse: it's a large filesystem and we're > making a > 32-bit syscall. > However, since we're building with LARGEFILE (which is forced in current > buildroot), all syscalls should be largefile syscalls so this issue should > not > occur... > However, in your 2015.08 config, I see you're using a custom uClibc > config. > You're not turning off any largefile options there, are you? That custom config is the config from 2015.02. I upgraded the toolchain to use gcc-5.2.0 (Buildroot 2015.08) from gcc-4.9.2 (Buildroot 2015.02), but didn't want to re-build entire feeds, so have done this for compatibility. If it was forced back in 2015.02, it should be OK. Thanks -- Best regards, Alex Potapenko -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150908/ea96b67e/attachment.html> ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library 2015-09-08 15:29 ` Alex Potapenko @ 2015-09-08 15:58 ` Alex Potapenko 2015-09-08 19:41 ` Waldemar Brodkorb 0 siblings, 1 reply; 12+ messages in thread From: Alex Potapenko @ 2015-09-08 15:58 UTC (permalink / raw) To: buildroot P.S. LFS is enabled: > UCLIBC_HAS_LFS=y in the custom config -- Best regards, Alex Potapenko -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150908/2d5fd06b/attachment.html> ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library 2015-09-08 15:58 ` Alex Potapenko @ 2015-09-08 19:41 ` Waldemar Brodkorb 0 siblings, 0 replies; 12+ messages in thread From: Waldemar Brodkorb @ 2015-09-08 19:41 UTC (permalink / raw) To: buildroot Hi Alex, Alex Potapenko wrote, > P.S. LFS is enabled: > > UCLIBC_HAS_LFS=y > > ? > in the custom config Can you compile attached test program and execute it on your target with a file in /opt and some other partition. I want to see if the problem is really related to fstat. Please link it statically. best regards Waldemar -------------- next part -------------- A non-text attachment was scrubbed... Name: fstat-tst.c Type: text/x-csrc Size: 615 bytes Desc: not available URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150908/a6145be2/attachment.c> ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-09-08 19:41 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-07 13:24 [Buildroot] EOVERFLOW fstat() error on cortex-A9 android when trying to load shared library Alex Potapenko
2015-09-07 14:33 ` Arnout Vandecappelle
[not found] ` <CAF5aO=LYm6GYVXv0gJW9fS3A8JXMAeZwnEokG0Htpac4SZuJVQ@mail.gmail.com>
2015-09-07 14:53 ` Alex Potapenko
2015-09-07 15:17 ` Arnout Vandecappelle
2015-09-07 17:49 ` Alex Potapenko
2015-09-07 20:40 ` Arnout Vandecappelle
2015-09-08 9:07 ` Waldemar Brodkorb
2015-09-08 14:59 ` Alex Potapenko
2015-09-08 15:24 ` Arnout Vandecappelle
2015-09-08 15:29 ` Alex Potapenko
2015-09-08 15:58 ` Alex Potapenko
2015-09-08 19:41 ` Waldemar Brodkorb
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox