Major bug in Android 14 breaks building AOSP for Debian/Ubuntu users

Hello everyone!

There is a bug in android-14.0.0_r11 that prevents Ubuntu/Debian users from building successfully.

Error message:

FAILED: out/soong/.intermediates/external/boringssl/libcrypto/android_vendor.34_arm64_armv8-a_shared/libcrypto.so.abidiff
(prebuilts/clang-tools/linux-x86/bin/header-abi-diff -target-version current -allow-unreferenced-changes -allow-unreferenced-elf-symbol-changes -lib libcrypto -arch arm64 -o out/soong/.intermediates/external/boringssl/libcrypto/android_vendor.34_arm64_armv8-a_shared/libcrypto.so.abidiff -new out/soong/.intermediates/external/boringssl/libcrypto/android_vendor.34_arm64_armv8-a_shared/libcrypto.so.lsdump -old prebuilts/abi-dumps/vndk/34/64/arm64/source-based/libcrypto.so.lsdump)|| (echo 'error: Please update ABI references with: $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libcrypto' && (mkdir -p $DIST_DIR/abidiffs && cp out/soong/.intermediates/external/boringssl/libcrypto/android_vendor.34_arm64_armv8-a_shared/libcrypto.so.abidiff $DIST_DIR/abidiffs/) && exit 1)
******************************************************
error: libcrypto's ABI has EXTENDING CHANGES. Please check compatibility report at: out/soong/.intermediates/external/boringssl/libcrypto/android_vendor.34_arm64_armv8-a_shared/libcrypto.so.abidiff
******************************************************
error: Please update ABI references with: $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libcrypto
[ 82% 149813/181515] //system/gatekeeper:libgatekeeper link libgatekeeper.so
[ 82% 149814/181515] //system/memory/libion:libion link libion.so
[ 82% 149815/181515] //frameworks/compile/libbcc/bcinfo:libbcinfo header-abi-linker libbcinfo.so.lsdump
ninja: build stopped: subcommand failed.
09:21:42 ninja failed with: exit status 1

Steps to reproduce:

Platform: Debian 12 Bookworm

#Install build packages
sudo apt-get install git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig python3 android-sdk-platform-tools-common openjdk-17-jdk
#Add user to group plugdev
sudo usermod -aG plugdev $LOGNAME
#sync repo
repo init -u https://android.googlesource.com/platform/manifest -b android-14.0.0_r11
repo sync -c --force-sync --no-clone-bundle --no-tags -j$(nproc --all)
#setup environment and build
source build/envsetup.sh &>/dev/null

export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH

lunch treble_arm64_bvN-userdebug
make -j$(nproc --all) installclean
make -j$(nproc --all) systemimage

Anyone?

I’m having the exactly same problem (either “android14-release” or “main” branch with Ubuntu 22.04 or 20.04). Oddly, the same build environment works perfectly fine if I use “android13-release”.

If you are able to build “android14-release” or “main”, please share your experience.

Hello I would like to share a solution I have found is:

Update ABI references using a script (create_reference_dumps.py) with the command: $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libcrypto

Example route:

python /home/android-14.0.0_r15/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libcrypto

Once the previous process has been executed and completed, I have successfully compiled Android 14 android-14.0.0_r15 again on Ubuntu 20.04.5-LTS

Details of my environment:

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=14
PRODUCT_INCLUDE_TAGS=com.android.mainline
TARGET_PRODUCT=aosp_lynx
TARGET_BUILD_VARIANT=userdebug
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-2a
TARGET_CPU_VARIANT=cortex-a55
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-165-generic-x86_64-Ubuntu-20.04.5-LTS
HOST_CROSS_OS=windows
BUILD_ID=UP1A.231105.003.A1
OUT_DIR=out
============================================

This solution has allowed me to compile AOSP 14 for example for a Google Pixel 7a(aosp_lynx) (which I have not tested yet)

Today I will try to compile a virtual device aosp_cf_x86_64_phone-userdebug (it will take several hours).

I hope it can help, if you need more information do not hesitate to contact me.

Screenshot

I faced same problem. I wanna build Pixel Experience Android 14.

I already tried the solution

$ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libcrypto

and

python3 development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libcrypto

But it’s failed.

I tried in Debian 12, Ubuntu 22.04 and 23.10, But I all failed.
And, I found that can’t install some packages of required to build custom roms on newer version.
I also tried it with AlmaLinux 9.2 but it’s useless.

I think we should use older version such as Debian 11, Ubuntu 18.04 or 20.04.

I will install Ubuntu 18.04 and try again.

I succeed. I followed the steps below in order

source build/envsetup.sh
lunch aosp_arm-userdebug
make idegen
python3 development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libcrypto
1 Like

Great! So, we found a solution . Just to make clear, did you change of OS, finally?