1

Building Alexa Auto SDK https://github.com/alexa/alexa-auto-sdk/blob/3.2/builder/README.md

Using Ubuntu 20.04 (I've no more 18.04) I run with

./builder/build.sh android -t androidx86-64 --android-api 28

into

| ../../m4-1.4.18/lib/freadahead.c: In function ‘freadahead’:
| ../../m4-1.4.18/lib/freadahead.c:92:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
|    92 |  #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
|       |   ^~~~~
| make[3]: *** [Makefile:1915: freadahead.o] Error 1
| make[3]: *** Waiting for unfinished jobs....
| ../../m4-1.4.18/lib/fseeko.c: In function ‘rpl_fseeko’:
| ../../m4-1.4.18/lib/fseeko.c:110:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
|   110 |   #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
|       |    ^~~~~
| make[3]: *** [Makefile:1915: fseeko.o] Error 1
| make[3]: Leaving directory '/home/hannes/git/alexa-auto-sdk/builder/build/tmp-android-28/work/x86_64-linux/m4-native/1.4.18-r0/build/lib'
| make[2]: *** [Makefile:1674: all] Error 2
| make[2]: Leaving directory '/home/hannes/git/alexa-auto-sdk/builder/build/tmp-android-28/work/x86_64-linux/m4-native/1.4.18-r0/build/lib'
| make[1]: *** [Makefile:1572: all-recursive] Error 1
| make[1]: Leaving directory '/home/hannes/git/alexa-auto-sdk/builder/build/tmp-android-28/work/x86_64-linux/m4-native/1.4.18-r0/build'
| make: *** [Makefile:1528: all] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/hannes/git/alexa-auto-sdk/builder/build/tmp-android-28/work/x86_64-linux/m4-native/1.4.18-r0/temp/log.do_compile.2647129)
ERROR: Task (/home/hannes/oe-core/meta/recipes-devtools/m4/m4-native_1.4.18.bb:do_compile) failed with exit code '1'

This is the last significant part from /home/hannes/git/alexa-auto-sdk/builder/build/tmp-android-28/work/x86_64-linux/m4-native/1.4.18-r0/temp/log.do_compile.2647129

Does someone knows how to solve it ?

hannes ach
  • 16,247
  • 7
  • 61
  • 84
  • What is the log at `/home/hannes/git/alexa-auto-sdk/builder/build/tmp-android-28/work/x86_64-linux/m4-native/1.4.18-r0/temp/log.do_compile.2647129` – callmemath Sep 15 '21 at 09:01
  • @lescaudr This is the last significant part from /home/hannes/git/alexa-auto-sdk/builder/build/tmp-android-28/work/x86_64-linux/m4-native/1.4.18-r0/temp/log.do_compile.2647129 – hannes ach Sep 15 '21 at 09:33

2 Answers2

1

This was an interoperability problem between GNU m4 1.4.18 and newer glibc header files.

It is fixed in GNU m4 1.4.19, available from https://ftp.gnu.org/gnu/m4/ and the GNU mirrors.

Bruno Haible
  • 1,203
  • 8
  • 8
  • But how to apply m4 1.4.19 ? I did: wget ftp://ftp.gnu.org/gnu/m4/m4-1.4.19.tar.gz && tar -xvzf m4-1.4.19.tar.gz && cd m4-1.4.19/ && ./configure --prefix=/usr/local/m4 && make But system still uses 1.4.18 – hannes ach Sep 17 '21 at 06:00
  • The complete answer is here https://stackoverflow.com/a/69279143/1079990 – hannes ach Sep 22 '21 at 06:43
1

I had a similar issue when I compiling in yocto.

Please Remove this line

#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */

and add this line in the file.

#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */

Also updated stdio-impl.h with:

/* Glibc 2.28 made _IO_IN_BACKUP private.  For now, work around this
problem by defining it ourselves.  FIXME: Do not rely on glibc
internals.  */

#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
# define _IO_IN_BACKUP 0x100
#endif