Forums - How to compile Android with the Snapdragon LLVM Compiler

29 posts / 0 new
Last post
How to compile Android with the Snapdragon LLVM Compiler
jake.weinstein
Join Date: 6 Aug 16
Posts: 15
Posted: Fri, 2016-09-30 15:29

Over the years, there have been many who have wanted to compile the Android platform with the Snapdragon LLVM Compiler, which has several performance enhancements for Snapdragon chipsets, such as improved Krait targeting and enhanced auto-vectorization for the NEON SIMD.  With Qualcomm's release of Android Nougat repos, it is now possible to compile target modules with their optimized compiler.  Please see the commits in the following repository for more information: https://source.codeaurora.org/quic/la/platform/build/log/?h=LA.BF64.1.2....

In order to use the Qualcomm Compiler to build Android for Snapdragon chipsets, please follow the steps below.  Please note that Darwin (Mac OS X) is not supported at this time.

1. Download the Qualcomm LLVM Compiler here: https://developer.qualcomm.com/download/sdllvm/snapdragon-llvm-compiler-...

2. Extract Snapdragon-llvm-3.8.4-toolchain.tar.gz

3. Move toolchains\llvm-Snapdragon_LLVM_for_Android_3.8\prebuilt\linux-x86_64 to prebuilts/clang/linux-x86/host/sdclang-3.8 within your Android build environment.

4. Add the following lines to your device's BoardConfig:

ifneq ($(HOST_OS),darwin)

SDCLANG := true

SDCLANG_PATH := prebuilts/clang/linux-x86/host/sdclang-3.8/bin

SDCLANG_LTO_DEFS := device/qcom/common/sdllvm-lto-defs.mk

endif

5. Compile Android

Please post your results here.  Many have reported improved scrolling and animation frame rates.

 

  • Up3
  • Down0
FSadino
Join Date: 14 Jan 17
Posts: 1
Posted: Sat, 2017-01-14 12:48

How to solve this error:

Quote:

[ 14% 5105/34476] target SharedLib: li...IES/libc_intermediates/LINKED/libc.so) FAILED: /bin/bash -c "prebuilts/misc/linux-x86/ccache/ccache prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -nostdlib -Wl,-soname,libc.so -Wl,--gc-sections -shared -L/home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/lib /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/arch-common/bionic/crtbrand.o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/arch-common/bionic/crtend_so.o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/bionic/malloc_common.o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/bionic/libc_init_dynamic.o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/bionic/NetdClient.o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/arch-common/bionic/crtbegin_so.o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/arch-arm/bionic/exidx_dynamic.o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/arch-arm/bionic/atexit_legacy.o -Wl,--whole-archive /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/STATIC_LIBRARIES/libjemalloc_intermediates/libjemalloc.a -Wl,--no-whole-archive /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/libcompiler_rt-extras.a prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/../lib/gcc/arm-linux-androideabi/4.9.4/libatomic.a prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/../lib/gcc/arm-linux-androideabi/4.9.4/libgcc.a -ldl -o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--icf=safe -Wl,--hash-style=gnu -Wl,--no-undefined-version -Wl,--no-fix-cortex-a8 -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -Wl,--hash-style=both -Wl,--version-script,bionic/libc/libc.arm.map -Wl,--no-undefined" clang++: error: unable to execute command: Segmentation fault (core dumped) clang++: error: linker command failed due to signal (use -v to see invocation) [ 14% 5105/34476] Compiling SDK Stubs:...tubs_current_intermediates/classes.jar Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. ninja: build stopped: subcommand failed. build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1 make: Leaving directory '/home/fsadino/android/LineageOS_14.1' #### make failed to build some targets (12:05 (mm:ss)) ####

  • Up0
  • Down0
dm47021
Join Date: 21 Nov 12
Posts: 2
Posted: Sun, 2017-01-15 22:45

Segmentation fault (core dumped) clang++: error: linker command failed due to signal

 
This is usually an internal compiler error, 
did you extract the files under build to the proper dirs?
  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 15
Posted: Mon, 2017-01-16 13:51

It doesn't look like you're using the Snapdragon LLVM toolchain.

Please send the version number from running the following command (from your ouput log):

prebuilts/misc/linux-x86/ccache/ccache prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -v

 

  • Up0
  • Down0
krassermensch
Join Date: 12 Aug 16
Posts: 2
Posted: Fri, 2017-03-10 12:02

Hi,

I tried to set it up as you explained but every time I try to compile I face this error:

 

[  8% 4239/51834] target SharedLib: libdl (/home/nico/beanstalk/out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so)
FAILED: /bin/bash -c "/usr/bin/ccache prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang++  -Wno-vectorizer-no-neon -nostdlib -Wl,-soname,libdl.so -Wl,--gc-sections -shared  -L/home/nico/beanstalk/out/target/product/pme/obj/lib /home/nico/beanstalk/out/target/product/pme/obj/lib/crtbegin_so.o             /home/nico/beanstalk/out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o        -Wl,--whole-archive   -Wl,--no-whole-archive   /home/nico/beanstalk/out/target/product/pme/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/libcompiler_rt-extras.a   libatomic.a prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/../lib/gcc/aarch64-linux-android/7.0.0/libgcc.a   -o /home/nico/beanstalk/out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so   -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,-maarch64linux -Wl,--hash-style=gnu -Wl,--fix-cortex-a53-843419 -fuse-ld=gold -Wl,--icf=safe -Wl,--no-undefined-version -Wl,--allow-shlib-undefined    -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin   -Wl,--exclude-libs=libgcc.a -Wl,--version-script=bionic/libdl/libdl.arm64.map /home/nico/beanstalk/out/target/product/pme/obj/lib/crtend_so.o"
clang-3.8: error: no such file or directory: 'libatomic.a'

 

Cache is wiped and I guess I didn't do any mistakes setting it up. Thus I don't know what I'm doin' wrong. I'd appreciate any recommendation. Thanks a lot!

