cannot to compile master in llvm_resolve_symbols

Started by Pavel Stehuleabout 4 years ago3 messageshackers
Jump to latest
#1Pavel Stehule
pavel.stehule@gmail.com

Hi

Today I found new bug

-o llvmjit_wrap.o llvmjit_wrap.cpp -MMD -MP -MF .deps/llvmjit_wrap.Po
llvmjit.c: In function ‘llvm_resolve_symbols’:
llvmjit.c:1115:57: error: ‘LLVMJITCSymbolMapPair’ undeclared (first use in
this function); did you mean ‘LLVMOrcCSymbolMapPair’?
1115 | LLVMOrcCSymbolMapPairs symbols =
palloc0(sizeof(LLVMJITCSymbolMapPair) * LookupSetSize);
|
^~~~~~~~~~~~~~~~~~~~~
|
LLVMOrcCSymbolMapPair
llvmjit.c:1115:57: note: each undeclared identifier is reported only once
for each function it appears in
llvmjit.c: In function ‘llvm_create_jit_instance’:
llvmjit.c:1233:19: error: too few arguments to function
‘LLVMOrcCreateCustomCAPIDefinitionGenerator’
1233 | ref_gen =
LLVMOrcCreateCustomCAPIDefinitionGenerator(llvm_resolve_symbols, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from llvmjit.c:22:
/usr/include/llvm-c/Orc.h:997:31: note: declared here
997 | LLVMOrcDefinitionGeneratorRef
LLVMOrcCreateCustomCAPIDefinitionGenerator(
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I have fedora 37

Regards

Pavel

#2Thomas Munro
thomas.munro@gmail.com
In reply to: Pavel Stehule (#1)
Re: cannot to compile master in llvm_resolve_symbols

On Thu, Sep 22, 2022 at 10:43 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:

Today I found new bug

-o llvmjit_wrap.o llvmjit_wrap.cpp -MMD -MP -MF .deps/llvmjit_wrap.Po
llvmjit.c: In function ‘llvm_resolve_symbols’:
llvmjit.c:1115:57: error: ‘LLVMJITCSymbolMapPair’ undeclared (first use in this function); did you mean ‘LLVMOrcCSymbolMapPair’?
1115 | LLVMOrcCSymbolMapPairs symbols = palloc0(sizeof(LLVMJITCSymbolMapPair) * LookupSetSize);
| ^~~~~~~~~~~~~~~~~~~~~
| LLVMOrcCSymbolMapPair

Hi Pavel,

Some changes are needed for LLVM 15. I'm working on a patch, but it's
not quite ready yet. Use LLVM 14 for now. There are a few
superficial changes like that that are very easy to fix (that struct's
name changed), but the real problem is that in LLVM 15 you have to do
extra work to track the type of pointers and pass them into API calls
that we have a lot of. https://llvm.org/docs/OpaquePointers.html

#3Pavel Stehule
pavel.stehule@gmail.com
In reply to: Thomas Munro (#2)
Re: cannot to compile master in llvm_resolve_symbols

čt 22. 9. 2022 v 12:54 odesílatel Thomas Munro <thomas.munro@gmail.com>
napsal:

On Thu, Sep 22, 2022 at 10:43 PM Pavel Stehule <pavel.stehule@gmail.com>
wrote:

Today I found new bug

-o llvmjit_wrap.o llvmjit_wrap.cpp -MMD -MP -MF .deps/llvmjit_wrap.Po
llvmjit.c: In function ‘llvm_resolve_symbols’:
llvmjit.c:1115:57: error: ‘LLVMJITCSymbolMapPair’ undeclared (first use

in this function); did you mean ‘LLVMOrcCSymbolMapPair’?

1115 | LLVMOrcCSymbolMapPairs symbols =

palloc0(sizeof(LLVMJITCSymbolMapPair) * LookupSetSize);

|

^~~~~~~~~~~~~~~~~~~~~

|

LLVMOrcCSymbolMapPair

Hi Pavel,

Some changes are needed for LLVM 15. I'm working on a patch, but it's
not quite ready yet. Use LLVM 14 for now. There are a few
superficial changes like that that are very easy to fix (that struct's
name changed), but the real problem is that in LLVM 15 you have to do
extra work to track the type of pointers and pass them into API calls
that we have a lot of. https://llvm.org/docs/OpaquePointers.html

Thank you for info

Regards

Pavel