Re: BUG #17929: LLVMBuildGEP: symbol not found - Mailing list pgsql-bugs

From Thomas Munro
Subject Re: BUG #17929: LLVMBuildGEP: symbol not found
Date
Msg-id CA+hUKG+=pg9RrNbDGgSTg2OihHXVFnzjw0_a==LR021K2Ed38Q@mail.gmail.com
Whole thread Raw
In response to BUG #17929: LLVMBuildGEP: symbol not found  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #17929: LLVMBuildGEP: symbol not found  (Nikolas Mauropoulos <nikmaurop@gmail.com>)
List pgsql-bugs
On Sat, May 13, 2023 at 12:15 AM PG Bug reporting form
<noreply@postgresql.org> wrote:
> The following bug has been logged on the website:
>
> Bug reference:      17929
> Logged by:          Nikolas Mauropoulos
> Email address:      nikmaurop@gmail.com
> PostgreSQL version: 12.15
> Operating system:   Alpine (container)
> Description:
>
> After our container updated to 12.15-alpine there's an error
> 2023-05-12 05:35:40.212 GMT [58509] STATEMENT:  select item_id from
> flatitemsversions_view where parent_item_id = $1
> 2023-05-12 05:35:40.212 GMT [58494] ERROR:  could not load library
> "/usr/local/lib/postgresql/llvmjit.so": Error relocating
> /usr/local/lib/postgresql/llvmjit.so: LLVMBuildGEP: symbol not found
>
> this is not present on 12.14-bullseye

I am not familiar with Alpine or any of the packaging and versioning
details over there, but I guess this is a basic version mismatch where
you're somehow using LLVM 16 libraries with a version of PostgreSQL
built for LLVM 15 or earlier.  I'm working on updating PostgreSQL to
work with LLVM 16 at present (and starting to get close to sharing a
patch on the -hackers list) where we switch over to using
LLVMBuildGEP2 and other new C API changes with '2' bolted onto the
name, where you have to supply more type information when building IR,
but that'll only work for you if your PostgreSQL was actually built
against LLVM 16, so I think your problem is basic version mismatch.
You could simply turn jit off to avoid the error.



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
Next
From: Nikolas Mauropoulos
Date:
Subject: Re: BUG #17929: LLVMBuildGEP: symbol not found