AOSP 16.03 Building from source troubles

Hi guys,

I want to start building images from source within hopes to get GPIO working for Android (Basic LED’s then more complex projects). - Some pointers would be great.

I followed the wiki guide and the git guide (link). However, both are giving me errors which I was unable to resolve. Below are the output form the git guide. Advice would be greatly appreciated.

… [all the includes]…
including ./tools/external/fat32lib/Android.mk …
*** Overlay change detected, clean shared intermediate files…
*** rm -rf out/target/common/obj/APPS/framework-res_intermediates out/target/common/obj/APPS/SettingsProvider_intermediates
out/host/linux-x86/bin/acp build-info/BUILD-INFO.txt out/target/product/hikey/BUILD-INFO.txt
Yacc: aidl <= frameworks/base/tools/aidl/aidl_language_y.y
Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
prebuilts/misc/linux-x86/bison/bison -d -o out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp frameworks/base/tools/aidl/aidl_language_y.y
logtags: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/content/EventLogTags.java <= frameworks/base/core/java/android/content/EventLogTags.logtags
logtags: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/speech/tts/EventLogTags.java <= frameworks/base/core/java/android/speech/tts/EventLogTags.logtags
logtags: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/webkit/EventLogTags.java <= frameworks/base/core/java/android/webkit/EventLogTags.logtags
frameworks/base/tools/aidl/aidl_language_l.l:55: warning, rule cannot be matched
flex-2.5.39: fatal internal error, exec of /usr/bin/m4 failed
build/core/binary.mk:646: recipe for target ‘out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp’ failed
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Broken pipe
make: *** Deleting file ‘out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp’
make: *** Waiting for unfinished jobs…
logtags: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/com/android/internal/logging/EventLogTags.java <= frameworks/base/core/java/com/android/internal/logging/EventLogTags.logtags
build/core/binary.mk:609: recipe for target ‘out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp’ failed
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Broken pipe

make failed to build some targets (02:48 (mm:ss))

Hi @ssa-jvz,

The error message looks like m4 is missing.
Would installing these package help?


$ sudo apt-get install autoconf m4