GitHub user tuhaihe added a comment to the discussion: source compile configure
--with-llvm
Hi @kongfanshen-0801 thanks for your reply.
When I built the Cloudberry using the command `make -j$(nproc) -C ~/cloudberry`
under the Rocky 8/9 + LLVM 11, some errors returned:
```
In file included from ../../../../src/include/postgres.h:46,
from llvmjit_expr.c:16:
llvmjit_expr.c: In function ‘llvm_compile_expr’:
llvmjit_expr.c:1841:86: error: initialization of ‘struct LLVMOpaqueValue *’
from incompatible pointer type ‘ExprEvalStep *’
[-Werror=incompatible-pointer-types]
1841 |
v_state, v_econtext, op);
|
^~
../../../../src/include/c.h:780:34: note: in definition of macro ‘lengthof’
780 | #define lengthof(array) (sizeof (array) / sizeof ((array)[0]))
| ^~~~~
llvmjit_expr.c:1840:33: note: in expansion of macro ‘build_EvalXFunc’
1840 | build_EvalXFunc(b, mod,
"ExecEvalScalarArrayOpFastInt",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:1841:86: note: (near initialization for ‘(anonymous)[0]’)
1841 |
v_state, v_econtext, op);
|
^~
../../../../src/include/c.h:780:34: note: in definition of macro ‘lengthof’
780 | #define lengthof(array) (sizeof (array) / sizeof ((array)[0]))
| ^~~~~
llvmjit_expr.c:1840:33: note: in expansion of macro ‘build_EvalXFunc’
1840 | build_EvalXFunc(b, mod,
"ExecEvalScalarArrayOpFastInt",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:1841:86: error: initialization of ‘struct LLVMOpaqueValue *’
from incompatible pointer type ‘ExprEvalStep *’
[-Werror=incompatible-pointer-types]
1841 |
v_state, v_econtext, op);
|
^~
../../../../src/include/c.h:780:52: note: in definition of macro ‘lengthof’
780 | #define lengthof(array) (sizeof (array) / sizeof ((array)[0]))
| ^~~~~
llvmjit_expr.c:1840:33: note: in expansion of macro ‘build_EvalXFunc’
1840 | build_EvalXFunc(b, mod,
"ExecEvalScalarArrayOpFastInt",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:1841:86: note: (near initialization for ‘(anonymous)[0]’)
1841 |
v_state, v_econtext, op);
|
^~
../../../../src/include/c.h:780:52: note: in definition of macro ‘lengthof’
780 | #define lengthof(array) (sizeof (array) / sizeof ((array)[0]))
| ^~~~~
llvmjit_expr.c:1840:33: note: in expansion of macro ‘build_EvalXFunc’
1840 | build_EvalXFunc(b, mod,
"ExecEvalScalarArrayOpFastInt",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:1841:86: error: initialization of ‘struct LLVMOpaqueValue *’
from incompatible pointer type ‘ExprEvalStep *’
[-Werror=incompatible-pointer-types]
1841 |
v_state, v_econtext, op);
|
^~
llvmjit_expr.c:71:62: note: in definition of macro ‘build_EvalXFunc’
71 |
((LLVMValueRef[]){__VA_ARGS__}))
| ^~~~~~~~~~~
llvmjit_expr.c:1841:86: note: (near initialization for ‘(anonymous)[0]’)
1841 |
v_state, v_econtext, op);
|
^~
llvmjit_expr.c:71:62: note: in definition of macro ‘build_EvalXFunc’
71 |
((LLVMValueRef[]){__VA_ARGS__}))
| ^~~~~~~~~~~
llvmjit_expr.c:1841:74: error: passing argument 5 of ‘build_EvalXFuncInt’ from
incompatible pointer type [-Werror=incompatible-pointer-types]
1841 |
v_state, v_econtext, op);
|
^~~~~~~~~~
|
|
|
LLVMValueRef {aka struct LLVMOpaqueValue *}
llvmjit_expr.c:69:55: note: in definition of macro ‘build_EvalXFunc’
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~
llvmjit_expr.c:63:90: note: expected ‘ExprEvalStep *’ but argument is of type
‘LLVMValueRef’ {aka ‘struct LLVMOpaqueValue *’}
63 |
ExprEvalStep *op,
|
~~~~~~~~~~~~~~^~
llvmjit_expr.c:1842:57: error: ‘i’ undeclared (first use in this function)
1842 | LLVMBuildBr(b, opblocks[i + 1]);
| ^
llvmjit_expr.c:1842:57: note: each undeclared identifier is reported only once
for each function it appears in
In file included from ../../../../src/include/postgres.h:46,
from llvmjit_expr.c:16:
llvmjit_expr.c:1847:86: error: initialization of ‘struct LLVMOpaqueValue *’
from incompatible pointer type ‘ExprEvalStep *’
[-Werror=incompatible-pointer-types]
1847 |
v_state, v_econtext, op);
|
^~
../../../../src/include/c.h:780:34: note: in definition of macro ‘lengthof’
780 | #define lengthof(array) (sizeof (array) / sizeof ((array)[0]))
| ^~~~~
llvmjit_expr.c:1846:33: note: in expansion of macro ‘build_EvalXFunc’
1846 | build_EvalXFunc(b, mod,
"ExecEvalScalarArrayOpFastStr",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:1847:86: note: (near initialization for ‘(anonymous)[0]’)
1847 |
v_state, v_econtext, op);
|
^~
../../../../src/include/c.h:780:34: note: in definition of macro ‘lengthof’
780 | #define lengthof(array) (sizeof (array) / sizeof ((array)[0]))
| ^~~~~
llvmjit_expr.c:1846:33: note: in expansion of macro ‘build_EvalXFunc’
1846 | build_EvalXFunc(b, mod,
"ExecEvalScalarArrayOpFastStr",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:1847:86: error: initialization of ‘struct LLVMOpaqueValue *’
from incompatible pointer type ‘ExprEvalStep *’
[-Werror=incompatible-pointer-types]
1847 |
v_state, v_econtext, op);
|
^~
../../../../src/include/c.h:780:52: note: in definition of macro ‘lengthof’
780 | #define lengthof(array) (sizeof (array) / sizeof ((array)[0]))
| ^~~~~
llvmjit_expr.c:1846:33: note: in expansion of macro ‘build_EvalXFunc’
1846 | build_EvalXFunc(b, mod,
"ExecEvalScalarArrayOpFastStr",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:1847:86: note: (near initialization for ‘(anonymous)[0]’)
1847 |
v_state, v_econtext, op);
|
^~
../../../../src/include/c.h:780:52: note: in definition of macro ‘lengthof’
780 | #define lengthof(array) (sizeof (array) / sizeof ((array)[0]))
| ^~~~~
llvmjit_expr.c:1846:33: note: in expansion of macro ‘build_EvalXFunc’
1846 | build_EvalXFunc(b, mod,
"ExecEvalScalarArrayOpFastStr",
| ^~~~~~~~~~~~~~~
llvmjit_expr.c:1847:86: error: initialization of ‘struct LLVMOpaqueValue *’
from incompatible pointer type ‘ExprEvalStep *’
[-Werror=incompatible-pointer-types]
1847 |
v_state, v_econtext, op);
|
^~
llvmjit_expr.c:71:62: note: in definition of macro ‘build_EvalXFunc’
71 |
((LLVMValueRef[]){__VA_ARGS__}))
| ^~~~~~~~~~~
llvmjit_expr.c:1847:86: note: (near initialization for ‘(anonymous)[0]’)
1847 |
v_state, v_econtext, op);
|
^~
llvmjit_expr.c:71:62: note: in definition of macro ‘build_EvalXFunc’
71 |
((LLVMValueRef[]){__VA_ARGS__}))
| ^~~~~~~~~~~
llvmjit_expr.c:1847:74: error: passing argument 5 of ‘build_EvalXFuncInt’ from
incompatible pointer type [-Werror=incompatible-pointer-types]
1847 |
v_state, v_econtext, op);
|
^~~~~~~~~~
|
|
|
LLVMValueRef {aka struct LLVMOpaqueValue *}
llvmjit_expr.c:69:55: note: in definition of macro ‘build_EvalXFunc’
69 | build_EvalXFuncInt(b, mod, funcname, v_state, op, \
| ^~
llvmjit_expr.c:63:90: note: expected ‘ExprEvalStep *’ but argument is of type
‘LLVMValueRef’ {aka ‘struct LLVMOpaqueValue *’}
63 |
ExprEvalStep *op,
|
~~~~~~~~~~~~~~^~
cc1: all warnings being treated as errors
make[2]: *** [<builtin>: llvmjit_expr.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/gpadmin/cloudberry/src/backend/jit/llvm'
make[1]: *** [Makefile:45: all-backend/jit/llvm-recurse] Error 2
make[1]: Leaving directory '/home/gpadmin/cloudberry/src'
make: *** [GNUmakefile:11: all-src-recurse] Error 2
make: Leaving directory '/home/gpadmin/cloudberry'
```
Could you help with this?
GitHub link:
https://github.com/apache/cloudberry/discussions/1362#discussioncomment-14473487
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]