Conversation
Three fixes so ./scripts/test.sh works on macOS against a pgembed-bundled PostgreSQL whose pg_config has a stale -isysroot baked in after an Xcode upgrade, and where an older liblbug may already be installed system-wide: - Makefile: add PG_LDFLAGS = -L/lib. PGXS prepends PG_LDFLAGS to LDFLAGS, so the vendored liblbug (0.19.1) is searched before any system liblbug (e.g. an older 0.18.0 under /opt/homebrew/lib) that pg_config's LDFLAGS would otherwise link first, causing 'undefined symbol: _lbug_connection_get_pushed_sql'. - scripts/test_with_pgembed.py: forward CC and PG_SYSROOT from the environment onto the make command line (command-line make vars override PGXS' plain '=' assignments; plain env vars do not). This lets a builder pick homebrew clang and a valid SDK to repair the stale -isysroot. Also resolve the shared library suffix dynamically (.so on Linux, .dylib on macOS) instead of hardcoding pg_ladybug.so, and prepend the embedded PG's bin/ to PATH so psql is found. - .gitignore: add *.dylib (macOS build product).
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.
Three fixes so ./scripts/test.sh works on macOS against a pgembed-bundled PostgreSQL whose pg_config has a stale -isysroot baked in after an Xcode upgrade, and where an older liblbug may already be installed system-wide:
Makefile: add PG_LDFLAGS = -L/lib. PGXS prepends PG_LDFLAGS to LDFLAGS, so the vendored liblbug (0.19.1) is searched before any system liblbug (e.g. an older 0.18.0 under /opt/homebrew/lib) that pg_config's LDFLAGS would otherwise link first, causing 'undefined symbol: _lbug_connection_get_pushed_sql'.
scripts/test_with_pgembed.py: forward CC and PG_SYSROOT from the environment onto the make command line (command-line make vars override PGXS' plain '=' assignments; plain env vars do not). This lets a builder pick homebrew clang and a valid SDK to repair the stale -isysroot. Also resolve the shared library suffix dynamically (.so on Linux, .dylib on macOS) instead of hardcoding pg_ladybug.so, and prepend the embedded PG's bin/ to PATH so psql is found.
.gitignore: add *.dylib (macOS build product).