Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

Discussion in 'Android' started by boba_speck, Oct 15, 2023.

  1. boba_speck

    boba_speck

    Joined:
    Oct 15, 2023
    Posts:
    2
    Hello everyone!

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

    Error message:

    Code (csharp):
    1. FAILED: out/soong/.intermediates/external/boringssl/libcrypto/android_vendor.34_arm64_armv8-a_shared/libcrypto.so.abidiff
    2. (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)
    3. ******************************************************
    4. 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
    5. ******************************************************
    6. error: Please update ABI references with: $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libcrypto
    7. [ 82% 149813/181515] //system/gatekeeper:libgatekeeper link libgatekeeper.so
    8. [ 82% 149814/181515] //system/memory/libion:libion link libion.so
    9. [ 82% 149815/181515] //frameworks/compile/libbcc/bcinfo:libbcinfo header-abi-linker libbcinfo.so.lsdump
    10. ninja: build stopped: subcommand failed.
    11. 09:21:42 ninja failed with: exit status 1
    Steps to reproduce:

    Platform: Debian 12 Bookworm

    Code (csharp):
    1. #Install build packages
    2. 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
    Code (csharp):
    1. #Add user to group plugdev
    2. sudo usermod -aG plugdev $LOGNAME
    Code (csharp):
    1. #sync repo
    2. repo init -u https://android.googlesource.com/platform/manifest -b android-14.0.0_r11
    3. repo sync -c --force-sync --no-clone-bundle --no-tags -j$(nproc --all)
    Code (csharp):
    1. #setup environment and build
    2. source build/envsetup.sh &>/dev/null
    3.  
    4. export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
    5. export PATH=$JAVA_HOME/bin:$PATH
    6.  
    7. lunch treble_arm64_bvN-userdebug
    8. make -j$(nproc --all) installclean
    9. make -j$(nproc --all) systemimage
    10.  
    11.  
     
  2. boba_speck

    boba_speck

    Joined:
    Oct 15, 2023
    Posts:
    2
    Anyone?
     
  3. solamour

    solamour

    Joined:
    Nov 16, 2023
    Posts:
    1
    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.
     
  4. Palinamarne

    Palinamarne

    Joined:
    Nov 17, 2023
    Posts:
    3
    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:
    Code (CSharp):
    1. $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libcrypto
    Example route:

    Code (CSharp):
    1. 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:

    Code (CSharp):
    1. ============================================
    2. PLATFORM_VERSION_CODENAME=REL
    3. PLATFORM_VERSION=14
    4. PRODUCT_INCLUDE_TAGS=com.android.mainline
    5. TARGET_PRODUCT=aosp_lynx
    6. TARGET_BUILD_VARIANT=userdebug
    7. TARGET_ARCH=arm64
    8. TARGET_ARCH_VARIANT=armv8-2a
    9. TARGET_CPU_VARIANT=cortex-a55
    10. TARGET_2ND_ARCH=arm
    11. TARGET_2ND_ARCH_VARIANT=armv8-a
    12. TARGET_2ND_CPU_VARIANT=generic
    13. HOST_OS=linux
    14. HOST_OS_EXTRA=Linux-5.4.0-165-generic-x86_64-Ubuntu-20.04.5-LTS
    15. HOST_CROSS_OS=windows
    16. BUILD_ID=UP1A.231105.003.A1
    17. OUT_DIR=out
    18. ============================================
    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.
     
  5. Palinamarne

    Palinamarne

    Joined:
    Nov 17, 2023
    Posts:
    3
    Screenshot
     

    Attached Files:

  6. evolution04a

    evolution04a

    Joined:
    Nov 18, 2023
    Posts:
    2
    I faced same problem. I wanna build Pixel Experience Android 14.

    I already tried the solution
    Code (CSharp):
    1. $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libcrypto
    and
    Code (CSharp):
    1. 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.
     
    Last edited: Nov 20, 2023
  7. evolution04a

    evolution04a

    Joined:
    Nov 18, 2023
    Posts:
    2
    I succeed. I followed the steps below in order
    Code (CSharp):
    1. source build/envsetup.sh
    2. lunch aosp_arm-userdebug
    3. make idegen
    4. python3 development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libcrypto
     
    Palinamarne likes this.
  8. Palinamarne

    Palinamarne

    Joined:
    Nov 17, 2023
    Posts:
    3
    Great! So, we found a solution . Just to make clear, did you change of OS, finally?