Skip to content

Add experimental OpenBSD support to Firebird 5 - #9261

Draft
Xissayah wants to merge 1 commit into
FirebirdSQL:v5.0-releasefrom
Xissayah:openbsd-portability-fixes
Draft

Xissayah wants to merge 1 commit into
FirebirdSQL:v5.0-releasefrom
Xissayah:openbsd-portability-fixes

Conversation

@Xissayah

Copy link
Copy Markdown

Summary

This draft introduces experimental OpenBSD support for the Firebird 5 GNU Make
build, targeting amd64 and i386. It uses a distinct OpenBSD platform configuration
instead of identifying the system as NetBSD.

Changes

  • Add OpenBSD platform detection, compiler settings and build configuration.
  • Implement interprocess synchronization using shared futex events and
    companion-file mutexes backed by the existing SharedFileInfo abstraction.
  • Adapt ICU loading to OpenBSD library naming while retaining version and
    symbol-ownership checks.
  • Handle the absence of CLOCK_MONOTONIC_RAW and reject unsupported direct-I/O
    requests. Forced-write behavior is not disabled.
  • Address CRC32C compilation and BSD socket-layout differences, and prevent
    generic architecture identifiers from enabling native-layout wire encoding.
  • Correct bundled library handling, libcds exports and public SDK headers.
  • Add IPC, module-loading and socket-layout tests, a native check script, and
    port documentation in doc/README.openbsd.md.

Existing OpenBSD installations

The author reports that Firebird 5 is running on two OpenBSD servers. Those
installations use an earlier, differently patched Firebird 5.0.3 build. They
provide operational experience, but do not establish that the implementation
in this PR has passed native build or runtime tests.

Validation

Local checks completed on Windows x64:

  • All four tests from SockAddrTest.cpp passed in a standalone Boost.Test
    executable: IPv6FamilyConversion, IPv4FamilyUnchanged,
    AuxiliaryPortLayouts, and TruncatedAuxiliaryPort.
  • Shell syntax checking of builds/posix/check-openbsd.sh passed.
  • The check script correctly rejected execution outside OpenBSD.
  • The modified MSBuild project and filters files parsed as XML.
  • git diff --check passed.

These checks do not constitute a full Firebird build. Native OpenBSD builds
and tests have not been completed for this patch. The new IPC implementation,
database operations, crash recovery and cross-platform networking still require
native validation. The Windows checks do not execute the OpenBSD-only tests.

Review notes

This is submitted as a draft for design review, not as a production-ready port.
Feedback is particularly welcome on:

  • Interprocess synchronization and recovery semantics.
  • Allocation of the OpenBSD database implementation identifier and the new
    diagnostic message number.
  • Whether independent build and SDK fixes should be split into separate PRs.

The current scope covers the GNU Make build. The top-level CMake build is not
covered. The native check script stages files under its disposable checkout;
it does not activate a service or replace an existing installation. This does
not provide CPU, memory or disk isolation from other workloads on the same host.

AI assistance

AI assistance was used to analyze the OpenBSD build failures and draft these
changes. The completed checks and remaining validation work are documented above.

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