pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Header checking failures on LLVM-less machines
Date: Mon, 28 Jan 2019 19:51:22 -0500
Message-ID: <31363.1548723082@sss.pgh.pa.us> (raw)
In-Reply-To: <19808.1548692361@sss.pgh.pa.us>
References: <19808.1548692361@sss.pgh.pa.us>

I wrote:
> Since the LLVM stuff went in, src/tools/pginclude/cpluspluscheck
> fails on my main devel machine, because

Actually, it also fails on another machine that does have LLVM installed:

In file included from /tmp/cpluspluscheck.LqnoZj/test.cpp:3:
./src/include/jit/llvmjit_emit.h: In function 'LLVMOpaqueValue* l_ptr_const(void*, LLVMTypeRef)':
./src/include/jit/llvmjit_emit.h:22:32: error: 'TypeSizeT' was not declared in this scope
  LLVMValueRef c = LLVMConstInt(TypeSizeT, (uintptr_t) ptr, false);
                                ^~~~~~~~~
./src/include/jit/llvmjit_emit.h: In function 'LLVMOpaqueValue* l_sizet_const(size_t)':
./src/include/jit/llvmjit_emit.h:78:22: error: 'TypeSizeT' was not declared in this scope
  return LLVMConstInt(TypeSizeT, i, false);
                      ^~~~~~~~~
./src/include/jit/llvmjit_emit.h: In function 'LLVMOpaqueValue* l_sbool_const(bool)':
./src/include/jit/llvmjit_emit.h:87:22: error: 'TypeStorageBool' was not declared in this scope
  return LLVMConstInt(TypeStorageBool, (int) i, false);
                      ^~~~~~~~~~~~~~~
./src/include/jit/llvmjit_emit.h: In function 'LLVMOpaqueValue* l_pbool_const(bool)':
./src/include/jit/llvmjit_emit.h:96:22: error: 'TypeParamBool' was not declared in this scope
  return LLVMConstInt(TypeParamBool, (int) i, false);
                      ^~~~~~~~~~~~~
./src/include/jit/llvmjit_emit.h: In function 'LLVMOpaqueValue* l_mcxt_switch(LLVMModuleRef, LLVMBuilderRef, LLVMValueRef)':
./src/include/jit/llvmjit_emit.h:205:34: error: 'StructMemoryContextData' was not declared in this scope
   cur = LLVMAddGlobal(mod, l_ptr(StructMemoryContextData), cmc);
                                  ^~~~~~~~~~~~~~~~~~~~~~~
./src/include/jit/llvmjit_emit.h:205:34: note: suggested alternative: 'MemoryContextData'
   cur = LLVMAddGlobal(mod, l_ptr(StructMemoryContextData), cmc);
                                  ^~~~~~~~~~~~~~~~~~~~~~~
                                  MemoryContextData
./src/include/jit/llvmjit_emit.h: In function 'LLVMOpaqueValue* l_funcnullp(LLVMBuilderRef, LLVMValueRef, size_t)':
./src/include/jit/llvmjit_emit.h:223:9: error: 'FIELDNO_FUNCTIONCALLINFODATA_ARGS' was not declared in this scope
         FIELDNO_FUNCTIONCALLINFODATA_ARGS,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/include/jit/llvmjit_emit.h: In function 'LLVMOpaqueValue* l_funcvaluep(LLVMBuilderRef, LLVMValueRef, size_t)':
./src/include/jit/llvmjit_emit.h:241:9: error: 'FIELDNO_FUNCTIONCALLINFODATA_ARGS' was not declared in this scope
         FIELDNO_FUNCTIONCALLINFODATA_ARGS,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Evidently, llvmjit_emit.h doesn't meet the project standard that says
it should be includable standalone (to ensure that header inclusion
order isn't important in .c files).  It looks like it needs to #include
llvmjit.h and fmgr.h to satisfy these references.  Is there a good
reason why this wasn't done?

			regards, tom lane




view thread (6+ messages)  latest in thread

Message-ID: <31363.1548723082@sss.pgh.pa.us>
Permalink:  ../31363.1548723082@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/31363.1548723082@sss.pgh.pa.us

 · 

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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, pgsql-hackers@lists.postgresql.org
  Subject: Re: Header checking failures on LLVM-less machines
  In-Reply-To: <31363.1548723082@sss.pgh.pa.us>

* 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