Sincerely

Nico

  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 15
Posted: Fri, 2017-03-10 15:18

Hi Nico,

The static library file 'libatomic.a' should be part of the Android tree in the prebuilts directory and the path should be expanded similar to what is done for libgcc.a in your command line --> prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/../lib/gcc/aarch64-linux-android/7.0.0/libgcc.a.

Please run your failed command line and add the '-v' flag and send us the output.  Run the command from the build root. like this:

cd /home/nico/beanstalk

/bin/bash -c "/usr/bin/ccache prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang++ -Wno-vectorizer-no-neon -nostdlib -Wl,-soname,libdl.so -Wl,--gc-sections -shared -L/home/nico/beanstalk/out/target/product/pme/obj/lib /home/nico/beanstalk/out/target/product/pme/obj/lib/crtbegin_so.o /home/nico/beanstalk/out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o -Wl,--whole-archive -Wl,--no-whole-archive /home/nico/beanstalk/out/target/product/pme/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/libcompiler_rt-extras.a libatomic.a prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/../lib/gcc/aarch64-linux-android/7.0.0/libgcc.a -o /home/nico/beanstalk/out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,-maarch64linux -Wl,--hash-style=gnu -Wl,--fix-cortex-a53-843419 -fuse-ld=gold -Wl,--icf=safe -Wl,--no-undefined-version -Wl,--allow-shlib-undefined -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -Wl,--exclude-libs=libgcc.a -Wl,--version-script=bionic/libdl/libdl.arm64.map /home/nico/beanstalk/out/target/product/pme/obj/lib/crtend_so.o -v"

Thanks, Paul

  • Up2
  • Down0
krassermensch
Join Date: 12 Aug 16
Posts: 2
Posted: Fri, 2017-03-10 16:56

Thanks a lot for the reply. That's my output:

Quote:
Target: aarch64--linux-android Thread model: posix Repository:  Snapdragon LLVM ARM Compiler 3.8.8 for Android NDK (based on LLVM 3.8.0) InstalledDir: /home/nico/beanstalk/prebuilts/clang/linux-x86/host/sdclang-3.8/bin clang-3.8: error: no such file or directory: 'libatomic.a' Options for link job construction: --driver-mode=g++ -Wno-vectorizer-no-neon -nostdlib -Wl,-soname,libdl.so -Wl,--gc-sections -shared -L/home/nico/beanstalk/out/target/product/pme/obj/lib /home/nico/beanstalk/out/target/product/pme/obj/lib/crtbegin_so.o /home/nico/beanstalk/out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o -Wl,--whole-archive -Wl,--no-whole-archive /home/nico/beanstalk/out/target/product/pme/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/libcompiler_rt-extras.a libatomic.a prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/../lib/gcc/aarch64-linux-android/7.0.0/libgcc.a -o /home/nico/beanstalk/out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,-maarch64linux -Wl,--hash-style=gnu -Wl,--fix-cortex-a53-843419 -fuse-ld=gold -Wl,--icf=safe -Wl,--no-undefined-version -Wl,--allow-shlib-undefined -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -Wl,--exclude-libs=libgcc.a -Wl,--version-script=bionic/libdl/libdl.arm64.map /home/nico/beanstalk/out/target/product/pme/obj/lib/crtend_so.o -v

 

I hope it'll help :)

  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 15
Posted: Wed, 2017-03-15 18:30

I checked a couple of recent builds and the full path to libatomic.a is always present in the link line.  

And, I see that the full path is there in the earlier post on this thread on Sat, 2017-01-14 12:48.

Here's the path it shows:

prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/../lib/gcc/arm-linux-androideabi/4.9.4/libatomic.a 

  • So, it may be a setup/config issue.  Can you please share your build recipe, including build command, so we can try to repeat your issue.
  • Up0
  • Down0
jhayzt
Join Date: 10 Aug 17
Posts: 2
Posted: Wed, 2017-08-16 20:47

Hi there! So I'm trying to build LOS with sdClang. I've successfully built a rom with sdClang enabled, but it seems in LOS, it keeps failing. The error starts here:

 

FAILED: /bin/bash -c "(PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang  -Wno-vectorizer-no-neon -I device/xiaomi/msm8996-common/include -I bionic/libdl -I /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates -I /home/jhayzt/DarkOS/out/target/product/gemini/gen/SHARED_LIBRARIES/libdl_intermediates -I libnativehelper/include/nativehelper \$(cat /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem hardware/ril-caf/include -isystem /home/jhayzt/DarkOS/out/target/product/gemini/obj/include -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libm/include -isystem bionic/libm/include/arm64 -c    -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DQCOM_HARDWARE -DQCOM_BSP -DQTI_BSP -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -DNDEBUG -O2 -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG  -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc     -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin    -std=gnu99      -Wall -Wextra -Wunused -Werror -fPIC   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast  -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type  -MD -MF /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.d -o /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o bionic/libdl/libdl.c ) && (cp /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.d /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.d >> /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.P; rm -f /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.d )"
ccache: error: execv of prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang failed: Exec format error
 
[  6% 3191/47211] target  C: libcompiler_rt-extras <= external/compiler-rt/lib/builtins/mulodi4.c
FAILED: /bin/bash -c "(PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang  -Wno-vectorizer-no-neon -I device/xiaomi/msm8996-common/include -I external/compiler-rt -I /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates -I /home/jhayzt/DarkOS/out/target/product/gemini/gen/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates -I libnativehelper/include/nativehelper \$(cat /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem hardware/ril-caf/include -isystem /home/jhayzt/DarkOS/out/target/product/gemini/obj/include -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libm/include -isystem bionic/libm/include/arm64 -c    -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DQCOM_HARDWARE -DQCOM_BSP -DQTI_BSP -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -DNDEBUG -O2 -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG  -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc     -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin    -std=gnu99      -Wno-unused-parameter -Werror -fPIC   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast  -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type  -MD -MF /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.d -o /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.o external/compiler-rt/lib/builtins/mulodi4.c ) && (cp /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.d /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.d >> /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.P; rm -f /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.d )"
ccache: error: execv of prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang failed: Exec format error
I hope someone can help me. :D
  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 15
