BUG #16971: Incompatible datalayout errors with llvmjit - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #16971: Incompatible datalayout errors with llvmjit
Date
Msg-id 16971-5d004d34742a3d35@postgresql.org
Whole thread Raw
Responses Re: BUG #16971: Incompatible datalayout errors with llvmjit  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      16971
Logged by:          Tom Stellard
Email address:      tstellar@redhat.com
PostgreSQL version: 13.2
Operating system:   Fedora
Description:

In our Fedora builds, we are getting errors[1] in the postgresql tests due
to incompatible datalayouts between the JIT engine and the LLVM modules
being compiled.  The problem is that the JIT engine is being created with
host specific CPU and features, while the datalayout for the compiled module
is being taken from llvmjit_types.bc which is compiled without any specified
CPU type or features.

One way to fix this would be to add -march=native to the %.bc rules in
src/Makefile.global.in.  However, this will only work when the build system
and the run system are the same.

I think to fix this correctly, the llvmjit_types.bc file will need to be
compiled when the JIT engine is initialized at runtime, so that it can use
the same datalayout as the JIT engine.

[1] https://kojipkgs.fedoraproject.org//work/tasks/2182/66082182/build.log


pgsql-bugs by date:

Previous
From: Devrim Gündüz
Date:
Subject: Re: BUG #16970: pgrouting_11-3.1.3-1.rhel8.x86_64.rpm is not signed
Next
From: Stepan Yankevych
Date:
Subject: RE: BUG #16961: Could not access status of transaction