[Galaxy S 5 Q&A, Help & Troubleshooting] uglylove:
Hello everyone. I have klte and klteduos phones. Actually i'm not using them for daily usage. I wanna build new OS custom roms for fun and educational purposes. I builded succesfully and working unofficial havocOS custom rom.

I know my adaptaiton device, vendor, hardware tree are well.

I'm building custom rom(Arrow,pixel and blis) to %40(to kernel stage). i can't build further custom rom and kernel. I'm receiving almost same error below.

[ 40% 29916/74177] Building Kernel Image (zImage)
FAILED: /home/a/android/arw11/out/target/product/klteduos/obj/KERNEL_OBJ/arch/ar
m/boot/zImage
/bin/bash -c "(PATH=/home/a/android/arw11/out/host/linux-x86/bin:\$PATH PATH=/ho
me/a/android/arw11/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm
-linux-androidkernel-/bin:\$PATH PATH=/home/a/android/arw11/prebuilts/tools-extr
as/linux-x86/bin:\$PATH LD_LIBRARY_PATH=/home/a/android/arw11/prebuilts/tools-ex
tras/linux-x86/lib:\$LD_LIBRARY_PATH PERL5LIB=/home/a/android/arw11/prebuilts/to
ols-extras/common/perl-base BISON_PKGDATADIR=/home/a/android/arw11/prebuilts/bui
ld-tools/common/bison /home/a/android/arw11/prebuilts/build-tools/linux-x86/bin/
make -j8 CFLAGS_MODULE=\"-fno-pic\" CPATH=\"/usr/include:/usr/include/x86_64-li
nux-gnu\" HOSTCFLAGS=\"-fuse-ld=lld\" HOSTLDFLAGS=\"-L/usr/lib/x86_64-linux-gnu
-L/usr/lib64 -fuse-ld=lld\" HOSTCFLAGS=\"-fuse-ld=lld -Wno-unused-command-line-a
rgument\" HOSTCC=/home/a/android/arw11/prebuilts/clang/host/linux-x86/clang-r383
902b/bin/clang HOSTCXX=/home/a/android/arw11/prebuilts/clang/host/linux-x86/clan
g-r383902b/bin/clang++ LEX=/home/a/android/arw11/prebuilts/build-tools/linux-x86
/bin/flex YACC=/home/a/android/arw11/prebuilts/build-tools/linux-x86/bin/bison M
4=/home/a/android/arw11/prebuilts/build-tools/linux-x86/bin/m4 -C kernel/samsung
/msm8974 O=/home/a/android/arw11/out/target/product/klteduos/obj/KERNEL_OBJ ARCH
=arm CROSS_COMPILE=\"/usr/bin/ccache /home/a/android/arw11/prebuilts/gcc/linux-x
86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\" zImage ) && (
if grep -q '^CONFIG_OF=y' /home/a/android/arw11/out/target/product/klteduos/obj/
KERNEL_OBJ/.config; then echo \"Building DTBs\"; P
ATH=/home/a/android/arw11/out/host/linux-x86/bin:\$PATH PATH=/home/a/android/arw
11/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidke
rnel-/bin:\$PATH PATH=/home/a/android/arw11/prebuilts/tools-extras/linux-x86/bin
:\$PATH LD_LIBRARY_PATH=/home/a/android/arw11/prebuilts/tools-extras/linux-x86/l
ib:\$LD_LIBRARY_PATH PERL5LIB=/home/a/android/arw11/prebuilts/tools-extras/commo
n/perl-base BISON_PKGDATADIR=/home/a/android/arw11/prebuilts/build-tools/common/
bison /home/a/android/arw11/prebuilts/build-tools/linux-x86/bin/make -j8 CFLAGS
_MODULE=\"-fno-pic\" CPATH=\"/usr/include:/usr/include/x86_64-linux-gnu\" HOSTCF
LAGS=\"-fuse-ld=lld\" HOSTLDFLAGS=\"-L/usr/lib/x86_64-linux-gnu -L/usr/lib64 -fu
se-ld=lld\" HOSTCFLAGS=\"-fuse-ld=lld -Wno-unused-command-line-argument\" HOSTCC
=/home/a/android/arw11/prebuilts/clang/host/linux-x86/clang-r383902b/bin/clang H
OSTCXX=/home/a/android/arw11/prebuilts/clang/host/linux-x86/clang-r383902b/bin/c
lang++ LEX=/home/a/android/arw11/prebuilts/build-tools/linux-x86/bin/flex YACC=/
home/a/android/arw11/prebuilts/build-tools/linux-x86/bin/bison M4=/home/a/androi
d/arw11/prebuilts/build-tools/linux-x86/bin/m4 -C kernel/samsung/msm8974 O=/home
/a/android/arw11/out/target/product/klteduos/obj/KERNEL_OBJ ARCH=arm CROSS_COMPI
LE=\"/usr/bin/ccache /home/a/android/arw11/prebuilts/gcc/linux-x86/arm/arm-linux
-androideabi-4.9/bin/arm-linux-androidkernel-\" dtbs; fi ) &&
(if grep -q '=m' /home/a/android/arw11/out/target/product/klteduos/obj/KERNEL_OB
J/.config; then echo \"Building Kernel Modules\"; P
ATH=/home/a/android/arw11/out/host/linux-x86/bin:\$PATH PATH=/home/a/android/arw
11/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidke
rnel-/bin:\$PATH PATH=/home/a/android/arw11/prebuilts/tools-extras/linux-x86/bin
:\$PATH LD_LIBRARY_PATH=/home/a/android/arw11/prebuilts/tools-extras/linux-x86/l
ib:\$LD_LIBRARY_PATH PERL5LIB=/home/a/android/arw11/prebuilts/tools-extras/commo
n/perl-base BISON_PKGDATADIR=/home/a/android/arw11/prebuilts/build-tools/common/
bison /home/a/android/arw11/prebuilts/build-tools/linux-x86/bin/make -j8 CFLAGS
_MODULE=\"-fno-pic\" CPATH=\"/usr/include:/usr/include/x86_64-linux-gnu\" HOSTCF
LAGS=\"-fuse-ld=lld\" HOSTLDFLAGS=\"-L/usr/lib/x86_64-linux-gnu -L/usr/lib64 -fu
se-ld=lld\" HOSTCFLAGS=\"-fuse-ld=lld -Wno-unused-command-line-argument\" HOSTCC
=/home/a/android/arw11/prebuilts/clang/host/linux-x86/clang-r383902b/bin/clang H
OSTCXX=/home/a/android/arw11/prebuilts/clang/host/linux-x86/clang-r383902b/bin/c
lang++ LEX=/home/a/android/arw11/prebuilts/build-tools/linux-x86/bin/flex YACC=/
home/a/android/arw11/prebuilts/build-tools/linux-x86/bin/bison M4=/home/a/androi
d/arw11/prebuilts/build-tools/linux-x86/bin/m4 -C kernel/samsung/msm8974 O=/home
/a/android/arw11/out/target/product/klteduos/obj/KERNEL_OBJ ARCH=arm CROSS_COMPI
LE=\"/usr/bin/ccache /home/a/android/arw11/prebuilts/gcc/linux-x86/arm/arm-linux
-androideabi-4.9/bin/arm-linux-androidkernel-\" modules || exit \"\$?\"; e
cho \"Installing Kernel Modules\"; PATH=/home/a/android/arw
11/out/host/linux-x86/bin:\$PATH PATH=/home/a/android/arw11/prebuilts/gcc/linux-
x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-/bin:\$PATH PATH=/
home/a/android/arw11/prebuilts/tools-extras/linux-x86/bin:\$PATH LD_LIBRARY_PATH
=/home/a/android/arw11/prebuilts/tools-extras/linux-x86/lib:\$LD_LIBRARY_PATH PE
RL5LIB=/home/a/android/arw11/prebuilts/tools-extras/common/perl-base BISON_PKGDA
TADIR=/home/a/android/arw11/prebuilts/build-tools/common/bison /home/a/android/a
rw11/prebuilts/build-tools/linux-x86/bin/make -j8 CFLAGS_MODULE=\"-fno-pic\" CP
ATH=\"/usr/include:/usr/include/x86_64-linux-gnu\" HOSTCFLAGS=\"-fuse-ld=lld\" H
OSTLDFLAGS=\"-L/usr/lib/x86_64-linux-gnu -L/usr/lib64 -fuse-ld=lld\" HOSTCFLAGS=
\"-fuse-ld=lld -Wno-unused-command-line-argument\" HOSTCC=/home/a/android/arw11/
prebuilts/clang/host/linux-x86/clang-r383902b/bin/clang HOSTCXX=/home/a/android/
arw11/prebuilts/clang/host/linux-x86/clang-r383902b/bin/clang++ LEX=/home/a/andr
oid/arw11/prebuilts/build-tools/linux-x86/bin/flex YACC=/home/a/android/arw11/pr
ebuilts/build-tools/linux-x86/bin/bison M4=/home/a/android/arw11/prebuilts/build
-tools/linux-x86/bin/m4 -C kernel/samsung/msm8974 O=/home/a/android/arw11/out/ta
rget/product/klteduos/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=\"/usr/bin/ccache /h
ome/a/android/arw11/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/ar
m-linux-androidkernel-\" INSTALL_MOD_PATH=/home/a/android/arw11/out/target/pr
oduct/klteduos/obj/PACKAGING/kernel_modules_intermediates INSTALL_MOD_STRIP=1 mo
dules_install; kernel_release=\$(cat /home/a/android/arw11/out/
target/product/klteduos/obj/KERNEL_OBJ/include/config/kernel.release) k
ernel_modules_dir=/home/a/android/arw11/out/target/product/klteduos/obj/PACKAGIN
G/kernel_modules_intermediates/lib/modules/\$kernel_release ;
modules=\$(find \$kernel_modules_dir -type f -name '*.ko
'); ( mkdir -p /home/a/android/arw11/out/target/product/k
lteduos/system/vendor/lib/modules ) && (cp \$modules /home/a/android/arw11/out/t
arget/product/klteduos/system/vendor/lib/modules/ ) && (rm -rf /home/a/android/a
rw11/out/target/product/klteduos/obj/PACKAGING/depmod_vendor_intermediates ) &&
(mkdir -p /home/a/android/arw11/out/target/product/klteduos/obj/PACKAGING/depmod
_vendor_intermediates/lib/modules/0.0/vendor/lib/modules ) && (cp \$modules /hom
e/a/android/arw11/out/target/product/klteduos/obj/PACKAGING/depmod_vendor_interm
ediates/lib/modules/0.0/vendor/lib/modules ) && (/home/a/android/arw11/out/host/
linux-x86/bin/depmod -b /home/a/android/arw11/out/target/product/klteduos/obj/PA
CKAGING/depmod_vendor_intermediates 0.0 ) && (sed -e 's/\\(.*modules.*\\):/\\/\\
1:/g' -e 's/ \\([^ ]*modules[^ ]*\\)/ \\/\\1/g' /home/a/android/arw11/out/target
/product/klteduos/obj/PACKAGING/depmod_vendor_intermediates/lib/modules/0.0/modu
les.dep > /home/a/android/arw11/out/target/product/klteduos/system/vendor/lib/mo
dules/modules.dep ) && (cp /home/a/android/arw11/out/target/product/klteduos/obj
/PACKAGING/depmod_vendor_intermediates/lib/modules/0.0/modules.softdep /home/a/a
ndroid/arw11/out/target/product/klteduos/system/vendor/lib/modules ) && (cp /hom
e/a/android/arw11/out/target/product/klteduos/obj/PACKAGING/depmod_vendor_interm
ediates/lib/modules/0.0/modules.alias /home/a/android/arw11/out/target/product/k
lteduos/system/vendor/lib/modules ) && (rm -f /home/a/android/arw11/out/target/p
roduct/klteduos/system/vendor/lib/modules/modules.load ) && (for MODULE in ; do
basename \$MODULE >> /home/a/android/arw11/out/target/product/klteduos/system/ve
ndor/lib/modules/modules.load; done); fi )"
make: Entering directory '/home/a/android/arw11/kernel/samsung/msm8974'
GEN /home/a/android/arw11/out/target/product/klteduos/obj/KERNEL_OBJ/Makef
ile
scripts/kconfig/conf --silentoldconfig Kconfig
sound/soc/codecs/audience/Kconfig:40:warning: type of 'SND_SOC_ES_SLIM' redefine
d from 'boolean' to 'tristate'
sound/soc/codecs/audience/Kconfig:43:warning: type of 'SND_SOC_ES_I2C' redefined
from 'boolean' to 'tristate'
sound/soc/codecs/audience/Kconfig:44:warning: choice value used outside its choi
ce group
sound/soc/codecs/audience/Kconfig:41:warning: choice value used outside its choi
ce group
boolean symbol SND_SOC_MAX98506 tested for 'm'? test forced to 'n'
GEN /home/a/android/arw11/out/target/product/klteduos/obj/KERNEL_OBJ/Makef
ile
WRAP arch/arm/include/generated/asm/auxvec.h
WRAP arch/arm/include/generated/asm/bitsperlong.h
WRAP arch/arm/include/generated/asm/cputime.h
WRAP arch/arm/include/generated/asm/emergency-restart.h
WRAP arch/arm/include/generated/asm/errno.h
WRAP arch/arm/include/generated/asm/ioctl.h
WRAP arch/arm/include/generated/asm/irq_regs.h
WRAP arch/arm/include/generated/asm/kdebug.h
WRAP arch/arm/include/generated/asm/local.h
WRAP arch/arm/include/generated/asm/local64.h
WRAP arch/arm/include/generated/asm/percpu.h
WRAP arch/arm/include/generated/asm/poll.h
CHK include/linux/version.h
WRAP arch/arm/include/generated/asm/resource.h
WRAP arch/arm/include/generated/asm/sections.h
UPD include/linux/version.h
WRAP arch/arm/include/generated/asm/siginfo.h
WRAP arch/arm/include/generated/asm/simd.h
WRAP arch/arm/include/generated/asm/sizes.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
Using /home/a/android/arw11/kernel/samsung/msm8974 as source for kernel
HOSTCC scripts/kallsyms
HOSTCC scripts/dtc/checks.o
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
HOSTCC scripts/conmakehash
HOSTCC scripts/dtc/data.o
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
ccache: error: execute_noreturn of /home/a/android/arw11/prebuilts/gcc/linux-x86
/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-gcc failed: No such f
ile or directory
make[3]: *** [/home/a/android/arw11/kernel/samsung/msm8974/scripts/Makefile.buil
d:308: scripts/mod/empty.o] Error 1
make[3]: *** Waiting for unfinished jobs....
SHIPPED scripts/dtc/dtc-lexer.lex.c
SHIPPED scripts/dtc/dtc-parser.tab.h
SHIPPED scripts/dtc/dtc-parser.tab.c
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/srcpos.o
make[2]: *** [/home/a/android/arw11/kernel/samsung/msm8974/scripts/Makefile.buil
d:443: scripts/mod] Error 2
make[2]: *** Waiting for unfinished jobs....
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/util.o
HOSTCC scripts/dtc/dtc-lexer.lex.o
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/dtc
make[1]: *** [/home/a/android/arw11/kernel/samsung/msm8974/Makefile:514: scripts
] Error 2
make: *** [Makefile:130: sub-make] Error 2
make: Leaving directory '/home/a/android/arw11/kernel/samsung/msm8974'
23:37:30 ninja failed with: exit status 1

#### failed to build some targets (04:37 (mm:ss)) ####

I'm sure there is no adapting problem. There is a development and building issue

How can get rid of this trouble? Any help really appreciated.

Thanks advance...