Posted: Thu, 2017-08-17 11:43

Hi jhayzt,

The "Exec format error" typically means that the host OS doesn't recognize or is incompatible with the binary format of the executable, which is "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang".

You should be running on a Ubuntu OS with a version of 10.04 or later.

Do the following from your host build machine and post here:

  1. uname -a
  2. cd to the top of the Android build tree
  3. file prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang

Paul

  • Up1
  • Down0
jhayzt
Join Date: 10 Aug 17
Posts: 2
Posted: Thu, 2017-08-17 17:39

Hey there pstrong!

First of all, thanks for replying. Here are the details you need:

root@romcompiler:~/DarkOS# uname -a
Linux romcompiler 4.10.0-32-generic #36~16.04.1-Ubuntu SMP Wed Aug 9 09:19:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
 
root@romcompiler:~/DarkOS# file prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang
prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang: empty
 
root@romcompiler:~/DarkOS# 
hmm, that's weird.

  • Up0
  • Down0
jk.menon
Join Date: 2 Nov 17
Posts: 4
Posted: Sun, 2017-11-12 22:07

I am building android 8.0 for msm8996 this is the log when full build is done

 

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=msm8996
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=kryo
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a9
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.10.0-37-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPR1.170623.026
OUT_DIR=out
============================================
ninja: no work to do.
[1/2] glob device/*/*/Android.bp
[1/8] test android/soong/cc/config
FAILED: out/soong/.bootstrap/soong-cc-config/test/test.passed 
out/soong/.bootstrap/bin/gotestrunner -p ./build/soong/cc/config -f out/soong/.bootstrap/soong-cc-config/test/test.passed -- out/soong/.bootstrap/soong-cc-config/test/test -test.short
panic: read /home/dolby/JK/android8msm: is a directory
 
goroutine 1 [running]:
android/soong/cc/config.setSdclangVars()
/home/dolby/JK/android8msm/build/soong/cc/config/global.go:197 +0x20d4
android/soong/cc/config.init.2()
/home/dolby/JK/android8msm/build/soong/cc/config/global.go:169 +0xcc9
android/soong/cc/config.init()
/home/dolby/JK/android8msm/build/soong/cc/config/tidy_test.go:42 +0x3969
main.init()
/home/dolby/JK/android8msm/out/soong/.bootstrap/soong-cc-config/test/test.go:34 +0x4e
[3/8] link out/soong/.bootstrap/soong-cc/test/test
ninja: build stopped: subcommand failed.
11:27:45 soong bootstrap failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
 
 
my Boardconfig.mk file is set as
 
 
#sdclang configuration
 
TARGET_USE_SDCLANG := true
SDCLANG_PATH := prebuilts/clang/host/linux-x86/clang-3859424/bin
SDCLANG_LTO_DEFS := device/qcom/common/sdllvm-lto-defs.mk
 
 
 

 

  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 15
Posted: Mon, 2017-11-13 14:26

Hi jk.menon,

Please provide your build steps/recipe so we can debug your build issue...

Thanks, Paul

  • Up0
  • Down0
jk.menon
Join Date: 2 Nov 17
Posts: 4
Posted: Mon, 2017-11-13 20:38

Hi paul,

Thanks for the response,

First of all my host is ubuntu 16.04 xenial and i was able to  build 7.1 for the same chip from this host  ,so i guess there is no problem with the environment setup .

openjdk version is  "1.8.0_151"

These are the steps that i followed:

Download the repo script:
3. Set the repo script’s attributes to executable.
$ chmod a+x ~/bin/repo
4. Make sure that the installed directory location for repo is included in your PATH.

$ export PATH=~/bin:$PATH

i have downloaded the source code from here   https://wiki.codeaurora.org/xwiki/bin/QAEP/release 

repo init -u git://codeaurora.org/platform/manifest.git -b release -m LA.UM.6.5.r1-04000-8x96.0.xml --repo url=git://codeaurora.org/tools/repo.git

repo sync 

source build/envsetup.h

lunch msm8996-userdebug

make -j4

 

i am not sure if  its something related to setting  up the path to sdclang compiler ,

it would be great if you could  figure out the issue.

Thanks,

Jayakrishnan

 

 

 

  • Up0
  • Down0
s1083531
Join Date: 26 Nov 17
Posts: 1
Posted: Sun, 2017-11-26 13:22

I have THE SAME EXACT PROBLEM as you. And I've been building for 7.1 too (just Snapdragon Camera for my own purposes) without problems. It turns out that this time following instructions is not enough.

  • Up0
  • Down0
jk.menon
Join Date: 2 Nov 17
Posts: 4
Posted: Sun, 2017-11-26 20:43

Hi ,

 

For me the issue of sdclangvars () got disappeared when i commented out the set sdclang vars() in global.go file , but i am getting another issue : ninja: no work to do.

[18/19] soong_build docs out/soong/.bootstrap/docs/soong_build.html
FAILED: out/soong/.bootstrap/docs/soong_build.html 
out/soong/.bootstrap/bin/soong_build  -t -b out/soong --docs out/soong/.bootstrap/docs/soong_build.html ./Android.bp
error: system/bt/btif/Android.bp:31:1: "libbtif" depends on undefined module "com.qualcomm.qti.bluetooth_audio@1.0"
error: system/bt/main/Android.bp:3:1: "bluetooth.default" depends on undefined module "com.qualcomm.qti.bluetooth_audio@1.0"
[19/19] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja 
out/soong/.bootstrap/bin/soong_build -t -b out/soong -d out/soong/build.ninja.d -o out/soong/build.ninja Android.bp
error: system/bt/btif/Android.bp:31:1: "libbtif" depends on undefined module "com.qualcomm.qti.bluetooth_audio@1.0"
error: system/bt/main/Android.bp:3:1: "bluetooth.default" depends on undefined module "com.qualcomm.qti.bluetooth_audio@1.0"
ninja: build stopped: subcommand failed.
14:08:58 soong bootstrap failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
 
 
Looks like this is probably due to the (vendor/qcom/proprietary) file missing from the android subtree for oreo build. I am not sure about the exact issue here , is it because of some compiler path that we need to set or because  of the propreitary file missing .
 
