Re: BUG #17929: LLVMBuildGEP: symbol not found

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: nikmaurop(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17929: LLVMBuildGEP: symbol not found
Date: 2023-05-12 18:43:32
Message-ID: CA+hUKG+=pg9RrNbDGgSTg2OihHXVFnzjw0_a==LR021K2Ed38Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, May 13, 2023 at 12:15 AM PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 17929
> Logged by: Nikolas Mauropoulos
> Email address: nikmaurop(at)gmail(dot)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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nikolas Mauropoulos 2023-05-13 09:13:45 Re: BUG #17929: LLVMBuildGEP: symbol not found
Previous Message Tom Lane 2023-05-12 17:49:07 Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)