Error when trying to build Linaro AOSP

Hi Guys. I’m following the steps described here: https://www.96boards.org/documentation/consumer/dragonboard/dragonboard410c/guides/aosp.md.html.
After executing make -j$(nproc), I’m getting the folowing:

> $ make -j$(nproc)
> ============================================
> PLATFORM_VERSION_CODENAME=Q
> PLATFORM_VERSION=Q
> TARGET_PRODUCT=db410c32_only
> TARGET_BUILD_VARIANT=userdebug
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=arm
> TARGET_ARCH_VARIANT=armv8-a
> TARGET_CPU_VARIANT=cortex-a53
> HOST_ARCH=x86_64
> HOST_2ND_ARCH=x86
> HOST_OS=linux
> HOST_OS_EXTRA=Linux-4.12.14-lp150.12.16-default-x86_64-openSUSE-Leap-15.0
> HOST_CROSS_OS=windows
> HOST_CROSS_ARCH=x86
> HOST_CROSS_2ND_ARCH=x86_64
> HOST_BUILD_TYPE=release
> BUILD_ID=PI
> OUT_DIR=out
> ============================================
> [ 53% 465/868] including system/sepolicy/Android.mk ...
> system/sepolicy/Android.mk:79: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version
> [ 99% 867/868] finishing build rules ...
> FAILED: 
> [868/868] writing build ruless ...
> external/mesa3d/src/compiler/Android.glsl.gen.mk:94: error: writing to readonly directory: "external/mesa3d/src/compiler/glsl/ir.h"
> 14:22:36 ckati failed with: exit status 1
> 
> #### failed to build some targets (32 seconds) ####

Is anyone experiencing this? Or know how to solve it?

Hi, asssanti:

Have you solved this build error ???
Last week, I use the repo tool to download the latest aosp master branch.
I encounter the same problem.

Yesterday, I try to repo download again. And the error is another one like as below.

PLATFORM_VERSION_CODENAME=Q
PLATFORM_VERSION=Q
TARGET_PRODUCT=db410c32_only
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-135-generic-x86_64-Ubuntu-14.04.5-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PI
OUT_DIR=out
============================================
FAILED: ninja: ‘out/target/product/db410c32_only/gen/STATIC_LIBRARIES/libmesa_util_intermediates/format_srgb.c’, needed by ‘out/target/product/db410c32_only/obj/STATIC_LIBRARIES/libmesa_util_intermediates/format_srgb.c’, missing and no known rule to make it
09:22:58 ninja failed with: exit status 1

failed to build some targets (56 seconds)

Hi Guys,

Even im seeing the same failure.
Anyone found solution ?

Get feedback for this issue, there is a known breakage in the upstream AOSP/external/mesa3d project; now is working to get it fixed.

Hi All. I think my problem is very different to yours @u0084500. In my case was a “wiritng to readonly” problem that I solved by commenting --werror_writable in Kati’s code (or maybe it could work by changing to false in flags.cc?) But this sounds as a dirty workaround, although I can boot my db410