Regards,
Jayakrishnan
  • Up0
  • Down0
xboxfanj
Join Date: 11 Feb 13
Posts: 39
Posted: Thu, 2017-11-30 11:55

SDClang now expects a json such as this one in 8.0 https://github.com/OnePlusOSS/android_vendor_qcom_cobalt/blob/oneplus/QC...

 

You're correct that the BT file doesn't exist in OSS.  Try this commit: https://github.com/AOSPA/android_system_bt/commit/c78c34cdbd6d7163ad9345...

 

@pstrong, I see that 4.0 breaks certain functionality such as camera and I suspect that is why 3.9 is used by vendors such as OnePlus.  Is 4.0 expected to be fixed for full builds soon?

  • Up0
  • Down0
jk.menon
Join Date: 2 Nov 17
Posts: 4
Posted: Fri, 2017-12-01 03:43
Hi
 
I am building oreo for the msm8996 , this is the error log when i give a full build .
 
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=msm8996
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPR1
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=kryo
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a9
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.10.0-40-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPR1.170623.026
OUT_DIR=out
AUX_OS_VARIANT_LIST=
============================================
dolby@dolby-server:~/JK/android04000$ make 
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=msm8996
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=kryo
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a9
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.10.0-40-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPR1.170623.026
OUT_DIR=out
============================================
ninja: no work to do.
ninja: no work to do.
out/target/product/msm8996/clean_steps.mk was modified, regenerating...
[6/1002] including ./build/target/board/Android.mk ...
kernel/msm-3.18/AndroidKernel.mk:20: warning: Forcing kernel header generation only for 'arm64'
Using appended DTB
[9/1002] including ./cts/Android.mk ...
cts/apps/CtsVerifier/Android.mk:72: warning: FindEmulator: find: `cts/apps/CtsVerifier/src/com/android/cts/verifier/backup': No such file or directory
build/core/java_common.mk:88: warning: FindEmulator: cd: cts/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/cts/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/res: No such file or directory
build/core/java_common.mk:88: warning: FindEmulator: cd: cts/hostsidetests/backup/assets: No such file or directory
cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.mk:23: warning: FindEmulator: find: `cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/src': No such file or directory
cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.mk:23: warning: FindEmulator: find: `cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/src': No such file or directory
cts/tests/tests/contactsproviderwipe/Android.mk:33: warning: FindEmulator: find: `cts/tests/tests/contactsproviderwipe/common/src': No such file or directory
cts/tests/tests/telecom3/Android.mk:37: warning: FindEmulator: find: `cts/tests/tests/telecom/src/android/telecom/cts/MockDialerActivity.java': No such file or directory
[326/1002] including ./external/toybox/Android.mk ...
awk: line 1: syntax error at or near ,
[358/1002] including ./frameworks/av/media/libaaudio/Android.mk ...
frameworks/av/media/libaaudio/examples/input_monitor/static/Android.mk: warning: input_monitor: unusual tags examples 
frameworks/av/media/libaaudio/examples/write_sine/static/Android.mk: warning: write_sine: unusual tags examples 
[393/1002] including ./frameworks/base/Android.mk ...
./frameworks/base/Android.mk:869: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:878: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:883: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:888: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
[515/1002] including ./hardware/libhardware/Android.mk ...
hardware/libhardware/modules/sensors/Android.mk:46: warning: Treble enabled device have built-in sensor multihal support. USE_SENSOR_MULTI_HAL should not be set.
[998/1002] including ./vendor/qcom/opensource/wlan/qcacld-2.0/Android.mk ...
"WLAN: supported kernel detected, building qcacld-2.0"
kernel/msm-3.18/AndroidKernel.mk:20: warning: Forcing kernel header generation only for 'arm64'
ln: failed to create symbolic link 'out/target/product/msm8996/system/etc/firmware/wlan/qca_cld/wlan_mac.bin': No such file or directory
[1000/1002] including ./vendor/qcom/proprietary/android-perf/Android.mk ...
cat: device/qcom/msm8996/public.libraries.vendor.txt: No such file or directory
[1002/1002] including ./vendor/qcom/proprietary/prebuilt_HY11/target/product/msm8996/Android.mk ...
ln: failed to create symbolic link 'libEGL_adreno.so': File exists
ln: failed to create symbolic link 'libEGL_adreno.so': File exists
build/core/Makefile:54: warning: Duplicate header copy: out/target/product/msm8996/obj/include/qcom/display/qd_utils.h
build/core/Makefile:54: warning: Defined in: hardware/qcom/display/libqdutils/../common.mk hardware/qcom/display/libqdutils/../common.mk
build/core/Makefile:54: warning: Duplicate header copy: out/target/product/msm8996/obj/include/cld80211-lib/cld80211_lib.h
build/core/Makefile:54: warning: Defined in: hardware/qcom/wlan/cld80211-lib/Android.mk hardware/qcom/wlan/cld80211-lib/Android.mk
No private recovery resources for TARGET_DEVICE msm8996
platform_testing/build/tasks/tests/instrumentation_metric_test_list.mk: warning: continuous_instrumentation_metric_tests: Unknown installed file for module perf-setup.sh 
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module RecyclerViewTests 
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module SettingsFunctionalTests 
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module LauncherFunctionalTests 
platform_testing/build/tasks/tests/native_metric_test_list.mk: warning: continuous_native_metric_tests: Unknown installed file for module perf-setup.sh 
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
bootable/bootloader/lk/AndroidBoot.mk:90: warning: overriding commands for target `out/target/product/msm8996/obj/ABOOT_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:90: warning: ignoring old commands for target `out/target/product/msm8996/obj/ABOOT_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:93: warning: overriding commands for target `ABOOT_CLEAN'
bootable/bootloader/lk/AndroidBoot.mk:93: warning: ignoring old commands for target `ABOOT_CLEAN'
bootable/bootloader/lk/AndroidBoot.mk:98: warning: overriding commands for target `out/target/product/msm8996/aboot.elf'
bootable/bootloader/lk/AndroidBoot.mk:98: warning: ignoring old commands for target `out/target/product/msm8996/aboot.elf'
bootable/bootloader/lk/AndroidBoot.mk:106: warning: overriding commands for target `appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:106: warning: ignoring old commands for target `appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:109: warning: overriding commands for target `out/target/product/msm8996/obj/NAND_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:109: warning: ignoring old commands for target `out/target/product/msm8996/obj/NAND_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:116: warning: overriding commands for target `emmc_appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:116: warning: ignoring old commands for target `emmc_appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:119: warning: overriding commands for target `out/target/product/msm8996/obj/EMMC_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:119: warning: ignoring old commands for target `out/target/product/msm8996/obj/EMMC_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:123: warning: overriding commands for target `out/target/product/msm8996/appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:123: warning: ignoring old commands for target `out/target/product/msm8996/appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:127: warning: overriding commands for target `out/target/product/msm8996/emmc_appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:127: warning: ignoring old commands for target `out/target/product/msm8996/emmc_appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:140: warning: overriding commands for target `nandwrite_clean'
bootable/bootloader/lk/AndroidBoot.mk:140: warning: ignoring old commands for target `nandwrite_clean'
bootable/bootloader/lk/AndroidBoot.mk:144: warning: overriding commands for target `out/target/product/msm8996/obj/nandwrite'
bootable/bootloader/lk/AndroidBoot.mk:144: warning: ignoring old commands for target `out/target/product/msm8996/obj/nandwrite'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: overriding commands for target `out/target/product/msm8996/obj/nandwrite/build-msm8996'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: ignoring old commands for target `out/target/product/msm8996/obj/nandwrite/build-msm8996'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: overriding commands for target `_nandwrite/lk'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: ignoring old commands for target `_nandwrite/lk'
build/core/base_rules.mk:466: warning: overriding commands for target `out/host/linux-x86/cts/android-cts/testcases/libcrash-jni.so'
build/core/base_rules.mk:466: warning: ignoring old commands for target `out/host/linux-x86/cts/android-cts/testcases/libcrash-jni.so'
build/core/base_rules.mk:466: warning: overriding commands for target `out/target/product/msm8996/testcases/libcrash-jni/libcrash-jni.so'
build/core/base_rules.mk:466: warning: ignoring old commands for target `out/target/product/msm8996/testcases/libcrash-jni/libcrash-jni.so'
build/core/binary.mk:1262: warning: overriding commands for target `out/host/linux-x86/obj/STATIC_LIBRARIES/libavb_host_intermediates/libavb/avb_version.o'
build/core/binary.mk:1262: warning: ignoring old commands for target `out/host/linux-x86/obj/STATIC_LIBRARIES/libavb_host_intermediates/libavb/avb_version.o'
build/core/binary.mk:1262: warning: overriding commands for target `out/host/linux-x86/obj32/STATIC_LIBRARIES/libavb_host_intermediates/libavb/avb_version.o'
build/core/binary.mk:1262: warning: ignoring old commands for target `out/host/linux-x86/obj32/STATIC_LIBRARIES/libavb_host_intermediates/libavb/avb_version.o'
build/core/base_rules.mk:466: warning: overriding commands for target `out/target/product/msm8996/testcases/hello_world_test/hello_world_test'
build/core/base_rules.mk:466: warning: ignoring old commands for target `out/target/product/msm8996/testcases/hello_world_test/hello_world_test'
./test/vts/utils/python/archive/Android.mk:28: warning: overriding commands for target `default'
./test/vts/runners/host/tcp_server/Android.mk:19: warning: ignoring old commands for target `default'
./test/vts/utils/python/coverage/Android.mk:28: warning: overriding commands for target `default'
./test/vts/utils/python/archive/Android.mk:28: warning: ignoring old commands for target `default'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/cneapiclient.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/cneapiclient.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/com.qti.dpmframework.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/com.qti.dpmframework.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/com.qti.snapdragon.sdk.display.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/com.qti.snapdragon.sdk.display.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/dpmapi.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/dpmapi.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/imscmlibrary.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/imscmlibrary.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/izat.xt.srv.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/izat.xt.srv.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/oem-services.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/oem-services.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/rcsimssettings.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/rcsimssettings.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/rcsservice.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/rcsservice.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/tcmclient.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/tcmclient.jar'
vendor/qcom/build/tasks/generate_extra_images.mk:35: warning: overriding commands for target `out/target/product/msm8996/root/firmware'
device/qcom/common/generate_extra_images.mk:35: warning: ignoring old commands for target `out/target/product/msm8996/root/firmware'
vendor/qcom/build/tasks/generate_extra_images.mk:40: warning: overriding commands for target `out/target/product/msm8996/root/bt_firmware'
device/qcom/common/generate_extra_images.mk:40: warning: ignoring old commands for target `out/target/product/msm8996/root/bt_firmware'
vendor/qcom/build/tasks/generate_extra_images.mk:45: warning: overriding commands for target `out/target/product/msm8996/root/dsp'
device/qcom/common/generate_extra_images.mk:45: warning: ignoring old commands for target `out/target/product/msm8996/root/dsp'
vendor/qcom/build/tasks/generate_extra_images.mk:50: warning: overriding commands for target `out/target/product/msm8996/root/persist'
device/qcom/common/generate_extra_images.mk:50: warning: ignoring old commands for target `out/target/product/msm8996/root/persist'
vendor/qcom/build/tasks/generate_extra_images.mk:90: warning: overriding commands for target `out/target/product/msm8996/boot.img.secure'
device/qcom/common/generate_extra_images.mk:90: warning: ignoring old commands for target `out/target/product/msm8996/boot.img.secure'
vendor/qcom/build/tasks/generate_extra_images.mk:93: warning: overriding commands for target `out/target/product/msm8996/recovery.img.secure'
device/qcom/common/generate_extra_images.mk:93: warning: ignoring old commands for target `out/target/product/msm8996/recovery.img.secure'
vendor/qcom/build/tasks/generate_extra_images.mk:121: warning: overriding commands for target `out/target/product/msm8996/persist.img'
device/qcom/common/generate_extra_images.mk:121: warning: ignoring old commands for target `out/target/product/msm8996/persist.img'
bootable/bootloader/lk/AndroidBoot.mk:90: warning: overriding commands for target `out/target/product/msm8996/obj/ABOOT_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:90: warning: ignoring old commands for target `out/target/product/msm8996/obj/ABOOT_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:93: warning: overriding commands for target `ABOOT_CLEAN'
bootable/bootloader/lk/AndroidBoot.mk:93: warning: ignoring old commands for target `ABOOT_CLEAN'
bootable/bootloader/lk/AndroidBoot.mk:98: warning: overriding commands for target `out/target/product/msm8996/aboot.elf'
bootable/bootloader/lk/AndroidBoot.mk:98: warning: ignoring old commands for target `out/target/product/msm8996/aboot.elf'
bootable/bootloader/lk/AndroidBoot.mk:106: warning: overriding commands for target `appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:106: warning: ignoring old commands for target `appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:109: warning: overriding commands for target `out/target/product/msm8996/obj/NAND_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:109: warning: ignoring old commands for target `out/target/product/msm8996/obj/NAND_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:116: warning: overriding commands for target `emmc_appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:116: warning: ignoring old commands for target `emmc_appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:119: warning: overriding commands for target `out/target/product/msm8996/obj/EMMC_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:119: warning: ignoring old commands for target `out/target/product/msm8996/obj/EMMC_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:123: warning: overriding commands for target `out/target/product/msm8996/appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:123: warning: ignoring old commands for target `out/target/product/msm8996/appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:127: warning: overriding commands for target `out/target/product/msm8996/emmc_appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:127: warning: ignoring old commands for target `out/target/product/msm8996/emmc_appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:140: warning: overriding commands for target `nandwrite_clean'
bootable/bootloader/lk/AndroidBoot.mk:140: warning: ignoring old commands for target `nandwrite_clean'
bootable/bootloader/lk/AndroidBoot.mk:144: warning: overriding commands for target `out/target/product/msm8996/obj/nandwrite'
bootable/bootloader/lk/AndroidBoot.mk:144: warning: ignoring old commands for target `out/target/product/msm8996/obj/nandwrite'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: overriding commands for target `out/target/product/msm8996/obj/nandwrite/build-msm8996'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: ignoring old commands for target `out/target/product/msm8996/obj/nandwrite/build-msm8996'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: overriding commands for target `_nandwrite/lk'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: ignoring old commands for target `_nandwrite/lk'
vendor/qcom/build/tasks/generate_extra_images.mk:503: warning: overriding commands for target `kernelclean'
device/qcom/common/generate_extra_images.mk:503: warning: ignoring old commands for target `kernelclean'
ninja: error: out/soong/build.ninja:493: empty path
 
