Bug 256167 - databases/postgresql13-server: Fix build with clang 12
Summary: databases/postgresql13-server: Fix build with clang 12
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: pgsql
Depends on:
Blocks: 255570
  Show dependency treegraph
Reported: 2021-05-26 11:43 UTC by Dimitry Andric
Modified: 2021-05-26 11:45 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (pgsql)

Bump highest LLVM version in ports to 12 (585 bytes, patch)
2021-05-26 11:43 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer 2021-05-26 11:43:01 UTC
Created attachment 225276 [details]
Bump highest LLVM version in ports to 12

During an exp-run for llvm 12 (see bug 255570), it turned out that cad/brlcad does not build with clang 12.0.0 [1], at least not on i386:

cd '/wrkdirs/usr/ports/databases/postgresql13-server/work/stage/usr/local/lib/postgresql/bitcode' && /usr/local/llvm11/bin/llvm-lto -thinlto -thinlto-action=thinlink -o postgres.index.bc postgres/access/brin/brin.bc postgres/access/brin/brin_inclusion.bc postgres/access/brin/brin_minmax.bc postgres/access/brin/brin_pageops.bc [...lots more bc files...]
LLVM ERROR: ThinLTO cannot create input file: Unknown attribute kind (97) (Producer: 'LLVM12.0.0' Reader: 'LLVM 11.0.1')
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.

Obviously this is a mixup between .bc files compiled with clang 12, and the /usr/local/llvm11/bin/llvm-lto which is 11.0.1.

It seems that the "Highest LLVM version in ports" mentioned in databases/postgresql13-server/Makefile is still at 11, so can we bump that to 12? Then this problem should go away.

[1] http://gohan04.nyi.freebsd.org/data/maini386PR255570-default/2021-05-23_20h12m16s/logs/errors/postgresql13-server-13.3.log
Comment 1 Dimitry Andric freebsd_committer 2021-05-26 11:45:44 UTC
Eh in the description, please substitute cad/brlcad with databases/postgresql13-server. :)  Note that the exp-run showed similar failures for the other databases/postgreslXX-server ports, but these are all handled similarly.