Skip to content

[openssl] build failure on Android x86 #24021

@AenBleidd

Description

@AenBleidd

Target Environment

  • OS: Android x86
  • Compiler: clang

Failure logs

configure:17890: checking whether libcurl is usable
configure:17923: i686-linux-android16-clang -o conftest --sysroot=/home/runner/work/boinc/boinc/3rdParty/android/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DANDROID -DDECLARE_TIMEZONE -Wall -I/home/runner/work/boinc/boinc/3rdParty/buildCache/android/android-tc/x86/i686-linux-android/include -O3 -fomit-frame-pointer -fPIE -D__ANDROID_API__=16 -Wall  -I/home/runner/work/boinc/boinc/3rdParty/android/vcpkg/installed/x86-android/include -I/home/runner/work/boinc/boinc/3rdParty/android/vcpkg/installed/x86-android/lib/pkgconfig/../../include -L/home/runner/work/boinc/boinc/3rdParty/android/vcpkg/installed/x86-android/lib -llog -fPIE -pie -latomic -static-libstdc++ -L/home/runner/work/boinc/boinc/3rdParty/android/vcpkg/installed/x86-android/lib conftest.c  -L/home/runner/work/boinc/boinc/3rdParty/android/vcpkg/installed/x86-android/lib/pkgconfig/../../lib -lcurl -lssl -lcrypto -ldl -pthread -lz >&5
clang: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
crypto/threads_pthread.c:219: error: undefined reference to '__atomic_is_lock_free'
crypto/threads_pthread.c:220: error: undefined reference to '__atomic_fetch_or_8'
crypto/threads_pthread.c:244: error: undefined reference to '__atomic_is_lock_free'
crypto/threads_pthread.c:245: error: undefined reference to '__atomic_load'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Additional context
This is looks like and issue of clang for Android x86, and could be fixed on openssl upstream only.
Reference: openssl/openssl#18059
As a workaround, if openssl/openssl#18056 merged, it will be possible to disable usage of these functions by defining BROKEN_CLANG_ATOMICS somewhere in port's cmake file.

Keeping this just for reference if anyone else faces the same issue.

I will provide a fix if I find some workaround or a quicker solution than waiting for upstream fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:community-tripletA PR or issue related to community triplets not officially validated by the vcpkg team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions