Re: pgsql: Track LLVM 15 changes.

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Thomas Munro <tmunro(at)postgresql(dot)org>, pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Track LLVM 15 changes.
Date: 2022-04-17 03:50:19
Message-ID: CA+hUKGJAtazSx9oC+8ggTeQGMVVeQTq9Fp+1U-CRwuzsUZVORw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Wed, Feb 16, 2022 at 9:18 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> On Wed, Feb 16, 2022 at 7:34 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Although seawasp isn't actually failing at the moment, it's emitting
> > a boatload of deprecation warnings, eg
> >
> > In file included from llvmjit_deform.c:27:
> > ../../../../src/include/jit/llvmjit_emit.h:112:23: warning: 'LLVMBuildStructGEP' is deprecated: Use LLVMBuildStructGEP2 instead to support opaque pointers [-Wdeprecated-declarations]
> > LLVMValueRef v_ptr = LLVMBuildStructGEP(b, v, idx, "");
> > ^
> > /home/fabien/clgtk/include/llvm-c/Core.h:3908:1: note: 'LLVMBuildStructGEP' has been explicitly marked deprecated here
> > LLVM_ATTRIBUTE_C_DEPRECATED(
> > ^
> >
> > Is that on anyone's radar to clean up?
>
> Yeah I mentioned this problem in the other thread. I got as far as
> finding this write-up:
>
> https://llvm.org/docs/OpaquePointers.html
>
> I haven't yet tried to work out what we really need to do, but I'm
> planning to try. Possibly requires a bit more book keeping on our
> part, since eg LLVMGetElementType() is going away.

And now seaswap fails with an assertion about that. I'll try to have
a look this week. Just to be clear, this is an LLVM 15-to-be problem
so we have some time.

#3 0x00007f5eea78e006 in __GI___assert_fail (assertion=0x7f5edce1d730
"NumContainedTys && \\"Attempting to get element type of opaque
pointer\\"", file=0x7f5edce1d668
"/home/fabien/llvm-src/llvm/include/llvm/IR/Type.h", line=380,
function=0x7f5edce1d6d0 "llvm::Type*
llvm::Type::getNonOpaquePointerElementType() const") at assert.c:101
#4 0x00007f5edca8deae in llvm::Type::getNonOpaquePointerElementType
(this=0x561441f6eb40) at
/home/fabien/llvm-src/llvm/include/llvm/IR/Type.h:380
#5 0x00007f5edcb6e54f in LLVMGetElementType
(WrappedTy=0x561441f6eb40) at
/home/fabien/llvm-src/llvm/lib/IR/Core.cpp:801
#6 0x00007f5edf85ffe0 in llvm_pg_var_type () from
/home/fabien/pg/build-farm-14/buildroot/HEAD/pgsql.build/tmp_install/home/fabien/pg/build-farm-14/buildroot/HEAD/inst/lib/postgresql/llvmjit.so
#7 0x00007f5edf85f102 in llvm_create_context () from
/home/fabien/pg/build-farm-14/buildroot/HEAD/pgsql.build/tmp_install/home/fabien/pg/build-farm-14/buildroot/HEAD/inst/lib/postgresql/llvmjit.so
#8 0x00007f5edf86a3c9 in llvm_compile_expr () from
/home/fabien/pg/build-farm-14/buildroot/HEAD/pgsql.build/tmp_install/home/fabien/pg/build-farm-14/buildroot/HEAD/inst/lib/postgresql/llvmjit.so
#9 0x00005614404c24d4 in ExecBuildProjectionInfo ()
#10 0x00005614404deb92 in ExecAssignProjectionInfo ()
#11 0x0000561440505724 in ExecInitNestLoop ()
#12 0x00005614404d7851 in ExecInitNode ()
#13 0x0000561440508064 in ExecInitSort ()
#14 0x00005614404d78ab in ExecInitNode ()
#15 0x00005614404cfe92 in standard_ExecutorStart ()
#16 0x0000561440687846 in PortalStart ()
#17 0x0000561440686cbc in exec_simple_query ()
#18 0x000056144068491d in PostgresMain ()
#19 0x00005614405e24bb in BackendRun ()
#20 0x00005614405e1d1a in ServerLoop ()
#21 0x00005614405df217 in PostmasterMain ()
#22 0x000056144052dc0c in main ()

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2022-04-17 04:17:32 Re: pgsql: Add TAP test for archive_cleanup_command and recovery_end_comman
Previous Message Noah Misch 2022-04-17 00:47:11 pgsql: Add a temp-install prerequisite to src/interfaces/ecpg "checktcp