question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[package] openssl/1.1.1d: build fails on Android cross-build

See original GitHub issue

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: openssl/1.1.1d
  • Operating System+version: macOS Catalina 10.15.1
  • Compiler+version: NDK r20 clang (8?)
  • Conan version: Conan 1.20.5
  • Python version: Python 3.7.4

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

conanfile.txt
[requires]
cpprestsdk/2.10.14@bincrafters/stable

[generators]
cmake

[options]
cpprestsdk:exclude_websockets = True

profile
[settings]
os_build=Macos
arch_build=x86_64

compiler=clang
compiler.version=8
compiler.libcxx=libc++
os=Android
os.api_level=21
arch=armv7
build_type=Release

[build_requires]
android_ndk_installer/r20@bincrafters/stable

Steps to reproduce (Include if Applicable)

Install & cross build cpprestsdk with custom profile

Logs (Include/Attach if Applicable)

Click to expand log
${LDCMD:-/Users/dmn/.conan/data/android_ndk_installer/r20/bincrafters/stable/package/96a307d747235b0e7df54f0118d5acaed00b63c5/toolchains/llvm/prebuilt/darwin-x86_64/bin/x86_64-linux-android21-clang} -pthread -m64 -O3 --sysroot=/Users/dmn/.conan/data/android_ndk_installer/r20/bincrafters/stable/package/96a307d747235b0e7df54f0118d5acaed00b63c5/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -Wa,--noexecstack -Qunused-arguments -Wall -O3 -fPIC -L. -L/Users/dmn/.conan/data/zlib/1.2.11///package/3a891f9314bf3d09dca01a00a86e1fffd99aa8f1/lib -m64 --sysroot=/Users/dmn/.conan/data/android_ndk_installer/r20/bincrafters/stable/package/96a307d747235b0e7df54f0118d5acaed00b63c5/toolchains/llvm/prebuilt/darwin-x86_64/sysroot 
-o test/buildtest_c_txt_db test/buildtest_txt_db.o 
-lssl -lcrypto -ldl -pthread
./libcrypto.a(e_aes.o):e_aes.c:function aesni_init_key: error: undefined reference to 'aesni_set_decrypt_key'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_init_key: error: undefined reference to 'aesni_decrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_init_key: error: undefined reference to 'aesni_set_encrypt_key'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_init_key: error: undefined reference to 'aesni_encrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_init_key: error: undefined reference to 'aesni_cbc_encrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_init_key: error: undefined reference to 'aesni_ctr32_encrypt_blocks'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_cbc_cipher: error: undefined reference to 'aesni_cbc_encrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_ecb_cipher: error: undefined reference to 'aesni_ecb_encrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_gcm_init_key: error: undefined reference to 'aesni_set_encrypt_key'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_gcm_init_key: error: undefined reference to 'aesni_encrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_gcm_init_key: error: undefined reference to 'aesni_ctr32_encrypt_blocks'
./libcrypto.a(e_aes.o):e_aes.c:function aes_gcm_cipher: error: undefined reference to 'aesni_ctr32_encrypt_blocks'
./libcrypto.a(e_aes.o):e_aes.c:function aes_gcm_cipher: error: undefined reference to 'gcm_ghash_avx'
./libcrypto.a(e_aes.o):e_aes.c:function aes_gcm_cipher: error: undefined reference to 'aesni_ctr32_encrypt_blocks'
./libcrypto.a(e_aes.o):e_aes.c:function aes_gcm_cipher: error: undefined reference to 'gcm_ghash_avx'
./libcrypto.a(e_aes.o):e_aes.c:function aes_gcm_cipher: error: undefined reference to 'gcm_ghash_avx'
./libcrypto.a(e_aes.o):e_aes.c:function aes_gcm_cipher: error: undefined reference to 'gcm_ghash_avx'
./libcrypto.a(e_aes.o):e_aes.c:function aes_gcm_cipher: error: undefined reference to 'aesni_gcm_encrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aes_gcm_cipher: error: undefined reference to 'aesni_gcm_encrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aes_gcm_cipher: error: undefined reference to 'aesni_gcm_decrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aes_gcm_cipher: error: undefined reference to 'aesni_gcm_decrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_xts_init_key: error: undefined reference to 'aesni_set_encrypt_key'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_xts_init_key: error: undefined reference to 'aesni_xts_encrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_xts_init_key: error: undefined reference to 'aesni_encrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_xts_init_key: error: undefined reference to 'aesni_set_decrypt_key'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_xts_init_key: error: undefined reference to 'aesni_xts_decrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_xts_init_key: error: undefined reference to 'aesni_decrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_xts_init_key: error: undefined reference to 'aesni_set_encrypt_key'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_xts_init_key: error: undefined reference to 'aesni_encrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_ccm_init_key: error: undefined reference to 'aesni_ccm64_decrypt_blocks'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_ccm_init_key: error: undefined reference to 'aesni_ccm64_encrypt_blocks'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_ocb_init_key: error: undefined reference to 'aesni_set_decrypt_key'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_ocb_init_key: error: undefined reference to 'aesni_ocb_decrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_ocb_init_key: error: undefined reference to 'aesni_ocb_encrypt'
./libcrypto.a(e_aes.o):e_aes.c:function aesni_ocb_init_key: error: undefined reference to 'aesni_decrypt'

openssl/1.1.1d: ERROR: Package '6b3baf6aff1ab96f1b9e4482e1d9a0210ea8085c' build failed
openssl/1.1.1d: WARN: Build folder /Users/dmn/.conan/data/openssl/1.1.1d///build/6b3baf6aff1ab96f1b9e4482e1d9a0210ea8085c
ERROR: openssl/1.1.1d: Error in build() method, line 525


Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
SSE4commented, Jan 13, 2020

hi @dmn-star & @prsolucoes unfortunately, I wasn’t able to reproduce an issue locally. however, for me, it’s clear that we have to set asm_arch and perlasm_scheme to the correct values. it would be nice if you could try to test the following PR locally: https://github.com/conan-io/conan-center-index/pull/663 and report here if it helps you.

0reactions
n00b42commented, Oct 29, 2021

seems to have the same problem here. (NDK21, failing to build openssl/1.1.1d with undefined references to aes* Update: Using a local version of NDK failed, however using “[build_requires] android-ndk/r21e” succeeded…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compiling the latest OpenSSL for Android - Stack Overflow
Run build-all-arch.sh . All libraries ( *.so ) will be located in /prebuilt/ dir. P.S. I had a few more errors because ...
Read more >
Compile and install OpenSSL 1.1.1 for arm64 aarch64 android
make -j$(($(nproc)+1)). sudo make install. sudo echo 'LD_LIBRARY_PATH=/usr/local/ssl/lib:${LD_LIBRARY_PATH}' >> /etc/environment. rm openssl-1.1.1.tar.gz.
Read more >
Tutorial: Compile OpenSSL 1.1.1 for Android application
This article will provide instructions for building the latest OpenSSL library version 1.1.1c for Android devices. What do we need. In the ...
Read more >
Android - OpenSSLWiki
This document will provide instructions for building the OpenSSL library for Android devices. If you need the FIPS Validated Object Module ...
Read more >
How to install OpenSSL 1.1.1 and libSSL package?
You can also easily install openssl 1.1.1b package by running the commands below… ... Issue make test command to check for possible errors:....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found