Help AOSP building failed

1,191 views
Skip to first unread message

Marco Tommolini

unread,
Oct 21, 2017, 12:29:45 PM10/21/17
to Android Building
HI, I'm trying to buid an AOSP and after I fixed some errors I get the following errors that I don't know how to resolve:

root@mh2-K55VD:/bin/repo_work_directory# make -j16
============================================
PLATFORM_VERSION_CODENAME=P
PLATFORM_VERSION=P
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.10.0-37-generic-x86_64-Ubuntu-17.04
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OC
OUT_DIR=out
============================================
ninja: no work to do.
ninja: no work to do.
No need to regenerate ninja file
No need to regenerate ninja file
[  0% 3/60195] Yacc: ss <= external/iproute2/misc/ssfilter.y
FAILED: out/target/product/generic/obj/EXECUTABLES/ss_intermediates/ssfilter.c 
/bin/bash -c "prebuilts/misc/linux-x86/bison/bison -d  --defines=out/target/product/generic/obj/EXECUTABLES/ss_intermediates/ssfilter.h -o out/target/product/generic/obj/EXECUTABLES/ss_intermediates/ssfilter.c external/iproute2/misc/ssfilter.y"
external/iproute2/misc/ssfilter.y: 31 conflitti shift/riduzione
prebuilts/misc/linux-x86/bison/bison: Sotto-processo m4 non riuscito: File o directory non esistente
[  0% 18/60195] Check module type: out/target/product/generic/obj/SHARED_LIBRARIES/android.hardware.power@1.0_intermediates/link_type
ninja: build stopped: subcommand failed.
12:48:56 ninja failed with: exit status 1

#### failed to build some targets (42 seconds) ####


What am I doing wrong? I've Ubuntu 17.04.
Thanks in advance

Dan Willemsen

unread,
Oct 23, 2017, 8:20:41 PM10/23/17
to Android Building
It looks like bison is looking for `m4` in your path, so you'll need to install it with apt. We don't currently have a prebuilt of m4 to go along with the bison prebuilt.

- Dan

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-building+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Durkacz

unread,
Jan 25, 2019, 10:53:59 PM1/25/19
to Android Building
In response to reported build error,

on Tuesday, October 24, 2017 at 11:20:41 AM UTC+11, Dan Willemsen wrote:
It looks like bison is looking for `m4` in your path, so you'll need to install it with apt. We don't currently have a prebuilt of m4 to go along with the bison prebuilt.

Is there some reason why Android needs its own version of bison? If not it is better if we can use a standard version, however the answer given by DW suggests that they would like to have a prebuilt version of m4 even though the standard version would work.

Dan Willemsen

unread,
Jan 28, 2019, 11:36:13 PM1/28/19
to Android Building
There's a more general set of reasons that we prefer prebuilts (and are increasingly using them, or building the tools from source during the build):

Asking users to non-default packages works during the first setup, but adding packages to that list means that every user will hit some sort of error message and need to find the instructions again to know what to do. For users that don't administer their own machines (in corporate environments, etc), this can be an even longer process. And if we remove the need for a package, it's likely going to stay on their machines forever.

Then there's the problem ensuring that everyone uses the same version so that their build results are the same. When we recommended staying on Ubuntu LTS versions this mostly worked, though was a bit problematic when switching LTS versions. It also meant that we were stuck with whatever (usually old) version was in the LTS, so if it was buggy, or we wanted to use new features, we had to wait. Or if we had code that didn't work with the newer version, a system update could break everyones builds.

A similar problem is that we also (somewhat) support building on MacOS, and none of the tools there line up with the version (or for some, implementation) used by the Ubuntu LTS.

We're now running a mix of OSes inside Google to build Android -- some Ubuntu 14.04 (some Goobuntu, which is very similar), some gLinux (roughly Debian Testing), and some Mac. Outside of Google I'm sure that list is much longer. Using prebuilts/checked in sources let us produce more reproducible results across all of them, and prevent issues where changes break only some of the builds.

We're not quite self-sufficient, but we're moving that direction -- in master, the $PATH inside the build is limited in what can be used: https://android.googlesource.com/platform/build/soong/+/master/ui/build/paths/config.go#76 gives a reasonable idea (though a few of those end up being prebuilts, like java)

- Dan

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages