As /etc/profile.d/java-config-2.sh exports $JAVAC, the Android build system complains as it also tries to use it: make -j80 ============================================ PLATFORM_VERSION_CODENAME=P PLATFORM_VERSION=P TARGET_PRODUCT=aosp_arm TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a TARGET_CPU_VARIANT=generic HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-4.14.15-gentoo-x86_64-Gentoo/Linux HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=OC-MR1 OUT_DIR=out ============================================ [1/1] out/soong/.minibootstrap/minibp out/soong/.bootstrap/build.ninja removed old ninja-created file out/soong/.bootstrap/docs/soong_build.html because it has no rule to generate it [57/58] glob prebuilts/ndk/stl.bp [75/75] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja out/build-aosp_arm-cleanspec.ninja is missing, regenerating... out/soong/make_vars-aosp_arm.mk:545: warning: JAVAC does not match between Make and Soong: out/soong/make_vars-aosp_arm.mk:545: warning: Make : /etc/java-config-2/current-system-vm/bin/javac out/soong/make_vars-aosp_arm.mk:545: warning: Soong: prebuilts/jdk/jdk9/linux-x86/bin/javac out/soong/make_vars-aosp_arm.mk:837: error: Soong variable check failed. 08:16:15 ckati failed with: exit status 1 make: *** [build/make/core/main.mk:21: run_soong_ui] Error 1 If I 'unset JAVAC' then the build succeeds. Is JAVAC a standardizes env variable? Or is it just a too overloaded variable across various systems (I've found plenty other build systems that set JAVAC) that Gentoo should try to avoid it?
Created attachment 518544 [details] emerge --info
the LEX environment variable is also problematic. If I unset JAVAC unset JAVA_HOME unset JDK_HOME unset LEX the build scripts run fine
Guess Gentoo should have established a common prefix to avoid such clashes.
JAVAC is now unset by soong upstream: https://android.googlesource.com/platform/build/soong/+/7b067fb75 Please confirm this fixes the issue for you.
This does not fix the issue for me alone, as I also have to unset LEX for the build process to continue.
(In reply to Xavier Miller from comment #2) > the LEX environment variable is also problematic. > > If I > > unset JAVAC > unset JAVA_HOME > unset JDK_HOME > unset LEX > > > the build scripts run fine I tried to compile LineageOS 20.0 and had a similar problem. This solution worked for me