-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Got libApplication.so
building my SwiftPM using --hash-style=both
to run on my old android 5.0 device with ndk 21 and failed
dlopen failed: could not load library "libswiftCore.so" needed by "/data/app/<app-id>/lib/arm64/libApplication.so"; caused by empty/missing DT_HASH in "libswiftCore.so" (built with --hash-style=gnu?)
Anyway successfully launched SwiftPM executable using --static-swift-stdlib
and linker setting --hash-style=both
through adb shell
.
(It was only missing stdin, stdout & stderr, that I easily replicated, and missing process_vm_readv & __register_atfork symbols that I defined as empty functions)
Why libraries for android versions 21, 22, 23 are included in your sdk and not supported?
Why do you use minimal version 24 if versions prior it only miss stdin, stdout & stderr?
(They were introduced in 23 and were back ported)
(Also stdout is even not working on android in application mode because logs could be made only through __android_log
symbols, so stdin, stdout & stderr are useless)
Is it possible to ask you to use -Wl,--hash-style=both
in runtime Swift shared libraries compilation for such crazy-heads like me wanted to use swift on ancient android?