Forums - Unable to compile ROMS with SnapDragon Clang

5 posts / 0 new
Last post
Unable to compile ROMS with SnapDragon Clang
ptaoubi
Join Date: 16 Jun 18
Posts: 3
Posted: Wed, 2018-06-20 04:50

Hello, 

I installed LLVM compiler  on linux

PLATFORM_VERSION_CODENAME=REL

PLATFORM_VERSION=8.1.0
RR_VERSION=RR-O-v6.1.0-20180620-ks01ltexx-Unofficial
TARGET_PRODUCT=rr_ks01ltexx
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPM1
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.4.0-128-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM2.171026.006.C1
OUT_DIR=/home/tobe/RR/out
AUX_OS_VARIANT_LIST=
TARGET_USE_SDCLANG=true
============================================
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=rr_ks01ltexx
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-128-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM2.171026.006.C1
OUT_DIR=/home/tobe/RR/out
============================================
ninja: no work to do.
ninja: no work to do.
device/samsung/ks01ltexx/BoardConfig.mk was modified, regenerating...
[331/1141] including ./frameworks/av/camera/Android.mk ...
frameworks/av/camera/cameraserver/Android.mk:18: warning: Target has integrated cameraserver into mediaserver. This is weakening security measures introduced in 7.0
[595/1141] including ./packages/apps/ResurrectionOTA/Android.mk ...
cp: cannot stat ‘/home/tobe/RR/ota_conf’: No such file or directory
[1141/1141] including ./vendor/samsung/ks01ltexx/Android.mk ...
PRODUCT_COPY_FILES vendor/rr/prebuilt/common/etc/apns-conf.xml:system/etc/apns-conf.xml ignored.
build/core/Makefile:33: warning: overriding commands for target `/home/tobe/RR/out/target/product/ks01ltexx/system/vendor/lib/hw/consumerir.msm8974.so'
build/core/base_rules.mk:391: warning: ignoring old commands for target `/home/tobe/RR/out/target/product/ks01ltexx/system/vendor/lib/hw/consumerir.msm8974.so'
[  1% 958/76062] target thumb C: libtar <= external/libtar/lib/decode.c
FAILED: /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_intermediates/lib/decode.o 
/bin/bash -c "PWD=/proc/self/cwd prebuilts/misc/linux-x86/ccache/ccache prebuilts/clang/host/linux-x86/sdclang-6.0.2/bin/clang -I device/samsung/ks01ltexx/include -I external/libtar/lib -I external/libtar/compat -I external/libtar/listhash -I external/libtar -I /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_intermediates -I /home/tobe/RR/out/target/product/ks01ltexx/gen/STATIC_LIBRARIES/libtar_intermediates -I libnativehelper/include_deprecated \$(cat /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_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 /home/tobe/RR/out/target/product/ks01ltexx/obj/include -isystem bionic/libc/arch-arm/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  -fno-exceptions -Wno-multichar -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -DNDEBUG -g -Wstrict-aliasing=2 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG -UDEBUG -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -fdebug-prefix-map=\$PWD/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -msoft-float -mfloat-abi=softfp -mfpu=neon -mcpu=krait -mfpu=neon-vfpv4 -D__ARM_FEATURE_LPAE=1 -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin   -std=gnu99 -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing   -DHAVE_SELINUX -fPIC -D_USING_LIBCXX   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type   -MD -MF /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_intermediates/lib/decode.d -o /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_intermediates/lib/decode.o external/libtar/lib/decode.c"
In file included from external/libtar/lib/decode.c:21:
In file included from external/libcxx/include/string.h:61:
bionic/libc/include/string.h:119:8: error: redeclaration of 'strlcpy' must not have the 'overloadable' attribute
size_t strlcpy(char* _Nonnull __restrict, const char* _Nonnull __restrict, size_t)
       ^
external/libtar/compat/compat.h:221:8: note: previous unmarked overload of function is here
size_t strlcpy(char *, const char *, size_t);
       ^
