Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#1,926 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp, linux

Research direction

Start in app/src/app_common.cc at the Linux kCpuArchitecture branch and inspect how the value is used for library registration and the user-agent. Verify the existing ARM naming in the same file, then build the C++ SDK with aarch64 and 32-bit ARM Linux toolchains. Done means those targets no longer stop at the unknown-architecture error.

Written by the indexing model from the issue text.

Description

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).

Dominant language
C++
Stars
326
Forks
138
Avg merge
1d 22h
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/firebase-cpp-sdk

All issues in firebase/firebase-cpp-sdk

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.