pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #17927: Postgres does not compile with LLVM-16
2+ messages / 2 participants
[nested] [flat]
* BUG #17927: Postgres does not compile with LLVM-16
@ 2023-05-10 10:10 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2023-05-10 10:10 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: rekgrpth@gmail.com
The following bug has been logged on the website:
Bug reference: 17927
Logged by: RekGRpth
Email address: rekgrpth@gmail.com
PostgreSQL version: 15.2
Operating system: alpine in docker
Description:
cc1plus: warning: '-Werror=' argument
'-Werror=implicit-function-declaration' is not valid for C++
In file included from llvmjit.c:17:
../../../../src/include/jit/llvmjit_emit.h: In function
'l_load_struct_gep':
../../../../src/include/jit/llvmjit_emit.h:112:30: error: implicit
declaration of function 'LLVMBuildStructGEP'; did you mean
'LLVMBuildStructGEP2'? [-Werror=implicit-function-declaration]
112 | LLVMValueRef v_ptr = LLVMBuildStructGEP(b, v, idx, "");
| ^~~~~~~~~~~~~~~~~~
| LLVMBuildStructGEP2
../../../../src/include/jit/llvmjit_emit.h:112:30: warning: initialization
of 'LLVMValueRef' {aka 'struct LLVMOpaqueValue *'} from 'int' makes pointer
from integer without a cast [-Wint-conversion]
../../../../src/include/jit/llvmjit_emit.h:114:16: error: implicit
declaration of function 'LLVMBuildLoad'; did you mean 'LLVMBuildLoad2'?
[-Werror=implicit-function-declaration]
114 | return LLVMBuildLoad(b, v_ptr, name);
| ^~~~~~~~~~~~~
| LLVMBuildLoad2
../../../../src/include/jit/llvmjit_emit.h:114:16: warning: returning 'int'
from a function with return type 'LLVMValueRef' {aka 'struct LLVMOpaqueValue
*'} makes pointer from integer without a cast [-Wint-conversion]
114 | return LLVMBuildLoad(b, v_ptr, name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../src/include/jit/llvmjit_emit.h: In function 'l_load_gep1':
../../../../src/include/jit/llvmjit_emit.h:123:30: error: implicit
declaration of function 'LLVMBuildGEP'; did you mean 'LLVMBuildGEP2'?
[-Werror=implicit-function-declaration]
123 | LLVMValueRef v_ptr = LLVMBuildGEP(b, v, &idx, 1, "");
| ^~~~~~~~~~~~
| LLVMBuildGEP2
../../../../src/include/jit/llvmjit_emit.h:123:30: warning: initialization
of 'LLVMValueRef' {aka 'struct LLVMOpaqueValue *'} from 'int' makes pointer
from integer without a cast [-Wint-conversion]
../../../../src/include/jit/llvmjit_emit.h:125:16: warning: returning 'int'
from a function with return type 'LLVMValueRef' {aka 'struct LLVMOpaqueValue
*'} makes pointer from integer without a cast [-Wint-conversion]
125 | return LLVMBuildLoad(b, v_ptr, name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../src/include/jit/llvmjit_emit.h: In function 'l_mcxt_switch':
../../../../src/include/jit/llvmjit_emit.h:213:13: warning: assignment to
'LLVMValueRef' {aka 'struct LLVMOpaqueValue *'} from 'int' makes pointer
from integer without a cast [-Wint-conversion]
213 | ret = LLVMBuildLoad(b, cur, cmc);
| ^
g++ -Wall -Wpointer-arith -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv -fno-omit-frame-pointer
-Werror-implicit-function-declaration -std=c++17 -fPIC -D__STDC_LIMIT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -I/usr/lib/llvm16/include
-I../../../../src/include -D_GNU_SOURCE -I/usr/include/libxml2
-I/usr/local/include -c -o llvmjit_inline.o llvmjit_inline.cpp
cc1plus: warning: '-Werror=' argument
'-Werror=implicit-function-declaration' is not valid for C++
llvmjit.c: In function 'llvm_function_reference':
llvmjit.c:496:32: warning: returning 'int' from a function with return type
'LLVMValueRef' {aka 'struct LLVMOpaqueValue *'} makes pointer from integer
without a cast [-Wint-conversion]
496 | return LLVMBuildLoad(builder, v_fn, "");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvmjit.c:506:24: warning: returning 'int' from a function with return type
'LLVMValueRef' {aka 'struct LLVMOpaqueValue *'} makes pointer from integer
without a cast [-Wint-conversion]
506 | return LLVMBuildLoad(builder, v_fn, "");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [<builtin>: llvmjit.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory
'/var/lib/postgresql/src/postgres/src/backend/jit/llvm'
make: *** [Makefile:42: install-backend/jit/llvm-recurse] Error 2
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #17927: Postgres does not compile with LLVM-16
@ 2023-05-10 13:09 Daniel Gustafsson <daniel@yesql.se>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Gustafsson @ 2023-05-10 13:09 UTC (permalink / raw)
To: rekgrpth@gmail.com, pgsql-bugs <pgsql-bugs@lists.postgresql.org>
> On 10 May 2023, at 12:10, PG Bug reporting form <noreply@postgresql.org> wrote:
Thanks for your report!
> llvmjit.c:506:24: warning: returning 'int' from a function with return type
> 'LLVMValueRef' {aka 'struct LLVMOpaqueValue *'} makes pointer from integer
> without a cast [-Wint-conversion]
> 506 | return LLVMBuildLoad(builder, v_fn, "");
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is a known problem which is currently being worked on. LLVM 16 deprecated
typed pointers which the postgres JIT implementation is using, switching over
to opaque pointers is no simple task though.
--
Daniel Gustafsson
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-05-10 13:09 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-05-10 10:10 BUG #17927: Postgres does not compile with LLVM-16 PG Bug reporting form <noreply@postgresql.org>
2023-05-10 13:09 ` Daniel Gustafsson <daniel@yesql.se>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox