lineageos4microg / docker-lineage-cicd

Docker microservice for LineageOS Continuous Integration and Continous Deployment
https://hub.docker.com/r/lineageos4microg/docker-lineage-cicd
GNU General Public License v3.0
503 stars 196 forks source link

19.1 h850 build fail #429

Closed jgeisler0303 closed 1 year ago

jgeisler0303 commented 1 year ago

Hi, because the first and last 19.1 build for my beloved h850 is quite old and buggy, I wanted to try to build it myself. Unfortunately I get this error which I couldn't find any help for on the internetz:

[100% 252/252] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER"     --top "$TOP"     --out "out/soong"     -n "out"     -d "out/soong/build.ninja.d"     -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp
error: vendor/google/coral/Android.bp:806:1: module "libMpeg4SwEncoder" variant "android_arm64_armv8-a_shared": module source path "vendor/google/coral/proprietary/vendor/lib64/libMpeg4SwEncoder.so" does not exist
error: vendor/google/coral/Android.bp:826:1: module "libsdsprpc" variant "android_arm64_armv8-a_shared": module source path "vendor/google/coral/proprietary/vendor/lib64/libsdsprpc.so" does not exist
ninja: build stopped: subcommand failed.
17:19:43 soong bootstrap failed with: exit status 1

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

>> [Thu Jun 22 17:19:43 UTC 2023] Failed build for h850
>> [Thu Jun 22 17:19:43 UTC 2023] Finishing build for h850
>> [Thu Jun 22 17:19:43 UTC 2023] Cleaning source dir for device h850
17:19:45 Entire build directory removed.

#### build completed successfully (2 seconds) ####

Can I get these missing files somewhere? Or is there anything I need to change? Any help is appreciated.

giovEra commented 1 year ago

What I wonder is, what does the vendor for "coral" (Google Pixel 4 XL) have to do with "h850" (LG G5 -International)?

Did you add the vendo for h850? <project name="TheMuppets/proprietary_vendor_lge" path="vendor/lge" />

jgeisler0303 commented 1 year ago

Thanks for the quick reply.

The error occurred because I interrupted the docker process and it apparently didn't download all of vendor/google/coral. Sorry for the fuss.

These files are needed during the h850 build because it includes the Google Camera.

I did not have to add the vendor project from TheMuppets. This is already done automatically. There is a "proprietary.xml" in ".repo/local_manifest".

Now the build runs much farther but I get this error:

[ 20% 27140/129491] //bionic/linker:ld-android strip ld-android.so [apex10000]
FAILED: out/soong/.intermediates/bionic/linker/ld-android/android_arm64_armv8-a_shared_apex10000/ld-android.so
XZ=prebuilts/build-tools/linux-x86/bin/xz CREATE_MINIDEBUGINFO=prebuilts/build-tools/linux-x86/bin/create_minidebuginfo CLANG_BIN=prebuilts/clang/host/linux-x86/clang-r416183b1/bin build/soong/scripts/strip.sh 
 --keep-mini-debug-info -i out/soong/.intermediates/bionic/linker/ld-android/android_arm64_armv8-a_shared_apex10000/unstripped/ld-android.so -o out/soong/.intermediates/bionic/linker/ld-android/android_arm64_ar
mv8-a_shared_apex10000/ld-android.so -d out/soong/.intermediates/bionic/linker/ld-android/android_arm64_armv8-a_shared_apex10000/ld-android.so.d
build/soong/scripts/strip.sh: line 95: 1066774 Illegal instruction     (core dumped) "${CREATE_MINIDEBUGINFO}" "${infile}" "${outfile}.mini_debuginfo.xz"
[ 20% 27141/129491] //bionic/linker:ld-android strip ld-android.so [arm apex10000]
FAILED: out/soong/.intermediates/bionic/linker/ld-android/android_arm_armv8-a_shared_apex10000/ld-android.so
XZ=prebuilts/build-tools/linux-x86/bin/xz CREATE_MINIDEBUGINFO=prebuilts/build-tools/linux-x86/bin/create_minidebuginfo CLANG_BIN=prebuilts/clang/host/linux-x86/clang-r416183b1/bin build/soong/scripts/strip.sh 
 --keep-mini-debug-info -i out/soong/.intermediates/bionic/linker/ld-android/android_arm_armv8-a_shared_apex10000/unstripped/ld-android.so -o out/soong/.intermediates/bionic/linker/ld-android/android_arm_armv8-
