Re: Guiding principle for dropping LLVM versions?

From: Xing Guo <higuoxing(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Devrim Gündüz <devrim(at)gunduz(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Guiding principle for dropping LLVM versions?
Date: 2023-10-22 02:46:17
Message-ID: CACpMh+BmZ=DCwDbf0Cu6wmuVmoRjZ_ma48PzH0GeeVsujNoF=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Can we also check if the clang's version is compatible with llvm's version
in llvm.m4? I have multiple llvm toolchains installed on my system and I
have to specify the $CLANG and $LLVM_CONFIG variables each time I build the
server against a toolchain that is not present in $PATH. If one of the
variables is missing, the build system will pick up a default one whose
version might not be compatible with the other. E.g., If we use clang-16
and llvm-config-15, there will be issues when creating indexes for bitcodes
at the end of installation.

There will be errors look like

```
LLVM ERROR: ThinLTO cannot create input file: Unknown attribute kind (86)
(Producer: 'LLVM16.0.6' Reader: 'LLVM 15.0.7')
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/
and include the crash backtrace.
Stack dump:
0. Program arguments: /usr/lib/llvm15/bin/llvm-lto -thinlto
-thinlto-action=thinlink -o postgres.index.bc postgres/access/brin/brin.bc
postgres/access/brin/brin_bloom.bc postgres/acces
s/brin/brin_inclusion.bc postgres/access/brin/brin_minmax.bc
postgres/access/brin/brin_minmax_multi.bc
postgres/access/brin/brin_pageops.bc postgres/access/brin/brin_revmap.bc
postgres/acce
ss/brin/brin_tuple.bc postgres/access/brin/brin_validate.bc
postgres/access/brin/brin_xlog.bc postgres/access/common/attmap.bc
postgres/access/common/bufmask.bc postgres/access/common/detoa
st.bc postgres/access/common/heaptuple.bc
postgres/access/common/indextuple.bc postgres/access/common/printsimple.bc
postgres/access/common/printtup.bc postgres/access/common/relation.bc po
stgres/access/common/reloptions.bc postgres/access/common/scankey.bc
postgres/access/common/session.bc postgres/access/common/syncscan.bc
postgres/access/common/toast_compression.bc postgre
s/access/common/toast_internals.bc postgres/access/common/tupconvert.bc
postgres/access/common/tupdesc.bc postgres/access/gin/ginarrayproc.bc
postgres/access/gin/ginbtree.bc postgres/access
/gin/ginbulk.bc postgres/access/gin/gindatapage.bc
postgres/access/gin/ginentrypage.bc postgres/access/gin/ginfast.bc
postgres/access/gin/ginget.bc postgres/access/gin/gininsert.bc postgres
/access/gin/ginlogic.bc postgres/access/gin/ginpostinglist.bc
postgres/access/gin/ginscan.bc postgres/access/gin/ginutil.bc
postgres/access/gin/ginvacuum.bc postgres/access/gin/ginvalidate.
bc postgres/access/gin/ginxlog.bc postgres/access/gist/gist.bc
postgres/access/gist/gistbuild.bc postgres/access/gist/gistbuildbuffers.bc
postgres/access/gist/gistget.bc postgres/access/gis
t/gistproc.bc postgres/access/gist/gistscan.bc
postgres/access/gist/gistsplit.bc postgres/access/gist/gistutil.bc
postgres/access/gist/gistvacuum.bc postgres/access/gist/gistvalidate.bc pos
tgres/access/gist/gistxlog.bc postgres/access/hash/hash.bc
postgres/access/hash/hash_xlog.bc postgres/access/hash/hashfunc.bc
postgres/access/hash/hashinsert.bc postgres/access/hash/hashovf
l.bc postgres/access/hash/hashpage.bc postgres/access/hash/hashsearch.bc
postgres/access/hash/hashsort.bc postgres/access/hash/hashutil.bc
postgres/access/hash/hashvalidate.bc postgres/acce
ss/heap/heapam.bc postgres/access/heap/heapam_handler.bc
postgres/access/heap/heapam_visibility.bc postgres/access/heap/heaptoast.bc
postgres/access/heap/hio.bc postgres/access/heap/prunehe
```

If we can check the llvm-config versions and clang versions at the
configuration phase we can detect the problem earlier.

Best Regards,
Xing

On Sun, Oct 22, 2023 at 10:07 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
wrote:

> Rebased. I also noticed this woefully out of date line:
>
> - PGAC_PATH_PROGS(LLVM_CONFIG, llvm-config llvm-config-7
> llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9)
> + PGAC_PATH_PROGS(LLVM_CONFIG, llvm-config llvm-config-17
> llvm-config-16 llvm-config-15 llvm-config-14)
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message sirisha chamarthi 2023-10-22 07:50:39 Why is hot_standby_feedback off by default?
Previous Message Tatsuo Ishii 2023-10-22 02:39:20 Re: Row pattern recognition