pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: rekgrpth@gmail.com
Subject: BUG #17927: Postgres does not compile with LLVM-16
Date: Wed, 10 May 2023 10:10:12 +0000
Message-ID: <17927-2d7146227560bdf3@postgresql.org> (raw)

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



view thread (2+ messages)  latest in thread

Message-ID: <17927-2d7146227560bdf3@postgresql.org>
Permalink:  ../17927-2d7146227560bdf3@postgresql.org/
Also on:    postgresql.org/message-id/17927-2d7146227560bdf3@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, rekgrpth@gmail.com
  Subject: Re: BUG #17927: Postgres does not compile with LLVM-16
  In-Reply-To: <17927-2d7146227560bdf3@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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