a_shared_apex10000/ld-android.so -d out/soong/.intermediates/bionic/linker/ld-android/android_arm_armv8-a_shared_apex10000/ld-android.so.d
build/soong/scripts/strip.sh: line 95: 1066770 Illegal instruction     (core dumped) "${CREATE_MINIDEBUGINFO}" "${infile}" "${outfile}.mini_debuginfo.xz"
[ 20% 27142/129491] //bionic/linker:ld-android strip ld-android.so
FAILED: out/soong/.intermediates/bionic/linker/ld-android/android_recovery_arm64_armv8-a_shared/ld-android.so
XZ=prebuilts/build-tools/linux-x86/bin/xz CREATE_MINIDEBUGINFO=prebuilts/build-tools/linux-x86/bin/create_minidebuginfo CLANG_BIN=prebuilts/clang/host/linux-x86/clang-r416183b1/bin build/soong/scripts/strip.sh 
 --keep-mini-debug-info -i out/soong/.intermediates/bionic/linker/ld-android/android_recovery_arm64_armv8-a_shared/unstripped/ld-android.so -o out/soong/.intermediates/bionic/linker/ld-android/android_recovery_
arm64_armv8-a_shared/ld-android.so -d out/soong/.intermediates/bionic/linker/ld-android/android_recovery_arm64_armv8-a_shared/ld-android.so.d
build/soong/scripts/strip.sh: line 95: 1066772 Illegal instruction     (core dumped) "${CREATE_MINIDEBUGINFO}" "${infile}" "${outfile}.mini_debuginfo.xz"
[ 20% 27143/129491] //bionic/linker:ld-android strip ld-android.so
FAILED: out/soong/.intermediates/bionic/linker/ld-android/android_arm64_armv8-a_shared/ld-android.so
XZ=prebuilts/build-tools/linux-x86/bin/xz CREATE_MINIDEBUGINFO=prebuilts/build-tools/linux-x86/bin/create_minidebuginfo CLANG_BIN=prebuilts/clang/host/linux-x86/clang-r416183b1/bin build/soong/scripts/strip.sh 
 --keep-mini-debug-info -i out/soong/.intermediates/bionic/linker/ld-android/android_arm64_armv8-a_shared/unstripped/ld-android.so -o out/soong/.intermediates/bionic/linker/ld-android/android_arm64_armv8-a_shar
ed/ld-android.so -d out/soong/.intermediates/bionic/linker/ld-android/android_arm64_armv8-a_shared/ld-android.so.d
build/soong/scripts/strip.sh: line 95: 1066773 Illegal instruction     (core dumped) "${CREATE_MINIDEBUGINFO}" "${infile}" "${outfile}.mini_debuginfo.xz"
[ 20% 27144/129491] //bionic/linker:ld-android strip ld-android.so [arm]
FAILED: out/soong/.intermediates/bionic/linker/ld-android/android_arm_armv8-a_shared/ld-android.so
XZ=prebuilts/build-tools/linux-x86/bin/xz CREATE_MINIDEBUGINFO=prebuilts/build-tools/linux-x86/bin/create_minidebuginfo CLANG_BIN=prebuilts/clang/host/linux-x86/clang-r416183b1/bin build/soong/scripts/strip.sh 
 --keep-mini-debug-info -i out/soong/.intermediates/bionic/linker/ld-android/android_arm_armv8-a_shared/unstripped/ld-android.so -o out/soong/.intermediates/bionic/linker/ld-android/android_arm_armv8-a_shared/l
d-android.so -d out/soong/.intermediates/bionic/linker/ld-android/android_arm_armv8-a_shared/ld-android.so.d
build/soong/scripts/strip.sh: line 95: 1066768 Illegal instruction     (core dumped) "${CREATE_MINIDEBUGINFO}" "${infile}" "${outfile}.mini_debuginfo.xz"
[ 20% 27145/129491] //frameworks/native/opengl/libs:libEGL_blobCache clang++ EGL/BlobCache.cpp
ninja: build stopped: subcommand failed.
18:14:18 ninja failed with: exit status 1

#### failed to build some targets (22:29 (mm:ss)) ####

>> [Fri Jun 23 18:14:18 UTC 2023] Failed build for h850

Can anyone help me with this one?

jgeisler0303 commented 1 year ago

To answer my own question: I think my computer is too old (Illegal instruction).

jgeisler0303 commented 1 year ago

A new computer gets me much farther now, but a new FAIL has occured:

