Skip to content

Dynamically detect libgeos version instead of hardcoding#344

Merged
rail merged 1 commit intomasterfrom
rail/pr-wvroxkuyrnnk
Dec 9, 2025
Merged

Dynamically detect libgeos version instead of hardcoding#344
rail merged 1 commit intomasterfrom
rail/pr-wvroxkuyrnnk

Conversation

@rail
Copy link
Member

@rail rail commented Nov 23, 2025

  • Add detect_libgeos_name() method that inspects library dependencies:
    • macOS: uses otool -L to read dylib dependencies from source file
    • Linux: uses patchelf --print-needed to read .so dependencies after install
  • Remove all hardcoded version checks (23.2.0, 25.4.0) and version-specific
    libgeos library names (3.8.1, 3.11.2, 3.13.1)
  • Works with both versioned (libgeos.so.3.11.2) and unversioned (libgeos.so)
    library names on Linux
  • Regenerate all cockroach formulas with the updated template

@rail rail force-pushed the rail/pr-wvroxkuyrnnk branch 6 times, most recently from 51f2e70 to 1973560 Compare November 23, 2025 00:42
- Add detect_libgeos_name() method that inspects library dependencies:
  - macOS: uses otool -L to read dylib dependencies from source file
  - Linux: uses patchelf --print-needed to read .so dependencies after install
- Remove all hardcoded version checks (23.2.0, 25.4.0) and version-specific
  libgeos library names (3.8.1, 3.11.2, 3.13.1)
- Works with both versioned (libgeos.so.3.11.2) and unversioned (libgeos.so)
  library names on Linux
- Regenerate all cockroach formulas with the updated template
@rail rail force-pushed the rail/pr-wvroxkuyrnnk branch from 1973560 to 4604c78 Compare November 23, 2025 00:47
@rail rail changed the title Dynamic detection of libgeos version in CockroachDB Homebrew formulae Dynamically detect libgeos version instead of hardcoding Nov 23, 2025
@rail rail requested a review from rickystewart November 23, 2025 00:48
@rail rail requested a review from celiala December 9, 2025 15:57
Copy link
Contributor

@celiala celiala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -0,0 +1 @@
common --noenable_bzlmod
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Required for compatibility with Bazel 6.0+, the repo still uses the legacy WORKSPACE approach)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it so Basel doesn’t generate mod files

@rail rail merged commit c71559e into master Dec 9, 2025
22 checks passed
@rail rail deleted the rail/pr-wvroxkuyrnnk branch December 9, 2025 23:50
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.

2 participants