16:57:30 ninja failed with: exit status 1
16:57:30 Missing ninja log: stat out/.ninja_log: no such file or directory
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
 
 
There is no out/soong/.intermediates generated and its showing empty path in the generated build.ninja file , what could be the possible reason for this ,is ther something to do with the compiler settings.
 
 
    out/soong/.intermediates/bionic/libc/crtend_android/android_arm64_armv8-a_kryo_core/obj/bionic/libc/arch-common/bionic/crtend.o
    crtBegin = out/soong/.intermediates/bionic/libc/crtbegin_dynamic/android_arm64_armv8-a_kryo_core/crtbegin_dynamic.o
    crtEnd = out/soong/.intermediates/bionic/libc/crtend_android/android_arm64_armv8-a_kryo_core/obj/bionic/libc/arch-common/bionic/crtend.o
    ldCmd =
 ldFlags = -target aarch64-linux-android -B${g.config.Arm64GccRoot}/aarch64-linux-android/bin -Wl,--no-undefined ${g.config.Arm64Ldflags}  -pie -nostdlib -Bdynamic -Wl,--gc-sections -Wl,-z,nocopyreloc  -Wl,-dynamic-linker,/system/bin/linker64
    libFlags = out/soong/.intermediates/external/googletest/googletest/libgtest_main/android_arm64_armv8-a_kryo_static_core/libgtest_main.a out/soong/.intermediates/external/googletest/googletest/libgtest/android_arm64_armv8-a_kryo_static_core/libgtest.a -Wl,--start-group out/soong/.intermediates/external/compiler-rt/libcompiler_rt-extras/android_arm64_armv8-a_kryo_static_core/libcompiler_rt-extras.a out/soong/.intermediates/build/soong/libatomic/android_arm64_armv8-a_kryo_static_core/libatomic.a out/soong/.intermediates/build/soong/libgcc/android_arm64_armv8-a_kryo_static_core/libgcc.a -Wl,--end-group out/soong/.intermediates/frameworks/native/libs/nativewindow/libnativewindow/android_arm64_armv8-a_kryo_shared_core/libnativewindow.so out/soong/.intermediates/hardware/interfaces/graphics/common/1.0/android.hardware.graphics.common@1.0/android_arm64_armv8-a_kryo_shared_core/android.hardware.graphics.common@1.0.so out/soong/.intermediates/external/libcxx/libc++/android_arm64_armv8-a_kryo_shared_core/libc++.so out/soong/.intermediates/bionic/libdl/libdl/android_arm64_armv8-a_kryo_shared_core/libdl.so out/soong/.intermediates/bionic/libc/libc/android_arm64_armv8-a_kryo_shared_core/libc.so out/soong/.intermediates/bionic/libm/libm/android_arm64_armv8-a_kryo_shared_core/libm.so
  
