macOS support: portable ld64 symbol export + macOS CI - #6
Merged
Conversation
The driver restricted its exported symbols to the ODBC entry points with
two GNU-ld-specific flags: -Wl,--version-script and -Wl,-Bsymbolic.
ld64 (macOS) understands neither, so the shim could not link there.
Gate the link arguments on host_machine.system():
GNU ld (Linux, *BSD): unchanged - version script + -Bsymbolic.
ld64 (macOS): -exported_symbols_list with a new seerodbc.exp listing
"_SQL*" (Mach-O underscores C symbols). macOS links two-level
namespace by default, which already binds a *W wrapper's call to an
ANSI SQL* function to our own definition, so no -Bsymbolic equivalent
is required.
Linux behaviour is unchanged: the else branch is identical, the built
.so still exports only SQL* under the SEERODBC_1.0 version node, unit +
live integration (11g, ASan) stay at 40/0/11, and REUSE remains
compliant (seerodbc.exp carries an SPDX header ld64 treats as a comment).
This is the build-system half of macOS support; the transport/auth code
already uses only POSIX BSD sockets, no Linux-only idioms.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
The ld64 symbol-export path added in the previous commit (seerodbc.exp / -exported_symbols_list) can only be exercised on Apple's linker, so add a macos-latest job that builds the driver and runs the offline unit tests. No Oracle is involved - the live meson tests self-gate (exit 77) without SEER_TEST_*, so this leg is a pure build + protocol-core smoke. Homebrew's OpenSSL 3 is keg-only and the ODBC Driver Manager headers (sql.h) and libs live under the brew prefix, so PKG_CONFIG_PATH, CPPFLAGS and LDFLAGS are wired in from `brew --prefix`. This is the first real validation of macOS support; if the runner surfaces Homebrew path quirks, they will be fixed forward on this branch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings up macOS (Apple Silicon / ld64) support for the ODBC driver.
Background
The transport/auth code already uses only POSIX BSD sockets (no
MSG_NOSIGNAL,epoll,accept4, or other Linux-only idioms), so the only hard blocker was the linker: the shim restricted its exported symbols with-Wl,--version-script+-Wl,-Bsymbolic, both GNU-ld-specific and rejected by ld64.Commits
odbc: make the shim's symbol-export linking portable to macOS (ld64)host_machine.system().-Bsymbolic.seerodbc.exp(_SQL*) via-exported_symbols_list. macOS's default two-level namespace already binds a*Wwrapper's call to our own ANSISQL*definition, so no-Bsymbolicequivalent is needed.SQL*exported under theSEERODBC_1.0version node; unit + live 11g (ASan) stay 40/0/11; REUSE stays compliant.ci: add a macOS build + unit-test jobmacos-latestjob:brew installtoolchain, wire keg-only OpenSSL 3 + DM headers viaPKG_CONFIG_PATH/CPPFLAGS/LDFLAGS, then build + offline unit tests (live tests self-gate without Oracle).Note
I develop on Fedora with no Mac, so commit 1 is correct-by-construction and Linux-verified, but the macOS CI run on this PR is the first real ld64 build. If the runner surfaces Homebrew path quirks (keg-only OpenSSL, DM header/lib location), I'll fix them forward on this branch.
🤖 Generated with Claude Code