Summary: | databases/postgresql14-server: Fails to build with LLVM 14 (ports and base): multiple errors | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Dimitry Andric <dim> | ||||
Component: | Individual Port(s) | Assignee: | Palle Girgensohn <girgen> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | andrew, brooks, girgen, pgsql, tmunro | ||||
Priority: | --- | Keywords: | needs-patch, needs-qa | ||||
Version: | Latest | Flags: | koobs:
merge-quarterly?
|
||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 261742 | ||||||
Attachments: |
|
Description
Dimitry Andric
2022-02-15 20:43:14 UTC
Thanks for the report Dim. Note that build fixes are: Approved by: portmgr (blanket: build fix) MFH: <branch|No> (reason) And don't require maintainer approval If you'd like additional review (always good), throw up a diff so we can unblock quickly Is this what you're suggesting? diff --git a/databases/postgresql14-server/Makefile b/databases/postgresql14-server/Makefile index c55a077634ac..c8d97cafd294 100644 --- a/databases/postgresql14-server/Makefile +++ b/databases/postgresql14-server/Makefile @@ -266,15 +266,26 @@ LLVM_PORT_SUFFIX= ${COMPILER_VERSION:C/.$//} .if ${COMPILER_VERSION} > ${LLVM_DEFAULT_VERSION} # LLVM versions in ports are, in order, 70, 80 90, 10, 11, 12... where 10 > 90. [sic] . if ${LLVM_PORT_SUFFIX} < 70 +# PR 261976 postgresql fails to build with LLVM 14 +. if ${LLVM_PORT_SUFFIX} > 13 +PG_LLVM_VERSION=13 +PG_COMPILER_VERSION=13 +. else PG_LLVM_VERSION=${LLVM_PORT_SUFFIX} PG_COMPILER_VERSION=${LLVM_PORT_SUFFIX} +. endif . else PG_LLVM_VERSION=11 PG_COMPILER_VERSION=11 . endif .else +. if ${LLVM_PORT_SUFFIX} > 13 +PG_LLVM_VERSION=13 +PG_COMPILER_VERSION=13 +. else PG_LLVM_VERSION=${LLVM_DEFAULT} PG_COMPILER_VERSION=${LLVM_PORT_SUFFIX} +. endif .endif .if ${DISTVERSION:C/([0-9]*).*/\1/} >= 11 Created attachment 231847 [details]
postgres-261976.diff
@dim see suggested patch, is this what you are suggesting? (In reply to Palle Girgensohn from comment #4) Yes, this works for me here on the llvm-14-update branch (where base llvm is 14.0.0): ===> Applying FreeBSD patches for postgresql14-server-14.2 from /share/dim/ports/databases/postgresql14-server/files ===> postgresql14-server-14.2 depends on package: gmake>=4.3 - found ===> postgresql14-server-14.2 depends on package: pkgconf>=1.3.0_1 - found ===> postgresql14-server-14.2 depends on package: llvm13>0 - found ===> postgresql14-server-14.2 depends on executable: llvm-config13 - found ===> postgresql14-server-14.2 depends on executable: gcc11 - found ... gmake[1]: Leaving directory '/wrkdirs/share/dim/ports/databases/postgresql14-server/work/postgresql-14.2/src/backend/jit/llvm' ====> Compressing man pages (compress-man) ===> Staging rc.d startup script(s) Command exit status: 0 Thanks! Ping, please commit the fix. :) A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=dbafe427a49b7feef6049e10e3398a0681c8ccd5 commit dbafe427a49b7feef6049e10e3398a0681c8ccd5 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-03-16 18:28:57 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-03-16 18:28:57 +0000 databases/postgresql14-server: Avoid using llvm14 When the base system compiler is clang 14, the postgresql ports attempt to build against the devel/llvm14 port. This will fail with several compile errors as there are a few incompatible changes in the LLVM 14 C and C++ APIs. Until upstream postgresql adapts to these changes, limit the PG_LLVM_VERSION to a maximum of 13. PR: 261976 Approved by: maintainer timeout (2 weeks) MFH: 2022Q1 databases/postgresql14-server/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) |