Wednesday, October 21, 2026

Firebird can now be built with CMake + Clang on Windows, Linux and macOS (PR #9111 merged)

Pull request #9111 "Build FirebirdSQL CMake+CLang" by Sergey Khalyutin was merged into the Firebird master branch on October 21, 2026. It makes it possible to build the whole Firebird project with CMake + Clang on Windows, Linux and macOS, for both amd64 and arm64.

What changed

  • One build system for all platforms – Firebird can now be built with CMake and Clang everywhere. The only exception is the ICU (icu4c) prebuild on Windows, which still uses MSBuild + MSVC.
  • Works as a project or a sub-project – Firebird can be built on its own or embedded as a CMake sub-project inside a larger build, which helps teams that maintain their own fork or derivative.
  • Bundled third-party libraries – a new extern/CMakeLists.txt and builds/cmake/BuildICU.cmake build the external dependencies (ICU, libtomcrypt, libcds and others) as part of the CMake build.
  • Ready-to-use distribution – the build produces a zipped distribution folder in ./distr.
  • CI on GitHub Actions – a new workflow, .github/workflows/cmake-multi-platform.yml, builds Firebird with CMake on several platforms.
  • Documentation – a new doc/README.build.cmake.md gives step-by-step build commands for Windows, Linux and macOS.

In total the PR touches 15 files, with about 1,466 lines added and 400 removed, mostly in CMakeLists.txt, src/CMakeLists.txt and the builds/cmake helper scripts.

How to build (Linux example)

SOURCE="path/to/firebirdSourceFolder"
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -G "Unix Makefiles" -S ${SOURCE} -B ${SOURCE}/build
cmake --build ${SOURCE}/build --config Debug --target all -j 8

Windows uses the same commands with the LLVM tools (clang.exe, clang++.exe, llvm-rc.exe), and macOS works with CMake installed from Homebrew. See doc/README.build.cmake.md for details.

Testing

The author reported successful builds with Clang and GCC on RHEL and Debian, and with Clang on Windows 11 and macOS. The GitHub Actions release build for the PR passed, and the bundled unit tests ran without errors. During review, maintainer Adriano dos Santos Fernandes hit duplicate-symbol link errors in libtomcrypt on a Linux machine, which the author could not reproduce – something to watch for if you try the new build in a tree that was previously built with the old make system.

Why it matters

The goal is to make Firebird easier to build by unifying the build process across platforms, and to lower the entry barrier for developers who want to contribute to – or maintain their own fork of – an industrial-strength open source SQL server. The authors plan to keep supporting and extending the CMake + Clang build.

No comments: