Skip to content

Conversation

@stevencowles
Copy link
Contributor

Summary

Complete the JIT compilation fix by bundling the full LLVM dependency chain.

Issue Found

Initial JIT fix (PR #10) bundled libLLVM.dylib but missed LLVM's own dependencies:

  • libz3.4.15.dylib (Z3 SMT solver)
  • libzstd.1.dylib (Zstandard compression)

This caused JIT to work for basic setup but fail when actually compiling complex queries.

Complete Fix

Enhanced bundle-deps Makefile target to:

  • ✅ Bundle LLVM library (libLLVM.dylib)
  • ✅ Bundle Z3 SMT solver library (libz3.4.15.dylib)
  • ✅ Bundle Zstandard library (libzstd.1.dylib)
  • ✅ Fix all hardcoded homebrew paths using install_name_tool
  • ✅ Update library IDs for portable loading

Testing

  • ✅ Enhanced JIT test suite validates complete compilation workflow
  • ✅ Tests complex queries that trigger actual JIT compilation
  • ✅ Verifies no missing library dependencies

Result

Full variant will have completely functional JIT compilation out of the box.

Fixes the remaining JIT issues discovered during v0.2.2 testing.

🤖 Generated with Claude Code

Extend JIT fix to bundle complete LLVM dependency chain:
- Bundle libLLVM.dylib (main LLVM library)
- Bundle libz3.4.15.dylib (Z3 SMT solver - LLVM dependency)
- Bundle libzstd.1.dylib (Zstandard compression - LLVM dependency)
- Fix all hardcoded homebrew paths using install_name_tool
- Update library IDs for portable @loader_path resolution

Add comprehensive JIT compilation tests:
- Test JIT parameter availability
- Test JIT enable/disable functionality
- Test actual JIT compilation with complex queries
- Validate complete JIT workflow end-to-end

This fixes the remaining JIT compilation issues where basic setup
worked but actual compilation failed due to missing transitive
dependencies.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@stevencowles stevencowles force-pushed the fix/complete-jit-dependencies branch from b8007f4 to e82832a Compare August 20, 2025 22:03
Resolves "Unsupported stack probing method" error on ARM64 by ensuring
PostgreSQL uses matching Clang and LLVM versions from Homebrew.

- Add CLANG environment variable pointing to Homebrew LLVM Clang
- Ensure LLVM_CONFIG and CLANG are from same installation
- Fixes version mismatch between system Clang and Homebrew LLVM
- Resolves ARM64-specific JIT compilation crashes

Based on research of LLVM issue #95804 and PostgreSQL build requirements.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@stevencowles stevencowles merged commit 22b1691 into main Aug 20, 2025
10 checks passed
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