Fix building jnidispatch with Android NDK 18+ using Clang/LLVM
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Ambito
- build-system, mobile-dev
Direzione di ricerca
Inizia esaminando il branch e il commit android-ndk-llvm proposti, quindi confronta le relative modifiche alla build con l’attuale configurazione di build di jnidispatch. Testa la build con le versioni supportate di Android NDK, inclusa r27c, e stabilisci se la transizione da GCC a Clang funziona per tutti i target discussi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
More of a place for discussion than an urgent need to be resolved, I have specifically not made a PR yet as this is nowhere near comprehensively tested. It would be very helpful if anyone with libffi experience in other projects knows about any tricks moving from gcc to clang.
Anyway, here is a branch with my proposed changes: https://github.com/BugsBeGone/jna/commits/android-ndk-llvm/
Actual commit, which may be out of date if branch is rebased to sync with master: https://github.com/BugsBeGone/jna/commit/2be472422f4ea1c479ef1322253b9a1ab7d356e0
Some initial observations:
-
ARMv5 and MIPS (32 & 64) targets were removed in NDK r17. In theory the Play Store still supports versions of Android that could be running on those architectures, so it is a bit soon to drop them entirely if the old toolchains do still work.
At the very least I would expect a major JNA version bump to indicate the removed targets(Edit: I guess those libs can always still be built with older NDKs, in which case no need for a breaking change by dropping support). -
Standalone toolchains are a mess for detecting the version. I cannot think of a way that does not involve the user manually setting either the NDK major version, or a
USE_CLANGdefine to work out which compiler suite to use. I would be in favour of officially not supporting the use of standalone toolchains, as you need approximately 1GB of extra disk space per target, so even testing it is a pain. -
More to the point, NDKs between r17 & r21 generally seem to be unstable, requiring unholy combinations of GCC/Binutils & Clang/LLVM to work at all. Since the existing build environment has never worked with anything after r15, because of the switch to unified headers, we probably do not need to worry too much so long as everyone is happy to jump from let's say r15 to r22.
I have mostly been testing with NDK r27c, since that was the latest LTS release (Edit: r27d is still the latest LTS, the only differences from r27c are a couple of macOS-specific fixes).
- Lingua principale
- Java
- Stelle
- 8.9k
- Fork
- 1.7k
- Merge medio
- 1g 13h
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di java-native-access/jna
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 66/100
java-native-access/jna#1738 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
java-native-access/jna#1736 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
java-native-access/jna#1717 ·
-
Windows32Exception - The parameter is incorrectForse già presa @marktech0813 l’ha presa 332 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
java-native-access/jna#1700 · 11 commenti ·
-
feature request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
java-native-access/jna#1698 · 1 commento ·
Tutte le issue di java-native-access/jna
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
sqlcipher/sqlcipher-android#97 · 1 commento ·
-
bug IIIF interoperability
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Netcracker/qubership-integration-platform#1046 ·
I maintainer di solito rispondono entro 2 giorni
-
`check_java_version()` fails when Java path contains spaces (Windows / Git Bash, `C:\Program Files`)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100