Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[FR] Support desktop Linux on aarch64/arm (#error Unknown Linux architecture in app_common.cc)

未关闭 适合新手
#1,926 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 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 内容生成。

描述

new type: question
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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

firebase/firebase-cpp-sdk 的其他 Issue

查看 firebase/firebase-cpp-sdk 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。