1 error generated.
[  1% 959/76062] target thumb C: libtar <= external/libtar/lib/block.c
FAILED: /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_intermediates/lib/block.o 
/bin/bash -c "PWD=/proc/self/cwd prebuilts/misc/linux-x86/ccache/ccache prebuilts/clang/host/linux-x86/sdclang-6.0.2/bin/clang -I device/samsung/ks01ltexx/include -I external/libtar/lib -I external/libtar/compat -I external/libtar/listhash -I external/libtar -I /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_intermediates -I /home/tobe/RR/out/target/product/ks01ltexx/gen/STATIC_LIBRARIES/libtar_intermediates -I libnativehelper/include_deprecated \$(cat /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_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 /home/tobe/RR/out/target/product/ks01ltexx/obj/include -isystem bionic/libc/arch-arm/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  -fno-exceptions -Wno-multichar -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -DNDEBUG -g -Wstrict-aliasing=2 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG -UDEBUG -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -fdebug-prefix-map=\$PWD/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -msoft-float -mfloat-abi=softfp -mfpu=neon -mcpu=krait -mfpu=neon-vfpv4 -D__ARM_FEATURE_LPAE=1 -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin   -std=gnu99 -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing   -DHAVE_SELINUX -fPIC -D_USING_LIBCXX   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type   -MD -MF /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_intermediates/lib/block.d -o /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_intermediates/lib/block.o external/libtar/lib/block.c"
In file included from external/libtar/lib/block.c:18:
In file included from external/libcxx/include/string.h:61:
bionic/libc/include/string.h:119:8: error: redeclaration of 'strlcpy' must not have the 'overloadable' attribute
size_t strlcpy(char* _Nonnull __restrict, const char* _Nonnull __restrict, size_t)
       ^
external/libtar/compat/compat.h:221:8: note: previous unmarked overload of function is here
size_t strlcpy(char *, const char *, size_t);
       ^
1 error generated.
[  1% 960/76062] target thumb C: libtar <= external/libtar/lib/append.c
FAILED: /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_intermediates/lib/append.o 
/bin/bash -c "PWD=/proc/self/cwd prebuilts/misc/linux-x86/ccache/ccache prebuilts/clang/host/linux-x86/sdclang-6.0.2/bin/clang -I device/samsung/ks01ltexx/include -I external/libtar/lib -I external/libtar/compat -I external/libtar/listhash -I external/libtar -I /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_intermediates -I /home/tobe/RR/out/target/product/ks01ltexx/gen/STATIC_LIBRARIES/libtar_intermediates -I libnativehelper/include_deprecated \$(cat /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_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 /home/tobe/RR/out/target/product/ks01ltexx/obj/include -isystem bionic/libc/arch-arm/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  -fno-exceptions -Wno-multichar -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -DNDEBUG -g -Wstrict-aliasing=2 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG -UDEBUG -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -fdebug-prefix-map=\$PWD/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -msoft-float -mfloat-abi=softfp -mfpu=neon -mcpu=krait -mfpu=neon-vfpv4 -D__ARM_FEATURE_LPAE=1 -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin   -std=gnu99 -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing   -DHAVE_SELINUX -fPIC -D_USING_LIBCXX   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type   -MD -MF /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_intermediates/lib/append.d -o /home/tobe/RR/out/target/product/ks01ltexx/obj/STATIC_LIBRARIES/libtar_intermediates/lib/append.o external/libtar/lib/append.c"
In file included from external/libtar/lib/append.c:17:
In file included from external/libcxx/include/string.h:61:
bionic/libc/include/string.h:119:8: error: redeclaration of 'strlcpy' must not have the 'overloadable' attribute
size_t strlcpy(char* _Nonnull __restrict, const char* _Nonnull __restrict, size_t)
       ^
external/libtar/compat/compat.h:221:8: note: previous unmarked overload of function is here
size_t strlcpy(char *, const char *, size_t);
       ^
1 error generated.
[  1% 963/76062] target thumb C++: libminui <= bootable/recovery/minui/resources.cpp
ninja: build stopped: subcommand failed.
12:46:41 ninja failed with: exit status 1
any HELP 
  • Up0
  • Down0
hongy
Join Date: 20 Apr 18
Posts: 2
Posted: Wed, 2018-06-20 16:43

Could you tell us what is your android version ? 

It looks like it is not our toolchain error. Like the error message said "adding "overloadable" in a redeclaration is not allowed." 

Could you double check your code? 

Thanks 

Hong

  • Up0
  • Down0
ptaoubi
Join Date: 16 Jun 18
Posts: 3
Posted: Thu, 2018-06-21 05:31
PLATFORM_VERSION=8.1.0
android version 8.1 
 
  • Up0
  • Down0
iDPropheCy
Join Date: 30 Dec 15
Posts: 1
Posted: Mon, 2018-06-25 07:10

Hello,

try to compile libtar using GCC by puting LOCAL_CLANG := false into its Android.mk. It might do the thing, since libtar has had problems with newer clang. Or use version 4.0.13.

  • Up0
  • Down0
subodhkerkar38
Join Date: 22 Sep 18
Posts: 1
Posted: Sat, 2018-09-22 12:05

 If you are unable to compile ROMS with SnapDragon Clang, first, check if the emulator is able to boot up successfully. You may take suggestions from HP Australia Support in this regarding, it will give you the entire solution. 

  • 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.