You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Builds RPM JIT bitcode with the LLVM the PostgreSQL server was built with - #84
The published pgEdge PostgreSQL servers are built with LLVM 21, so their pgxs points at /usr/lib64/llvm21/bin. AlmaLinux 9.9 / 10.3 moved the default llvm/clang to 22, so EL RPM builds no longer have the LLVM 21 tools and the bitcode install step fails:
/usr/lib64/llvm21/bin/llvm-lto: No such file or directory
make: *** [.../pgxs.mk:242: install] Error 127
(clang 22 bitcode would not be readable by llvm-lto 21 anyway.) The last releases of this repo succeeded only because they ran before that switch; the next release tag would fail on EL.
Fix
Ports align_pg_llvm_toolchain() from pgedge-enterprise-packages into pkg/scripts/common-functions.sh. setup_dnf_build_env now installs pgedge-postgresqlNN-devel, reads the server's LLVM_BINPATH, installs llvmNN/clangNN (EPEL) if missing, and sets CLANG through MAKEFLAGS so the bitcode is built and linked by the server's LLVM.
Testing
Local RPM build of 1.1 against the staging repo:
almalinux:9 arm64, PG16: build OK, llvmjit package built, all 2 bitcode files readable by LLVM 21
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer TIP This summary will be updated as you push new changes.
No actionable comments were generated in the recent review.
Walkthrough
The change adds align_pg_llvm_toolchain() to check for PostgreSQL’s LLVM tools and set CLANG through MAKEFLAGS. RPM setup calls the function after installing the PostgreSQL development package when the specified version and RPM spec conditions match.
Merge Risk: Minimal · up to 366b2
RPM builds now use the LLVM tools that match the installed PostgreSQL server for JIT bitcode. This avoids failures when the distribution default LLVM is newer than the server's. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: RPM JIT bitcode is built with the LLVM version the PostgreSQL server was built with. The changeset adds align_pg_llvm_toolchain() to pkg/scripts/common-functions.sh, w…
Description check
The description states the problem (EL RPM builds fail because the default LLVM moved to 22 while the published PostgreSQL servers use LLVM 21) and the fix (porting align_pg_llvm_toolchain() and updat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: RPM JIT bitcode is built with the LLVM version the PostgreSQL server was built with. The changeset adds align_pg_llvm_toolchain() to pkg/scripts/common-functions.sh, which reads LLVM_BINPATH from Makefile.global, installs matching llvmNN/clangNN, and sets CLANG through MAKEFLAGS during RPM build setup. The title is specific and matches the objectives.
Full details: Description check
Explanation
The description states the problem (EL RPM builds fail because the default LLVM moved to 22 while the published PostgreSQL servers use LLVM 21) and the fix (porting align_pg_llvm_toolchain() and updating setup_dnf_build_env to install pgedge-postgresqlNN-devel, read LLVM_BINPATH, install matching llvm/clang, and set CLANG via MAKEFLAGS). It also gives a local test result. This is related to the changeset.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between d66225f and 366b2ab.
Files selected for processing: 1
pkg/scripts/common-functions.sh
Included review availability: This review used your included allowance. 5 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour.
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
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.
Same fix as pgEdge/spock#734.
Problem
The published pgEdge PostgreSQL servers are built with LLVM 21, so their pgxs points at
/usr/lib64/llvm21/bin. AlmaLinux 9.9 / 10.3 moved the default llvm/clang to 22, so EL RPM builds no longer have the LLVM 21 tools and the bitcode install step fails:(clang 22 bitcode would not be readable by
llvm-lto21 anyway.) The last releases of this repo succeeded only because they ran before that switch; the next release tag would fail on EL.Fix
Ports
align_pg_llvm_toolchain()from pgedge-enterprise-packages intopkg/scripts/common-functions.sh.setup_dnf_build_envnow installspgedge-postgresqlNN-devel, reads the server'sLLVM_BINPATH, installsllvmNN/clangNN(EPEL) if missing, and setsCLANGthroughMAKEFLAGSso the bitcode is built and linked by the server's LLVM.Testing
Local RPM build of 1.1 against the staging repo: