Fix building jnidispatch with Android NDK 18+ using Clang/LLVM
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 20/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
调研方向
首先检查提议的 android-ndk-llvm 分支和提交,然后将其构建更改与当前的 jnidispatch 构建设置进行比较。使用受支持的 Android NDK 版本测试构建,包括 r27c,并确定从 GCC 到 Clang 的迁移是否适用于所讨论的所有目标。
由索引模型根据 Issue 内容生成。
描述
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).
- 主要语言
- Java
- 星标
- 8.9k
- 派生
- 1.7k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
java-native-access/jna 的其他 Issue
-
Incorrect mapping of c.s.j.platform.unix.solaris.LibKstat.KstatCtl可能已有人在做 @dbwiddis 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
java-native-access/jna#1740 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 66/100
java-native-access/jna#1738 ·
-
难度 4/5 3-5 天 新手友好度 45/100
java-native-access/jna#1736 ·
-
难度 3/5 1-2 天 新手友好度 65/100
java-native-access/jna#1717 ·
-
Windows32Exception - The parameter is incorrect可能已有人在做 @marktech0813 于 332 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
java-native-access/jna#1700 · 11 条评论 ·
查看 java-native-access/jna 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
Netcracker/qubership-integration-platform#1046 ·
维护者通常 2 天内回复
-
`check_java_version()` fails when Java path contains spaces (Windows / Git Bash, `C:\Program Files`)未关闭
难度 2/5 1-3 小时 新手友好度 68/100
-
Fix Math.ceilDiv wrong result for exact positive divisions可能已有人在做 @pamod-madubashana 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
scala-native/scala-native#5094 ·
维护者通常 1 天内回复
-
[Bug] AI unread message badge counts a batch of new bubbles as one message可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
apache/rocketmq-dashboard#5784 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
PCL-Community/PCL-CE#3658 ·
维护者通常 1 天内回复