GNU bug report logs -
#34239
build failure on Android, due to S_MAGIC_* symbols
Previous Next
Full log
Message #11 received at 34239 <at> debbugs.gnu.org (full text, mbox):
On Tue, Jan 29, 2019 at 9:01 PM Pádraig Brady <P <at> draigbrady.com> wrote:
> On 28/01/19 19:19, Bruno Haible wrote:
> > Hi,
> >
> > Compiling coreutils on Android produces this error:
> >
> > CC src/tail.o
> > In file included from ../src/tail.c:63:
> > ../src/fs-is-local.h: In function 'is_local_fs_type':
> > ../src/fs-is-local.h:9: error: 'S_MAGIC_AAFS' undeclared (first use in this function)
> > ...
> > make[2]: *** [src/tail.o] Error 1
> >
> > The Android libc, Bionic, does not define any of these S_MAGIC_* symbols or
> > macros, even in the newest version [1].
> >
> > Can some #ifdef be used to avoid this build failure?
> > 'defined __ANDROID__' tests for Android.
> > 'defined __linux__' tests for Linux excluding Android.
> >
> > Bruno
> >
> > [1] https://android.googlesource.com/platform/bionic/
>
> Interesting. So inotify is supported on that android system.
> Our ifdefs were wrong anyway as we check for remoteness even if one disables inotify.
> I.E. our build would have failed on standard linux if one explicitly disabled inotify.
> I've fixed that up and added support for the android specific "sdcardfs" which I found in:
> https://android.googlesource.com/kernel/common/+/android-mainline-tracking/include/uapi/linux/magic.h
>
> Proposed patch attached.
Looks all good. Thanks!
This bug report was last modified 6 years and 121 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.