Обсуждение: Where are we on supporting LLVM's opaque-pointer changes?

Поиск
Список
Период
Сортировка

Where are we on supporting LLVM's opaque-pointer changes?

От
Tom Lane
Дата:
LLVM 16 is apparently released, because Fedora has started using
it in their rawhide (development) branch, which means Postgres
is failing to build there [1][2]:

../../../../src/include/jit/llvmjit_emit.h: In function 'l_load_gep1':
../../../../src/include/jit/llvmjit_emit.h:123:30: warning: implicit declaration of function 'LLVMBuildGEP'; did you
mean'LLVMBuildGEP2'? [-Wimplicit-function-declaration] 
  123 |         LLVMValueRef v_ptr = LLVMBuildGEP(b, v, &idx, 1, "");
      |                              ^~~~~~~~~~~~
      |                              LLVMBuildGEP2
... etc etc etc ...
leading to lots of
+ERROR:  could not load library "/builddir/build/BUILD/postgresql-15.1/tmp_install/usr/lib64/pgsql/llvmjit.so":
/builddir/build/BUILD/postgresql-15.1/tmp_install/usr/lib64/pgsql/llvmjit.so:undefined symbol: LLVMBuildGEP 

I know we've been letting this topic slide, but we are out of runway.
I propose adding this as a must-fix open item for PG 16.

            regards, tom lane

[1] https://bugzilla.redhat.com/show_bug.cgi?id=2186381
[2] https://kojipkgs.fedoraproject.org/work/tasks/8408/99938408/build.log



Re: Where are we on supporting LLVM's opaque-pointer changes?

От
Thomas Munro
Дата:
On Sat, Apr 15, 2023 at 2:31 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I know we've been letting this topic slide, but we are out of runway.
> I propose adding this as a must-fix open item for PG 16.

I had a patch that solved many of the problems[1], but it isn't all
the way there and I got stuck.  I am going to look at it together with
Andres in the next couple of days, get unstuck, and aim to get a patch
out this week.  More soon.

[1] https://github.com/macdice/postgres/tree/llvm15