[FR] Support desktop Linux on aarch64/arm (#error Unknown Linux architecture in app_common.cc)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 85/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- cpp, linux
调研方向
从 app/src/app_common.cc 中的 Linux kCpuArchitecture 分支开始,检查该值如何用于库注册和 user-agent。验证同一文件中现有的 ARM 命名,然后使用 aarch64 和 32 位 ARM Linux toolchain 构建 C++ SDK。当这些目标不再因未知架构错误而停止时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Feature proposal
- Firebase Component: Core (App)
Support desktop Linux on aarch64 and 32-bit ARM.
Use case: we run the C++ SDK (Auth, Realtime Database, Remote Config) on an embedded aarch64 Linux board, cross-compiled from x86_64 with a Buildroot GCC toolchain. The SDK builds and runs there with one change. Without it, the build stops in app/src/app_common.cc (v12.8.0, unchanged on main), because the Linux branch that defines kCpuArchitecture only knows x86 and x86_64:
#if __amd64__
const char* kCpuArchitecture = "x86_64";
#elif __i386__
const char* kCpuArchitecture = "x86";
#else
#error Unknown Linux architecture.
#endif // Architecture
The value is only used for the fire-cpp-arch library registration (the user-agent), and the other platforms in the same file already name ARM ("arm64", "arm32"). So ARM Linux is blocked by this one #error, not by anything that depends on the architecture.
Proposed change, matching those names:
#if __amd64__
const char* kCpuArchitecture = "x86_64";
#elif __i386__
const char* kCpuArchitecture = "x86";
#elif __aarch64__
const char* kCpuArchitecture = "arm64";
#elif __arm__
const char* kCpuArchitecture = "arm32";
#else
#error Unknown Linux architecture.
#endif // Architecture
With this change, Auth, Realtime Database and Remote Config build and run on aarch64 Linux for us. Happy to open a PR.
Related: #1508 (Linux cross-compilation / Yocto support).
- 主要语言
- C++
- 星标
- 326
- 派生
- 138
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 6
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/firebase-cpp-sdk 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
firebase/firebase-cpp-sdk#1905 · 2 条评论 ·
维护者通常 1 天内回复
-
api: firestore
难度 5/5 一周以上 新手友好度 35/100
firebase/firebase-cpp-sdk#1920 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 70/100
firebase/firebase-cpp-sdk#1904 · 1 条评论 ·
维护者通常 1 天内回复
-
new type: question
难度 4/5 3-5 天 新手友好度 45/100
firebase/firebase-cpp-sdk#1892 · 1 条评论 ·
维护者通常 1 天内回复
-
nightly-testing
难度 4/5 3-5 天 新手友好度 25/100
firebase/firebase-cpp-sdk#1859 ·
维护者通常 1 天内回复
查看 firebase/firebase-cpp-sdk 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
-
category:port-update
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 88/100
tensorflow/tflite-micro#3784 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复