Open licaon-kter opened 2 months ago
tried with NDK 25 locally and... it builds fine :shrug:
I've reenabled the build so it's retried in the next cycle: https://gitlab.com/fdroid/fdroiddata/-/commit/ba96949a3f28f23f6bb847aa2de1050a59d7b5c6
Not sure what is breaking because in the first log you attached the binaries are built just fine:
./bin/armeabi-v7a/bin/aria2c: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /system/bin/linker, with debug_info, not stripped
./bin/arm64-v8a/bin/aria2c: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /system/bin/linker64, with debug_info, not stripped
./bin/x86/bin/aria2c: ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /system/bin/linker, with debug_info, not stripped
./bin/x86_64/bin/aria2c: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /system/bin/linker64, with debug_info, not stripped
Done building aria2c binaries!
It builds but the apk is very large. https://monitor.f-droid.org/builds/log/com.gianlu.aria2app/230#site-footer
> Task :aria2lib:stripFossReleaseDebugSymbols
[CXX1104] NDK from ndk.dir at /opt/android-sdk/ndk/25.0.8775105 had version [25.0.8775105] which disagrees with android.ndkVersion [26.1.10909125]
[CXX1104] NDK from ndk.dir at /opt/android-sdk/ndk/25.0.8775105 had version [25.0.8775105] which disagrees with android.ndkVersion [26.1.10909125]
[CXX1104] NDK from ndk.dir at /opt/android-sdk/ndk/25.0.8775105 had version [25.0.8775105] which disagrees with android.ndkVersion [26.1.10909125]
[CXX1104] NDK from ndk.dir at /opt/android-sdk/ndk/25.0.8775105 had version [25.0.8775105] which disagrees with android.ndkVersion [26.1.10909125]
Unable to strip the following libraries, packaging them as they are: libaria2c.so.
ah, so I guess @devgianlu has NDK 26 (?) installed somewhere in the system, and that one does the stripping... but unknowingly
I tried to map the cases back in https://gitlab.com/fdroid/fdroidserver/-/issues/1207#note_1881935461
maybe I never tested to install ndk 26 via sdkmanager and keep ndk:
as 25
ah, so I guess @devgianlu has NDK 26 (?) installed somewhere in the system, and that one does the stripping... but unknowingly
The APKs for Google Play and FOSS are build with GH Actions: https://github.com/devgianlu/Aria2App/blob/master/.github/workflows/android.yml
Those prebuilt libs are used in the action. F-Droid builds them from source.
Yes, but the stripping should be done in that CI. The CI that built them does not strip: https://github.com/devgianlu/aria2-android/blob/master/.github/workflows/build.yml
The prebuilt libs are about 5MB while our builds are about 50MB... So maybe we should just build the libs with an old NDK?
Oh... I thought 5MB was already a lot, but it looks like they are indeed stripped:
Aria2App/aria2lib/src/main/jniLibs/arm64-v8a/libaria2c.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /system/bin/linker64, stripped
Aria2App/aria2lib/src/main/jniLibs/armeabi-v7a/libaria2c.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /system/bin/linker, stripped
Aria2App/aria2lib/src/main/jniLibs/x86/libaria2c.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /system/bin/linker, stripped
Aria2App/aria2lib/src/main/jniLibs/x86_64/libaria2c.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /system/bin/linker64, stripped
No idea where they have been stripped and not sure why your build is complaining about the NDK version which I haven't set anywhere explicitly.
I also can't find the ndk version. And it seems you don't have any ndk installed when building the apk.
The ndk version is from a default value of AGP. Can you set a valid value of ndkVersion
? It seems 25.2.9519653
is the newest ndk version that can still build the lib and an older version may produce smaller libs.
ref: https://monitor.f-droid.org/builds/log/com.gianlu.aria2app/230#site-footer
so I changed NDK to 26 but now it fails differently
what am I missing?
/LE: fyi https://gitlab.com/fdroid/fdroiddata/-/commit/ab6788e9070a318a2b80c2a963aa5bc5a8a83bc8