LineageOS source compilation fails - Android Q&A, Help & Troubleshooting

I'm trying to build Lineage 14.1 for serranoltexx (for 6 days now).
When I started the compilation using "breakfast serranoltexx" an error appears after the 7 percent mark (~2minutes).
I followed this guide: wiki.lineageos. org/devices/serranoltexx/build
with a fresh Ubuntu 17.04 VM Box installation two times but that error always appears.
The only thing I still could mention is that pulled the proprietary blobs using my phone as stated in the instructions not with the stock Rom but Lineage 14.1 already installed.
Full console output:
(error at line #321) pastebin. com/vC06fV36
Error:
Code:
Code:
make: Leaving directory '/home/mrglue/android/lineage/kernel/samsung/msm8930-common'
[ 7% 2535/34256] Building Kernel
FAILED: /bin/bash -c "(
make
-j4
CFLAGS_MODULE=\"-fno-pic\"
-C kernel/samsung/msm8930-common
O=/home/mrglue/android/lineage/out/target/product/serranoltexx/obj/KERNEL_OBJ
ARCH=arm
CROSS_COMPILE=\"/home/mrglue/android/lineage/prebuilts/misc/linux-x86/ccache/ccache arm-linux-androidkernel-\"
zImage
) && (
if grep -q 'CONFIG_OF=y' /home/mrglue/android/lineage/out/target/product/serranoltexx/obj/KERNEL_OBJ/.config ; then
echo \"Building DTBs\" ;
make
-j4
CFLAGS_MODULE=\"-fno-pic\"
-C kernel/samsung/msm8930-common
O=/home/mrglue/android/lineage/out/target/product/serranoltexx/obj/KERNEL_OBJ
ARCH=arm CROSS_COMPILE=\"/home/mrglue/android/lineage/prebuilts/misc/linux-x86/ccache/ccache arm-linux-androidkernel-\" dtbs ;
else
echo \"DTBs not enabled\" ;
fi
) && (
if grep -q 'CONFIG_MODULES=y'/home/mrglue/android/lineage/out/target/product/serranoltexx/obj/KERNEL_OBJ/.config ; then
echo \"Building Kernel Modules\" ;
make
-j4
CFLAGS_MODULE=\"-fno-pic\"
-C kernel/samsung/msm8930-common
O=/home/mrglue/android/lineage/out/target/product/serranoltexx/obj/KERNEL_OBJ
ARCH=arm
CROSS_COMPILE=\"/home/mrglue/android/lineage/prebuilts/misc/linux-x86/ccache/ccache arm-linux-androidkernel-\" modules &&
make
-j4
CFLAGS_MODULE=\"-fno-pic\
-C kernel/samsung/msm8930-common
O=/home/mrglue/android/lineage/out/target/product/serranoltexx/obj/KERNEL_OBJ
INSTALL_MOD_PATH=../../system
ARCH=arm CROSS_COMPILE=\"/home/mrglue/android/lineage/prebuilts/misc/linux-x86/ccache/ccache arm-linux-androidkernel-\"
modules_install &&
mdpath=\`find /home/mrglue/android/lineage/out/target/product/serranoltexx/system/lib/modules
-type f
-name modules.order\`;
if [ \"\$mdpath\" != \"\" ];then
mpath=\`dirname \$mdpath\`;
ko=\`find \$mpath/kernel -type f -name *.ko\`;
for i in \$ko; do
arm-linux-androidkernel-strip --strip-unneeded \$i;
mv \$i /home/mrglue/android/lineage/out/target/product/serranoltexx/system/lib/modules/;
done;
fi &&
mdpath=\`find /home/mrglue/android/lineage/out/target/product/serranoltexx/system/lib/modules -type f -name modules.order\`;
if [ \"\$mdpath\" != \"\" ];then
mpath=\`dirname \$mdpath\`;
rm -rf \$mpath;
fi ;
else
echo \"Kernel Modules not enabled\" ;
fi )"

Edit1
I've also modified the .config following this guide
https:// null-byte.wonderhowto. com/how-to/android-cyanogenmod-kernel-building-monitor-mode-any-android-device-with-wireless-adapter-0162943/#Configuring-the-Kernel-&-Adding-Features
When I try to compile without this modification the error does not appear

Solved
Fixed.
Just modified the config with "make_defconfig.sh" in "kernel/VENDOR/KERNEL_NAME" instead of manually with make as stated in the guide!

Related

[Q] Android cross compiling - please help

I need some help with compiling a lib (ODE) for android - problem is it uses automake and I can't seem to find any decent documentation/howto to cross compile a static/dynamic lib for android.
If anyone has any experience in doing such builds, please can you help.
BTW, I'm using ubuntu 12.04 as a dev environment (latest up-to-datest SDK and NDKs are installed) and I have no problem with making the wrapper library - just need to get the static (or dynamic) lib built.
Never mind...
Never mind, I seem to have cracked it...
Here's the script I wrote...
ndk-autoconf
Code:
#!/bin/bash
if [ "$1" = "" ]; then
echo "Usage ndk-autoconf <api>\ne.g. ndk-autoconf android-9"
exit 1
else
platform=$1
shift
export NDK=${HOME}/android-ndk
cp ${NDK}/config.guess .
cp ${NDK}/config.sub .
export NDK_TOOLCHAIN=${NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
export CROSS_COMPILE=arm-linux-androideabi
export CC=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-gcc
export CXX=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-g++
export LD=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-ld
export AR=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-ar
export RANLIB=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-ranlib
export STRIP=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-strip
export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
export SYSROOT=${NDK}/platforms/${platform}/arch-arm
export CXXFLAGS=--sysroot=${SYSROOT}
export CFLAGS=--sysroot=${SYSROOT}
argStr=""
while [ "$1" != "" ]; do
argStr="${argStr} $1"
shift
done
./configure --host=arm-linux-androideabi --target=arm-linux-androideabi --prefix=$SYSROOT/usr LIBS="-lc -lgcc" $argStr
make
make install
fi
you'll need to get config.sub and config.guess from stackoverflow.com/questions/4594736/configure-does-not-recognize-androideabi (bottom answer) and copy them into your ndk root
improved
i improved your script.
after i wrote it down i realize that with NDK is more easier create a specific Android.mk rather then running configure.
hope this helps.
Code:
#!/bin/bash
# static data
CROSS_COMPILE=arm-linux-androideabi
NDK_TOOLCHAIN=""
function die()
{
echo [email protected]
exit 1
}
function arg_parse()
{
if [ $# -lt 2 ] ; then
die -e "Usage ndk-autoconf <ndk_path> <api>\ne.g. ndk-autoconf /opt/android-ndk 9"
fi
if [ ! -d "$1" ] ; then
die "error: the ndk-path is not valid"
fi
if [ ! -d "$1/platforms/android-$2/" ] ; then
die "cannot find android sysroot in your ndk_path"
fi
}
function check_external_scripts()
{
if [ ! -f "${NDK}/config.guess" -o ! -f "${NDK}/config.sub" ] ; then
echo "warning: missing config.guess or config.sub in your ndk dir"
echo "info: should i download them for you? [y/n]"
read choice
if [ "x$choice" != "xy" -a "x$choice" != "xY" ] ; then
die "error: missing config.guess or config.sub"
fi
wget "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" -qO "${NDK}/config.sub" || die "cannot download config.sub"
wget "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" -qO "${NDK}/config.guess" || die "cannot download config.guess"
fi
cp ${NDK}/config.guess . || die "cannot import files"
cp ${NDK}/config.sub . || die "cannot import files"
}
function find_toolchain()
{
local tmp;
local host_arch;
case $(uname -m) in
x86_64)
host_arch="x86_64"
;;
i[3456]86)
host_arch="x32"
;;
*)
die "cannot detect your system arch"
;;
esac
for d in $( ls -1 "${NDK}/toolchains/" ); do
name=$(basename "$d")
case $name in
*clang*) continue
;;
$CROSS_COMPILE-*)
NDK_TOOLCHAIN="${NDK}/toolchains/$name/prebuilt/linux-$host_arch/bin"
tmp="${NDK_TOOLCHAIN}/${CROSS_COMPILE}-"
for bin in gcc g++ ld ar ranlib strip; do
if [ ! -f "$tmp$bin" ] ; then
unset NDK_TOOLCHAIN
break
fi
done
;;
*) continue
;;
esac
done
test "x$NDK_TOOLCHAIN" != "x" || die "cannot find an usable toolchain"
}
## MAIN ##
arg_parse [email protected]
NDK=$1
PLATFORM="android-$2"
shift
shift
check_external_scripts [email protected]
find_toolchain
export CC=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-gcc
export CXX=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-g++
export LD=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-ld
export AR=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-ar
export RANLIB=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-ranlib
export STRIP=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-strip
export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
export SYSROOT=${NDK}/platforms/${PLATFORM}/arch-arm
export CXXFLAGS=--sysroot=${SYSROOT}
export CFLAGS=--sysroot=${SYSROOT}
argStr=""
while [ "$1" != "" ] ; do
argStr="${argStr} $1"
shift
done
./configure "--host=$CROSS_COMPILE" "--target=$CROSS_COMPILE" "--prefix=$SYSROOT/usr" LIBS="-lc -lgcc" $argStr && \
make -j$(( $(cat /proc/cpuinfo | grep processor | wc -l) +1 ))
#DEBUG
#make install
Hi,
I have modified a line in the current script at function find_toolchain() as on my setup (having Ubuntu 32 bit) the host_arch field always comes x86.
I have downloaded latest NDK toolchain for API19 (or Kitkat). However when I am compiling ncurses library I am getting following error in configure. Any guesses?
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
The command I gave is
./ndk_autoconf.sh <path to ndk> 19
Thanks.
actiononmail said:
Hi,
I have modified a line in the current script at function find_toolchain() as on my setup (having Ubuntu 32 bit) the host_arch field always comes x86.
I have downloaded latest NDK toolchain for API19 (or Kitkat). However when I am compiling ncurses library I am getting following error in configure. Any guesses?
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
The command I gave is
./ndk_autoconf.sh <path to ndk> 19
Thanks.
Click to expand...
Click to collapse
You must include this line on script:
Code:
export CPP=${NDK_TOOLCHAIN}/${CROSS_COMPILE}-cpp

[Q] dbtTool fails to build dt.img

Code:
[B]28.0.A.7.24[/B]/kernel$ dtbToolCM -o dt.img -s 2048 -p ./scripts/dtc/ ./arch/arm/boot/dts/
DTB combiner:
Input directory: './arch/arm/boot/dts/'
Output file: 'dt.img'
Found file: apq8094-v1-kitakami_karin_windy.dtb ... skip, failed to scan for 'qcom,msm-id = <' tag
Found file: apq8094-v2.1-kitakami_karin_windy.dtb ... skip, failed to scan for 'qcom,msm-id = <' tag
Found file: apq8094-v2.0-kitakami_karin_windy.dtb ... skip, failed to scan for 'qcom,msm-id = <' tag
=> [COLOR="Red"]Found 0 unique DTB(s)[/COLOR]
The kernel is built before without errors.
I got 2 warnings from the make kitakami_defconfig:
Code:
warning: (PCI_MSM && AMD_IOMMU) selects PCI_MSI which has [COLOR="red"]unmet direct dependencies (PCI && ARCH_SUPPORTS_MSI)[/COLOR]
warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has [COLOR="red"]unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))[/COLOR]
Should I bother? make runs fine...
Code:
[B]make V=1 dtbs[/B]
make -f scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
make -f /home/rest/android/28.0.A.7.24/kernel/scripts/Makefile.asm-generic \
src=asm obj=arch/arm64/include/generated/asm
make -f /home/rest/android/28.0.A.7.24/kernel/scripts/Makefile.asm-generic \
src=uapi/asm obj=arch/arm64/include/generated/uapi/asm
make -f scripts/Makefile.build obj=scripts
make -f scripts/Makefile.build obj=scripts/dtc
make -f scripts/Makefile.build obj=scripts/genksyms
make -f scripts/Makefile.build obj=scripts/mod
mkdir -p scripts/mod/
/home/rest/android/28.0.A.7.24/kernel/scripts/[I][COLOR="Magenta"]gcc-wrapper.py[/COLOR][/I] /home/rest/android/aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc -Wp,-MD,scripts/mod/.devicetable-offsets.s.d -nostdinc -isystem /home/rest/android/aarch64-linux-android-4.9/bin/../lib/gcc/aarch64-linux-android/4.9.x-google/include -I/home/rest/android/28.0.A.7.24/kernel/arch/arm64/include -Iarch/arm64/include/generated -Iinclude -I/home/rest/android/28.0.A.7.24/kernel/arch/arm64/include/uapi -Iarch/arm64/include/generated/uapi -I/home/rest/android/28.0.A.7.24/kernel/include/uapi -Iinclude/generated/uapi -include /home/rest/android/28.0.A.7.24/kernel/include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -mgeneral-regs-only -Wframe-larger-than=2048 -fstack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(devicetable_offsets)" -D"KBUILD_MODNAME=KBUILD_STR(devicetable_offsets)" -fverbose-asm -S -o scripts/mod/devicetable-offsets.s scripts/mod/devicetable-offsets.c
(set -e; echo "#ifndef __DEVICEVTABLE_OFFSETS_H__"; echo "#define __DEVICEVTABLE_OFFSETS_H__"; echo "/*"; echo " * DO NOT MODIFY."; echo " *"; echo " * This file was generated by Kbuild"; echo " *"; echo " */"; echo ""; sed -ne "/^->/{s:->#\(.*\):/* */:; s:^->\([^ ]*\) [\$#]*\([-0-9]*\) \(.*\):#define /* */:; s:^->\([^ ]*\) [\$#]*\([^ ]*\) \(.*\):#define /* */:; s:->::; p;}" scripts/mod/devicetable-offsets.s; echo ""; echo "#endif" ) > scripts/mod/devicetable-offsets.h
gcc -Wp,-MD,scripts/mod/.file2alias.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o scripts/mod/file2alias.o scripts/mod/file2alias.c
gcc -o scripts/mod/modpost scripts/mod/modpost.o scripts/mod/file2alias.o scripts/mod/sumversion.o
make -f scripts/Makefile.build obj=scripts/selinux
make -f scripts/Makefile.build obj=scripts/selinux/genheaders
make -f scripts/Makefile.build obj=scripts/selinux/mdp
make -f scripts/Makefile.build obj=arch/arm64/boot/dts dtbs
make[1]: [COLOR="Red"]Nothing to be done for 'dtbs'.[/COLOR]
make -f scripts/Makefile.build obj=arch/arm64/boot/dts/qcom dtbs
make[1]: [COLOR="red"]Nothing to be done for 'dtbs'.[/COLOR]
I am on Debian testing. Python 2.7.10
looking into .apq8094-v2.1-kitakami_karin_windy.dtb.dts.tmp in directory 28.0.A.7.24/kernel/arch/arm/boot/dts/ I find e.g.
Code:
qcom,msm-id = <253 0x10000>;
.
It does not make it into apq8094-v1-kitakami_karin_windy.dtb
Any hints how I could proceed to the dt.img?
I needed a newer dbtTool
and an additional -2 on the commandline to use the newer QC table of device tree.
http://forum.xda-developers.com/showthread.php?p=52279145 post #79
I use DooMLoRDs dtbToolCM.
Maybe the SONY documentation is for pre-2015 devices here.
Now I have built my first boot.img
... and my tablet bootloops :crying:

LineageOS 14.1 Build Error Please Help

I can't build LineageOS 14.1.
HP 15-ay012dx
Intel Core i5-6200U (2.3 GHz, Boost 2.8 GHz, Skylake)
Intel HD Graphics 520 (300 MHz, Boost 1 GHz)
DDR4 RAM 4GB, swap 4GB, Total 8GB
HGST 5400rpm 1TB HDD (Ubuntu Partition is 100GB)
Ubuntu 16.10 64-bit
This is my Computer Specification.
When i build CM13 it builds successfully, but if i build LineageOS 14.1 it fails.
This is the error log.
Please help.
[ 39% 13323/33791] Building with Jack: /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/classes.jack
FAILED: /bin/bash -c "(rm -f /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/classes.jack ) && (rm -rf /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc ) && (mkdir -p /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/ ) && (mkdir -p /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc ) && (rm -f /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list ) && (touch /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list ) && (echo -n 'frameworks/ex/common/java/com/android/common/LegacyHttpDateTime.java frameworks/ex/common/java/com/android/common/NetworkConnectivityListener.java frameworks/ex/common/java/com/android/common/OperationScheduler.java frameworks/ex/common/java/com/android/common/Rfc822InputFilter.java frameworks/ex/common/java/com/android/common/Rfc822Validator.java frameworks/ex/common/java/com/android/common/Search.java frameworks/ex/common/java/com/android/common/SharedPreferencesCompat.java frameworks/ex/common/java/com/android/common/contacts/BaseEmailAddressAdapter.java frameworks/ex/common/java/com/android/common/contacts/DataUsageStatUpdater.java frameworks/ex/common/java/com/android/common/content/ProjectionMap.java frameworks/ex/common/java/com/android/common/content/SQLiteContentProvider.java frameworks/ex/common/java/com/android/common/content/SyncStateContentProviderHelper.java frameworks/ex/common/java/com/android/common/io/MoreCloseables.java frameworks/ex/common/java/com/android/common/speech/LoggingEvents.java frameworks/ex/common/java/com/android/common/speech/Recognition.java frameworks/ex/common/java/com/android/common/userhappiness/UserHappinessSignals.java frameworks/ex/common/java/com/android/common/widget/CompositeCursorAdapter.java frameworks/ex/common/java/com/android/common/widget/GroupingListAdapter.java frameworks/ex/common/java/com/android/ex/editstyledtext/EditStyledText.java /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/src/java/com/android/common/GoogleLogTags.java ' >> /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list ) && (if [ -d "/home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/src" ]; then find /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/src -name '*.java' >> /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list; fi ) && (tr ' ' '\\n' < /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list | build/tools/normalize_path.py | sort -u > /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list-uniq ) && (if [ -s /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list-uniq ] ; then export tmpEcjArg="@/home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list-uniq"; else export tmpEcjArg=""; fi; JACK_VERSION=3.36.CANDIDATE /home/penguin97/android/system/out/host/linux-x86/bin/jack @build/core/jack-default.args --verbose error -g -D jack.java.source.version=1.7 --classpath /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack:/home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack -D jack.import.resource.policy=keep-first -D jack.import.type.policy=keep-first -D jack.android.min-api-level=8 --output-jack /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/classes.jack \$tmpEcjArg || ( rm -f /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/classes.jack ; exit 41 ) ) && (rm -f /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list ) && (mv /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc/java-source-list-uniq /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/jack-rsc.java-source-list )"
Communication error with Jack server (28). Try 'jack-diagnose'
[ 39% 13323/33791] Building with Jack: /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/with-local/classes.dex
Picked up _JAVA_OPTIONS: -Xmx4096m
Picked up _JAVA_OPTIONS: -Xmx4096m
[ 39% 13323/33791] build /home/penguin97/android/system/out/target/common/obj/JAVA_LIBRARIES/sdk_v21_intermediates/classes.jack
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/penguin97/android/system'
#### make failed to build some targets (01:34:11 (hh:mm:ss)) ####

Unable to build AOSP ROM

Hi,
as I started playing around to learn a little bit more about custom roms, sources, the building process etc. I wanted to build an AOSP ROM for myself to test, but while building I get this error everytime and I don't really know what is wrong or how to fix that.
Running the make -jN command as root doesn't help anything, neither changing the value from -j to 1
I followed the Sony AOSP build instructions guide (https://developer.sonymobile.com/op...uild-aosp-nougat-for-unlocked-xperia-devices/)
Does anyone know what is causing this and maybe how to fix this?
(I'm using Linuxmint 18.2 x64 and the device I want to build for is my Xperia X (SUZU) F5121)
Thanks
Here's whats causing the build process to stop:
[ 34% 12239/35670] build out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack
FAILED: /bin/bash -c "(mkdir -p out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack.tmpjill.res ) && (unzip -qo prebuilts/sdk/8/android.jar -d out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack.tmpjill.res ) && (find out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack.tmpjill.res -iname "*.class" -delete ) && (JACK_VERSION=3.36.CANDIDATE out/host/linux-x86/bin/jack @build/core/jack-default.args --verbose error -D jack.import.resource.policy=keep-first -D jack.import.type.policy=keep-first -D jack.android.min-api-level=1 --import prebuilts/sdk/8/android.jar --import-resource out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack.tmpjill.res --output-jack out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack ) && (rm -rf out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack.tmpjill.res )"
1 error during configuration. Try --help-properties for help.
Property 'jack.library.output.zip' (in Options): file 'out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack' can not be created (required because 'jack.library' (defined in Options) is set to true and 'jack.library.output.container' (defined in Options) is set to 'zip')
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: the rule for target „ninja_wrapper“ failed
make: *** [ninja_wrapper] Error 1

XenonHD unofficial PIE build errors.

Merging my source for XenonHD Oreo to Pie. Building is 85% complete but fails with an error about Hidden API situation? Below will be text of my terminal output about this situation.
Hidden API: /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
FAILED: /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar
/bin/bash -c "(rm -f /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar ) && (cp "/home/rondeau79/xenon/out/soong/.intermediates/frameworks/base/test-base/android.test.base/android_common/dex/android.test.base.jar" "/home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar" ) && (rm -rf /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (mkdir -p /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (unzip -q /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar 'classes*.dex' -d /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (find /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi -name "classes*.dex" | sort | sed 's/^/--dex=/' | xargs /home/rondeau79/xenon/out/host/linux-x86/bin/hiddenapi --light-greylist=/home/rondeau79/xenon/out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt --dark-greylist=/home/rondeau79/xenon/out/target/common/obj/PACKAGING/hiddenapi-dark-greylist.txt --blacklist=/home/rondeau79/xenon/out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt ) && (/home/rondeau79/xenon/out/soong/host/linux-x86/bin/soong_zip -o /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar -C /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi -D /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi ) && (/home/rondeau79/xenon/out/soong/host/linux-x86/bin/merge_zips -D -zipToNotStrip /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar -stripFile "classes*.dex" /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/javalib.jar /home/rondeau79/xenon/out/target/common/obj/JAVA_LIBRARIES/android.test.base_intermediates/dex-hiddenapi/classes.dex.jar /home/rondeau79/xenon/out/soong/.intermediates/frameworks/base/test-base/android.test.base/android_common/dex/android.test.base.jar )"
xargs: /home/rondeau79/xenon/out/host/linux-x86/bin/hiddenapi: terminated by signal 4
[ 1% 125/12346] Building Kernel Config
make: Entering directory '/home/rondeau79/xenon/kernel/moto/shamu'
My build environment is all up to date something seems to missing from a.) my build environment b.) the source code from Git or c.) etc.
Signal 4 (SIGILL) means that the hiddenapi binary is corrupt.
Sometimes corruption is random, so a good test is to clean build from scratch, and see if you get the same error again.
Other times corruption is from a compiler bug. Is your gcc the recommended version? - and not newer, because newer can mean new bugs.

Categories

Resources