Building AOSP - make failed (ninja failed)


#1

Hi together,
trying to build AOSP for the DB 410c. Make gives the following error:

error: function-like macro ‘__has_cpp_attribute’ is not defined
#if defined(__has_cpp_attribute) && __has_cpp_attribute(clang::fallthrough)
^
1 error generated.
10:28:47 ninja failed with: exit status 1

Any idea? Thanks in advance for your suggestions and replies.
BR,
Thomas


#2

…full stack:

[ 0% 3/64978] target thumb C: libmesa_glsl <= out/target/product/db410c32_only/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/glcpp/glcpp-parse.c

FAILED: out/target/product/db410c32_only/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/glcpp/glcpp-parse.o

/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-r344140b/bin/clang -I external/mesa3d/src/mapi -I external/mesa3d/src/mesa -I external/mesa3d/src/gallium/include -I external/mesa3d/src/gallium/auxiliary -I out/target/product/db410c32_only/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl -I out/target/product/db410c32_only/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/glcpp -I external/mesa3d/src/compiler/glsl -I external/mesa3d/src/compiler/glsl/glcpp -I external/mesa3d/src -I external/mesa3d/include -I external/mesa3d/src/compiler -I out/target/product/db410c32_only/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates -I out/target/product/db410c32_only/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates -I libnativehelper/include_jni $(cat out/target/product/db410c32_only/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/import_includes) -I system/core/include -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -isystem out/target/product/db410c32_only/obj/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -c -fomit-frame-pointer -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Wimplicit-fallthrough -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -Wno-zero-as-null-pointer-constant -Wno-deprecated-register -Wno-sign-compare -Wno-defaulted-function-deleted -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,–noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -Werror=format-security -nostdlibinc -msoft-float -march=armv8-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -D__ARM_FEATURE_LPAE=1 -target armv7a-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -std=gnu99 -mthumb -Os -Wno-error -Wno-unused-parameter -Wno-pointer-arith -Wno-missing-field-initializers -Wno-initializer-overrides -Wno-mismatched-tags -DVERSION=\&quot;18.0.2\&quot; -DPACKAGE_VERSION=\&quot;18.0.2\&quot; -DPACKAGE_BUGREPORT=\&quot;https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\&quot; -DANDROID_API_LEVEL=28 -DENABLE_SHADER_CACHE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE_PTHREAD=1 -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_ZLIB -DMAJOR_IN_SYSMACROS -fvisibility=hidden -Wno-sign-compare -DHAVE_TIMESPEC_GET -DHAVE_LIBDRM -fPIC -DUSE_ARM_ASM -DDEFAULT_DRIVER_DIR=\&quot;/vendor/lib/dri\&quot; -D_USING_LIBCXX -std=c99 -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type-limit-compare -Wno-tautological-unsigned-enum-zero-compare -Wno-tautological-unsigned-zero-compare -Wno-null-pointer-arithmetic -Wno-enum-compare -Wno-enum-compare-switch -Wno-c++98-compat-extra-semi -Wno-self-assign-overloaded -Wno-constant-logical-operand -Wno-return-std-move-in-c++11 -Wno-dangling-field -MD -MF out/target/product/db410c32_only/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/glcpp/glcpp-parse.d -o out/target/product/db410c32_only/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/glcpp/glcpp-parse.o out/target/product/db410c32_only/obj/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/glcpp/glcpp-parse.c"

out/target/product/db410c32_only/gen/STATIC_LIBRARIES/libmesa_glsl_intermediates/glsl/glcpp/glcpp-parse.c:1429:37: error: function-like macro ‘__has_cpp_attribute’ is not defined

#if defined(__has_cpp_attribute) && __has_cpp_attribute(clang::fallthrough)


#3

known issue
see: Building AOSP - lunch command fails


#4

Thanks. Tried to build again after a sync. Now the build was successful. Great:)