The ordering claim only holds for linkers that resolve archives in a single
pass; the NDK's lld picks libdl.a up either way. Reference rnpgp/rnp#2473 so
the sed can be dropped once it lands.
rnp builds a findopensslfeatures helper and runs it to enumerate the
OpenSSL features. When cross-compiling it links that helper statically so
it does not need the Android dynamic linker, but OpenSSL 1.1.1
libcrypto.a pulls in dso_dlfcn.o, which references the dl* API, and
CMake's FindOpenSSL does not add ${CMAKE_DL_LIBS} to the OpenSSL::Crypto
interface here. Nothing provides those symbols and build_librnp dies at
ld.lld: error: undefined symbol: dlopen
>>> referenced by dso_dlfcn.c
>>> dso_dlfcn.o:(dlfcn_load) in archive
>>> .../sysroot/usr/lib/libcrypto.a
CMake Error at cmake/Modules/FindOpenSSLFeatures.cmake:149 (message):
Error building findopensslfeatures
The NDK ships a static libdl.a defining dlopen/dlsym/dlclose/dlerror, so
link it explicitly. It is added as a linked library, not through
CMAKE_EXE_LINKER_FLAGS, because it must appear after libcrypto.a on the
link line for the static linker to resolve from it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
rnp merged the CMAKE_CROSSCOMPILING_EMULATOR support that this script adds
by hand (rnpgp/rnp 0a0672af, merged 2026-07-31), and LIBRNP_SOURCE_VERSION
tracks origin/main, so the sed patches now land on top of the upstream code:
the emulator is prepended to FOF twice and the OpenSSL feature probe runs
"qemu-aarch64 /usr/bin/qemu-aarch64 build/findopensslfeatures", which dies
with
CMake Error at cmake/Modules/FindOpenSSLFeatures.cmake:184 (message):
Error getting supported OpenSSL hashes: 255
qemu-aarch64: /usr/bin/qemu-aarch64: Invalid ELF image for this architecture
Guard the patch on the checkout not handling the emulator itself, so both
current main and an older pinned rnp still configure.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Make API level parameter and get rid of flavours so build take less time
and require less disk space, and builder can configure it at the API
level needed
Add Dockerfile to produce AAR
Attempt to use the generated doker images for gitlab.com CI
When apps that uses libretroshare are compied and proguard is run, Java
classes coming from libretroshare and that are used only by
libretroshare C++ code were errouneously stripped by proguard.
Bundle proper proguard rules in the AAR to avoid runtime errors such
as
java.lang.ClassNotFoundException: Didn't find class "org.retroshare.service.AssetHelper" on path: DexPathList[[zip file "/data/app/com.example.retroshare_aar
getline is not available on lesser API, build anyway but terminate at
runtime printing proper debug message if the function is used.
A better solution might be implemented in the future.
Improved CMake support
Initial work on packaging libretroshare as an Android library AAR
Deal properly with Android API level which miss largefile support
instead of relying on build system trickery