the error is shown at the ldflags line
 
  • Up0
  • Down0
fenil.paul
Join Date: 14 Dec 17
Posts: 2
Posted: Fri, 2017-12-15 03:24
Hi, I am trying to build Oreo 8.01 for msm8909w processor, when compiling the following error occured.
 
$ make -j32
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=msm8909go
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.10.0-42-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM1.171019.011
OUT_DIR=out
============================================
[44/44] bootstrap out/soong/.minibootstrap/build.ninja.in
[4/4] out/soong/.bootstrap/bin/minibp out/soong/.bootstrap/build.ninja
[865/866] glob vendor/qcom/opensource/interfaces/wifi/*/Android.bp
[39/54] test android/soong/cc/config
FAILED: out/soong/.bootstrap/soong-cc-config/test/test.passed 
out/soong/.bootstrap/bin/gotestrunner -p ./build/soong/cc/config -f out/soong/.bootstrap/soong-cc-config/test/test.passed -- out/soong/.bootstrap/soong-cc
config/test/test -test.short
panic: read /home/fenil/APQ8009W_LA.UM.6.7.r1-04400-8x09.0_N_v2.0.1: is a directory
goroutine 1 [running]:
android/soong/cc/config.setSdclangVars()
/home/fenil/APQ8009W_LA.UM.6.7.r1-04400-8x09.0_N_v2.0.1/build/soong/cc/config/global.go:206 +0x17bc
android/soong/cc/config.init.2()
/home/fenil/APQ8009W_LA.UM.6.7.r1-04400-8x09.0_N_v2.0.1/build/soong/cc/config/global.go:179 +0xcd6
android/soong/cc/config.init()
/home/fenil/APQ8009W_LA.UM.6.7.r1-04400-8x09.0_N_v2.0.1/build/soong/cc/config/tidy_test.go:42 +0x3cbb
main.init()
/home/fenil/APQ8009W_LA.UM.6.7.r1-04400-8x09.0_N_v2.0.1/out/soong/.bootstrap/soong-cc-config/test/test.go:64 +0x58
[41/54] compile out/soong/.bootstrap/soong-cc/test/android/soong/cc.a
ninja: build stopped: subcommand failed.
16:01:08 soong failed with: exit status 1
#### failed to build some targets (5 seconds) ####
 
I had downloaded the snapdragon-llvm-4.0.2-linux64.tar.gz an copied to prebuilts/clang/host/linux-x86/sdclang-4.0 and changed the device's BoardConfig.mk file. Still the error persists.How to solve this error? Any help will be greatly appreciated. :)
  • Up0
  • Down0
xboxfanj
Join Date: 11 Feb 13
Posts: 39
Posted: Thu, 2017-12-21 20:20

If you are building Android O with vendor/qcom/proprietary (also known as the BSP), you do not need to follow the instructions I posted in the OP and you do not need to download the compiler from Qualcomm Developer Network.  There are compilers in vendor/qcom/proprietary/llvm-arm-toolchain-ship, which are likely newer than the latest versions available here.  When they are not, you can replace them and update vendor/qcom/proprietary/common/config/sdclang.json.

In sdclang.json, you can also check the default options for your platform.  Some targets enable sdclang by default, others do not, you can define specific flags or compiler paths for each SoC.

  • Up0
  • Down0
fenil.paul
Join Date: 14 Dec 17
Posts: 2
Posted: Tue, 2017-12-26 02:18
Thankyou  so much for your reply.
 
I defined the specific flags and compiler path (to compiler which I downloaded from Qcom site) for my SoC in my sdclang.json file. And set, SDCLANG_AE_CONFIG = 'path/to/sdclang.json'
SDCLANG_CONFIG = 'path/to/sdclang.json'
in my build/soong/cc/config/global.go file. By doing this the error is gone and a new error appears
 
[ 99% 1421/1422] glob vendor/qcom/opensource/bluetooth_ext/system_bt_ext/include
ninja: error: 'out/target/common/obj/JAVA_LIBRARIES/com.qualcomm.qti.camera_intermediates/javalib.jar', needed by 'out/target/product/msm8909go/dex_bootjars/system/framework/boot.prof', missing and no known rule to make it
13:06:31 ninja failed with: exit status 1
 
I found that no 'dex_bootjars' directory is created inside 'out/target/product/msm8909go' directory. 
Could you please help me to solve the above error.
  • Up0
  • Down0
xboxfanj
Join Date: 11 Feb 13
Posts: 39
Posted: Tue, 2017-12-26 19:32
Hello Fenil, you should see the product package here https://source.codeaurora.org/quic/la/device/qcom/common/tree/base.mk?h=... in your environment (line 1066) and the QTIC_EXTENSION flag should be enabled here https://source.codeaurora.org/quic/la/platform/vendor/qcom/msm8909go/tre... (line 34). Can you confirm that? If it is all set up correctly, check vendor/qcom/proprietary. If you need more help with this, you can email me at jake@aospa.co
  • Up0
  • Down0
x565178035
Join Date: 19 Jan 18
Posts: 3
Posted: Fri, 2018-01-19 05:10

Hi,

I tried to set it up as you explained but it seems that I did not compile the source code using the specified clang (sdclang).

When I was compiling, I saw that my process was still using clang-2690385 compilation, like this:

anemone@anemone-VirtualBox:/media/anemone/src/lineageOS$ ps -ef|grep clang
anemone  19822 12922  1 20:51 ?        00:00:00 /bin/sh -c /bin/bash -c "(PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -I system/core/base/include -I system/core/base -I /media/anemone/src/lineageOS/out/host/linux-x86/obj/STATIC_LIBRARIES/libbase_intermediates -I /media/anemone/src/lineageOS/out/host/linux-x86/gen/STATIC_LIBRARIES/libbase_intermediates -I libnativehelper/include/nativehelper \$(cat /media/anemone/src/lineageOS/out/host/linux-x...
 
anemone@anemone-VirtualBox:/media/anemone/src/lineageOS$ prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -v
Android clang version 3.8.256229  (based on LLVM 3.8.256229)
Target: x86_64-unknown-linux
Thread model: posix
 
My configuration is as follows:
anemone@anemone-VirtualBox:/media/anemone/src/lineageOS$ tail -n 10 device/lge/mako/BoardConfig.mk
 
BOARD_HAS_NO_SELECT_BUTTON := true
 
BOARD_HARDWARE_CLASS := device/lge/mako/cmhw/
ifneq ($(HOST_OS),darwin)
SDCLANG := true
SDCLANG_PATH := prebuilts/clang/linux-x86/host/sdclang-4.0/bin
SDCLANG_LTO_DEFS := device/qcom/common/sdllvm-lto-defs.mk
endif
 
anemone@anemone-VirtualBox:/media/anemone/src/lineageOS$ ls prebuilts/clang/linux-x86/host/sdclang-4.0
aarch64-linux-android    bin      NOTICE         Snapdragon_LLVM_ARM_40_Compiler_User_Guide.pdf
AndroidVersion.txt       lib      RELEASE_NOTES
armv7-linux-androideabi  libexec  share
 
anemone@anemone-VirtualBox:/media/anemone/src/lineageOS$ . ./build/envsetup.sh 
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/cm/bash_completion/git.bash
including vendor/cm/bash_completion/repo.bash
anemone@anemone-VirtualBox:/media/anemone/src/lineageOS$ breakfast lineage_mako-userdebug
including vendor/cm/vendorsetup.sh
Looking for dependencies in device/lge/mako
 
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
LINEAGE_VERSION=14.1-20180119-UNOFFICIAL-mako
TARGET_PRODUCT=lineage_mako
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.13.0-26-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NJH47F
OUT_DIR=/media/anemone/src/lineageOS/out
============================================
 
 
 
 
 

 

  • Up0
  • Down0
xboxfanj
Join Date: 11 Feb 13
Posts: 39
Posted: Fri, 2018-01-19 09:59
Not entirely sure why but lineage changes the default sdclang handling. You'll need a change like this https://review.lineageos.org/#/c/184636/1/BoardConfigCommon.mk and to follow path naming here https://github.com/LineageOS/android_vendor_cm/blob/cm-14.1/build/envset...
  • Up0
  • Down0
x565178035
Join Date: 19 Jan 18
Posts: 3
Posted: Fri, 2018-01-19 18:37

This problem is solved. But there are may errors in compilation. Maybe LineageOS is not suitable for Snapdragon LLVM Compiler?

In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:61:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND && _LIBUNWIND_SUPPORT_DWARF_INDEX
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:61:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:61:40: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND && _LIBUNWIND_SUPPORT_DWARF_INDEX
                                       ^
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:61:40: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:78:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND || _LIBUNWIND_SUPPORT_DWARF_INDEX ||       \
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:78:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:78:40: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND || _LIBUNWIND_SUPPORT_DWARF_INDEX ||       \
                                       ^
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:78:40: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:83:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:83:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:87:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_INDEX
    ^
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:87:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:39:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:39:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:459:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:459:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:538:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:538:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:832:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
 
  • Up0
  • Down0
xboxfanj
Join Date: 11 Feb 13
Posts: 39
Posted: Sat, 2018-01-20 22:32

Which version of the Snapdragon LLVM Compiler are you using?  For Nougat, the 4.0 release will not work, so you will need the 3.8 version.

  • Up0
  • Down0
x565178035
Join Date: 19 Jan 18
Posts: 3
Posted: Sun, 2018-01-21 03:37

Great! It works as you say. Thanks a lot!

  • Up0
  • Down0
nejrobbins
Join Date: 21 Jan 18
Posts: 1
Posted: Sun, 2018-01-21 09:33

I'm trying to use this toolchain with OxygenOS 8.0 OREO, but I don't have the same file structure. I have: prebuilts/clang/host/linux-x86/(No sdclang-3.8) folder, so I can't implement this toolchain.

 

Without this toolchain though, I'm getting close to the same error as someone else in this thread, so I'm hoping someone can help me solve it.

ninja: error: 'out/target/common/obj/JAVA_LIBRARIES/com.qualcomm.qti.camera_intermediates/javalib.jar', needed by 'out/target/product/msm8996/dex_bootjars/system/framework/arm64/boot.art', missing and no known rule to make it
12:30:26 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
 
What's the solution to this problem? Thanks.
 
 

 

 

  • Up1
  • Down0
xboxfanj
Join Date: 11 Feb 13
Posts: 39
Posted: Sun, 2018-01-21 10:30

Just FYI, OnePlus does not release the code for Oxygen OS.  They do however, release source for a "AOSP" build based on Qualcomm's Code Aurora source, so builds you make will be missing the features of Oxygen OS.

Anyway, not sure which device you have, but OnePlus already inherits the sdclang json file, so it is already enabled as you can see here for OnePlus 5: https://github.com/OnePlusOSS/android_build/commit/666b51c4b116f58b176d0... or here for OnePlus 3: https://github.com/OnePlusOSS/android_build/commit/59ed0009ce3775fcfbe1d...

 

For the build error, it seems as though you don't have com.qualcomm.qti.Camera.jar, but they have it for 8996 here, which seems to be the target you're building: https://github.com/OnePlusOSS/android_vendor_oneplus_8996O/blob/oneplus/... so it looks like you may be missing some things in the vendor source.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.