[ 98% 127911/129491] Target Java: out/target/common/obj/APPS/Dialer_intermediates/classes-full-debug.jar
FAILED: out/target/common/obj/APPS/Dialer_intermediates/classes-full-debug.jar
/bin/bash -c "(rm -f out/target/common/obj/APPS/Dialer_intermediates/classes-full-debug.jar ) && (rm -rf out/target/common/obj/APPS/Dialer_intermediates/classes out/target/common/obj/APPS/Dialer_intermed
iates/anno ) && (mkdir -p out/target/common/obj/APPS/Dialer_intermediates/ ) && (mkdir -p out/target/common/obj/APPS/Dialer_intermediates/classes out/target/common/obj/APPS/Dialer_intermediates/anno ) &&
 (out/soong/host/linux-x86/bin/zipsync -d out/target/common/obj/APPS/Dialer_intermediates/srcjars -l out/target/common/obj/APPS/Dialer_intermediates/srcjar-list -f \"*.java\"  out/target/common/obj/APPS/
Dialer_intermediates/aapt2.srcjar out/target/common/obj/APPS/Dialer_intermediates/proto.srcjar ) && (if [ -s out/target/common/obj/APPS/Dialer_intermediates/java-source-list -o -s out/target/common/obj/A
PPS/Dialer_intermediates/srcjar-list ] ; then out/soong/host/linux-x86/bin/soong_javac_wrapper  prebuilts/jdk/jdk11/linux-x86/bin/javac  -J-XX:OnError=\"cat hs_err_pid%p.log\" -J-XX:CICompilerCount=6 -J-
XX:+UseDynamicNumberOfGCThreads -Xmaxerrs 9999999 -encoding UTF-8 -sourcepath \"\" -g -XDskipDuplicateBridges=true -XDstringConcat=inline -encoding UTF-8   -bootclasspath out/target/common/obj/JAVA_LIBRA
RIES/android_system_stubs_current_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/core-lambda-stubs_intermediates/classes-header.jar  -classpath out/target/common/obj/JAVA_LIBRARIES
/auto_value_annotations_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/org.apache.http.legacy.stubs.system_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/and
roid-common_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/com.android.vcard_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-animal-sniffer-annotations
-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-commons-io-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-dagger2-target_intermed
iates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-disklrucache-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-gifdecoder-target_intermediates/class
es-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-glide-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-grpc-all-target_intermediates/classes-header.jar:out/ta
rget/common/obj/JAVA_LIBRARIES/dialer-grpc-context-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-grpc-core-target_intermediates/classes-header.jar:out/target/common/
obj/JAVA_LIBRARIES/dialer-grpc-okhttp-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-grpc-protobuf-lite-target_intermediates/classes-header.jar:out/target/common/obj/
JAVA_LIBRARIES/dialer-grpc-stub-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-j2objc-annotations-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_L
IBRARIES/dialer-javax-annotation-api-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-javax-inject-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LI
BRARIES/dialer-libshortcutbadger-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-mime4j-core-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARI
ES/dialer-mime4j-dom-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-okhttp-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-okio-ta
rget_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-error-prone-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-guava-target_intermediate
s/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-glide-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-glide-annotation-target_intermediates/classes-he
ader.jar:out/target/common/obj/JAVA_LIBRARIES/dialer-zxing-target_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/jsr305_intermediates/classes-header.jar:out/target/common/obj/JAVA_
LIBRARIES/libbackup_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/libphonenumber_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/volley_intermediates/classes
-header.jar:out/target/common/obj/JAVA_LIBRARIES/org.lineageos.lib.phone_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/libprotobuf-java-lite_intermediates/classes-header.jar:out/t
arget/common/obj/JAVA_LIBRARIES/android-support-dynamic-animation_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/android-support-core-ui_intermediates/classes-header.jar:out/target
/common/obj/JAVA_LIBRARIES/android-support-design_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/android-support-transition_intermediates/classes-header.jar:out/target/common/obj/J
AVA_LIBRARIES/android-support-v13_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/android-support-v4_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/android-su
pport-v7-appcompat_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/android-support-v7-cardview_intermediates/classes-header.jar:out/target/common/obj/JAVA_LIBRARIES/android-support-v7-recyclerview_intermediates/classes-header.jar  -d out/target/common/obj/APPS/Dialer_intermediates/classes -s out/target/common/obj/APPS/Dialer_intermediates/anno  -source 1.8 -target 1.8 -g:source,lin
es  -processor com.google.auto.value.processor.AutoValueProcessor,dagger.internal.codegen.ComponentProcessor,com.bumptech.glide.annotation.compiler.GlideAnnotationProcessor,com.android.dialer.rootcompone
ntgenerator.RootComponentProcessor -processorpath out/host/common/obj/JAVA_LIBRARIES/auto_value_plugin_intermediates/classes.jar:out/host/common/obj/JAVA_LIBRARIES/javapoet-prebuilt-jar_intermediates/cla
sses.jar:out/host/common/obj/JAVA_LIBRARIES/dialer-dagger2_intermediates/classes.jar:out/host/common/obj/JAVA_LIBRARIES/dialer-dagger2-compiler_intermediates/classes.jar:out/host/common/obj/JAVA_LIBRARIE
S/dialer-dagger2-producers_intermediates/classes.jar:out/host/common/obj/JAVA_LIBRARIES/dialer-glide-annotation_intermediates/classes.jar:out/host/common/obj/JAVA_LIBRARIES/dialer-glide-compiler_intermed
iates/classes.jar:out/host/common/obj/JAVA_LIBRARIES/dialer-guava_intermediates/classes.jar:out/host/common/obj/JAVA_LIBRARIES/dialer-javax-annotation-api_intermediates/classes.jar:out/host/common/obj/JA
VA_LIBRARIES/dialer-javax-inject_intermediates/classes.jar:out/host/common/obj/JAVA_LIBRARIES/dialer-rootcomponentprocessor_intermediates/classes.jar \\@out/target/common/obj/APPS/Dialer_intermediates/java-source-list \\@out/target/common/obj/APPS/Dialer_intermediates/srcjar-list || ( rm -rf out/target/common/obj/APPS/Dialer_intermediates/classes ; exit 41 ) fi ) && (out/soong/host/linux-x86/bin/soong_z
ip -jar -o out/target/common/obj/APPS/Dialer_intermediates/classes-full-debug.jar -C out/target/common/obj/APPS/Dialer_intermediates/classes -D out/target/common/obj/APPS/Dialer_intermediates/classes )"
Note: Generating a Provider for com.android.dialer.glidephotomanager.impl.GlidePhotoManagerImpl. Prefer to run the dagger processor over that class instead.
Note: [1] Wrote GeneratedAppGlideModule with: []
[ 98% 127912/129491] //packages/apps/Gallery2:Gallery2 r8 [common]
[ 98% 127913/129491] //packages/apps/LineageParts:LineageParts r8 [common]
Warning: Missing class org.jetbrains.annotations.NotNull (referenced from: android.os.Parcelable$Creator com.android.systemui.flags.BooleanFlag.CREATOR and 285 other contexts)
Missing class org.jetbrains.annotations.Nullable (referenced from: okio.Segment okio.Buffer.head and 35 other contexts)
[ 98% 127914/129491] target Dex: TrebuchetQuickStep
[ 98% 127915/129491] //frameworks/base:framework-minus-apex d8 [common]
[ 98% 127916/129491] //packages/services/Telecomm:Telecom r8 [common]
Warning: Missing class androidx.palette.graphics.Palette$Builder (referenced from: android.graphics.Bitmap androidx.mediarouter.app.MediaRouteControllerDialog$FetchArtTask.doInBackground(java.lang.Void[]
) and 1 other context)
Missing class androidx.palette.graphics.Palette$Swatch (referenced from: android.graphics.Bitmap androidx.mediarouter.app.MediaRouteControllerDialog$FetchArtTask.doInBackground(java.lang.Void[]) and 1 ot
her context)
Missing class androidx.palette.graphics.Palette (referenced from: android.graphics.Bitmap androidx.mediarouter.app.MediaRouteControllerDialog$FetchArtTask.doInBackground(java.lang.Void[]) and 1 other con
text)
Missing class com.google.common.util.concurrent.ListenableFuture (referenced from: com.google.common.util.concurrent.ListenableFuture androidx.mediarouter.media.MediaRouter$PrepareTransferNotifier.mFutur
e and 3 other contexts)
Missing class org.jetbrains.annotations.NotNull (referenced from: kotlin.Unit kotlin.Unit.INSTANCE and 179 other contexts)
Missing class org.jetbrains.annotations.Nullable (referenced from: okio.Segment okio.Buffer.head and 18 other contexts)
ninja: build stopped: subcommand failed.
15:36:05 ninja failed with: exit status 1

#### failed to build some targets (05:19:36 (hh:mm:ss)) ####

>> [Wed Jun 28 15:36:06 UTC 2023] Failed build for h850

There are many classes missing but the failure reason seems to be something else in "Target Java: out/target/common/obj/APPS/Dialer_intermediates/classes-full-debug.jar".

Anyone any ideas?

jgeisler0303 commented 1 year ago

My bad - again. I ran out of memory and I should have known. May this serve as a warning to everyone trying to run on 16GB RAM.

And here is my solution: I increased swap space and added -e "JAVA_TOOL_OPTIONS=-Xmx6g" -e "PARALLEL_JOBS=2" to the docker command line to limit java heap space and limit max number of concurrent jobs.

Now I have a brand new image :-)

petefoth commented 1 year ago

Closing this issue as you seem to have solved it yourself :)