You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But src/misc/makeHeader.cpp was deleted in commit 45d5e3aa7a ("Refactor public include files (#205)"). The add_executable call was not removed, leaving a dangling reference to a non-existent source file.
On glibc systems (Debian, Fedora, AlmaLinux), CMake apparently tolerates this (the makeHeader target is behind if (NOT CMAKE_CROSSCOMPILING) and may never be evaluated). On musl libc (Alpine Linux), CMake validates source file existence at configure time and fails with:
CMake Error at src/CMakeLists.txt:997 (add_executable):
No SOURCES given to target: makeHeader
CMake Generate step failed. Build files cannot be regenerated correctly.
Reproduction
docker run --rm alpine:3.21 sh -c ' apk add --no-cache cmake ninja build-base git git clone --depth 1 --branch v5.0.4 https://github.com/FirebirdSQL/firebird.git /fbsrc mkdir -p /fbsrc/build && cd /fbsrc/build cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release'# Fails: No SOURCES given to target: makeHeader
Root Cause
Commit 45d5e3aa7a refactored public include file generation and deleted src/misc/makeHeader.cpp (83 lines removed) but did not remove the corresponding add_executable and set_output_directory calls in src/CMakeLists.txt:997-998.
The makeHeader binary was a helper that generated ibase.h from public headers (ibase.h, types_pub.h, consts_pub.h, etc.) by concatenating them. Post-refactor, ibase.h is generated or managed differently, making this target dead code.
Proposed Fix
Option A (minimal): Guard with file existence check:
if (NOTCMAKE_CROSSCOMPILING)
if (EXISTS${CMAKE_SOURCE_DIR}/src/misc/makeHeader.cpp)
add_executable (makeHeadermisc/makeHeader.cpp)
set_output_directory (makeHeader.CURRENT_DIR)
# ... rest of makeHeader block ... endif()
endif()
Option B (clean): Remove the entire makeHeader block (lines 997-1018) since the source file was deleted and the functionality was refactored away. The add_custom_command at line 1016 that calls makeHeader should also be removed.
Impact
Alpine Linux / musl libc: Cannot build Firebird client library from source
Downstream: Any distribution using musl libc cannot build Firebird from source
Environment
Firebird: v5.0.4 (latest stable, released 2026-04-17)
CMake: 3.31.1 (Alpine 3.21)
OS: Alpine Linux 3.21 (musl libc 1.2.5)
GCC: 14.2.0
Context
This was discovered during CI validation of php-firebird's Alpine APK packaging (packaging/apk/APKBUILD), which builds libfbclient from source for musl libc. The official FB5 client tarball is glibc-linked and cannot be used on Alpine without building from source.
The makeHeader target is behind if (NOT CMAKE_CROSSCOMPILING) — on glibc systems, CMake appears to skip evaluation of source existence for targets that are never built. On musl, CMake validates all add_executable calls at configure time regardless of whether the target will be built.
Problem
Firebird v5.0.4
src/CMakeLists.txt:997contains:But
src/misc/makeHeader.cppwas deleted in commit45d5e3aa7a("Refactor public include files (#205)"). Theadd_executablecall was not removed, leaving a dangling reference to a non-existent source file.On glibc systems (Debian, Fedora, AlmaLinux), CMake apparently tolerates this (the
makeHeadertarget is behindif (NOT CMAKE_CROSSCOMPILING)and may never be evaluated). On musl libc (Alpine Linux), CMake validates source file existence at configure time and fails with:Reproduction
Root Cause
Commit
45d5e3aa7arefactored public include file generation and deletedsrc/misc/makeHeader.cpp(83 lines removed) but did not remove the correspondingadd_executableandset_output_directorycalls insrc/CMakeLists.txt:997-998.The
makeHeaderbinary was a helper that generatedibase.hfrom public headers (ibase.h,types_pub.h,consts_pub.h, etc.) by concatenating them. Post-refactor,ibase.his generated or managed differently, making this target dead code.Proposed Fix
Option A (minimal): Guard with file existence check:
Option B (clean): Remove the entire
makeHeaderblock (lines 997-1018) since the source file was deleted and the functionality was refactored away. Theadd_custom_commandat line 1016 that callsmakeHeadershould also be removed.Impact
Environment
Context
This was discovered during CI validation of php-firebird's Alpine APK packaging (
packaging/apk/APKBUILD), which buildslibfbclientfrom source for musl libc. The official FB5 client tarball is glibc-linked and cannot be used on Alpine without building from source.The
makeHeadertarget is behindif (NOT CMAKE_CROSSCOMPILING)— on glibc systems, CMake appears to skip evaluation of source existence for targets that are never built. On musl, CMake validates alladd_executablecalls at configure time regardless of whether the target will be built.