Skip to content

Fix Linux build compatibility issues#63

Closed
blasphemetheus wants to merge 2 commits intoBrawlback-Team:masterfrom
blasphemetheus:fix/linux-cmake-compat-master
Closed

Fix Linux build compatibility issues#63
blasphemetheus wants to merge 2 commits intoBrawlback-Team:masterfrom
blasphemetheus:fix/linux-cmake-compat-master

Conversation

@blasphemetheus
Copy link

Fix Linux build compatibility

Fixes build failures on modern Linux distributions (tested: Manjaro, Qt 6.10, CMake 4.0, GCC 15).

Issues Fixed

File Issue Fix
CMakeLists.txt zlib linker error (undefined reference to deflateInit_) Use zlib pkg-config instead of zlib-ng for standard API
Externals/minizip-ng/CMakeLists.txt CMake configure fails (Unknown command check_function_exists) Add missing CMake module includes
Externals/discord-rpc/CMakeLists.txt CMake 4.x rejects version < 3.5 Update minimum to 3.5
Source/Core/DolphinQt/CMakeLists.txt Missing Qt private header Add Qt6::GuiPrivate dependency

Build

Note: -DUSE_SYSTEM_FMT=OFF is required on systems with fmt 12+. The fmt 12 release has breaking API changes (FMT_COMPILE_STRING → fmt::string_view conversion) that affect the Dolphin codebase. This is an upstream Dolphin issue, not Brawlback-specific. Using the bundled fmt 10.x is the intended solution.

cmake -DUSE_SYSTEM_FMT=OFF ..  # system fmt 12 has breaking changes
cmake --build . -j$(nproc)

Result

All targets build successfully:
- dolphin-emu (Qt GUI)
- dolphin-emu-nogui
- dolphin-tool

blasphemetheus and others added 2 commits January 5, 2026 13:17
- CMakeLists.txt: Use 'zlib' pkg-config instead of 'zlib-ng' to get
  standard zlib API (deflateInit_ etc.) instead of native zlib-ng API
  (zng_deflateInit_ etc.). The bundled zlib-ng uses ZLIB_COMPAT mode.

- Externals/minizip-ng/CMakeLists.txt: Add missing CMake includes for
  CheckFunctionExists and CheckIncludeFile modules.

- Externals/discord-rpc/CMakeLists.txt: Update cmake_minimum_required
  to 3.5 for CMake 4.x compatibility.

- Source/Core/DolphinQt/CMakeLists.txt: Add Qt6::GuiPrivate dependency
  for qpa/qplatformnativeinterface.h header access on Linux.

Tested on Manjaro Linux with Qt 6.10, CMake 4.0, GCC 15.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Qt6::GuiPrivate is needed for qpa/qplatformnativeinterface.h on Linux
but may not be available in all CI environments. Make it optional so
builds succeed where it's not installed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@blasphemetheus
Copy link
Author

The copilot explanation is:
The failing job (59505155561) fails due to the following error in the logs:

CMake Error at external/dav1d/CMakeLists.txt:97 (enable_language):
No CMAKE_ASM_NASM_COMPILER could be found.

This means the NASM assembler (Netwide Assembler) is missing. The build system needs it to compile assembly (ASM) sources for the vendored dav1d dependency.

Solution:
You must ensure NASM is installed in your build environment and available in the PATH before CMake is invoked. On Windows environments, NASM can be installed via Chocolatey:

choco install nasm

Or, download NASM from https://www.nasm.us/ and add its directory to your PATH.

GitHub Actions Workflow Fix:
If this is a Windows GitHub Actions runner, add a step before the CMake/build step in your .github/workflows/dolphin.yml:

- name: Install NASM
  run: choco install nasm -y

For Ubuntu/Linux runners:

- name: Install NASM
  run: sudo apt-get update && sudo apt-get install -y nasm

Summary:

  • Install NASM (Netwide Assembler) in your CI environment.
  • Ensure NASM is available in your system PATH before running CMake.

This will resolve the missing NASM compiler error blocking your build.

@blasphemetheus
Copy link
Author

sorry closing this (read dev-general)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant