Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#1,926 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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 をビルドします。これらのターゲットが unknown-architecture エラーで停止しなくなれば完了です。

索引モデルが 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時間
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

firebase/firebase-cpp-sdk のほかの issue

firebase/firebase-cpp-sdk の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。