Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译error #76

Open
Hylijia opened this issue Nov 11, 2021 · 4 comments
Open

编译error #76

Hylijia opened this issue Nov 11, 2021 · 4 comments

Comments

@Hylijia
Copy link

Hylijia commented Nov 11, 2021

在CENTOS8上编译的时候报这个error

[root@localhost clickhouse_fdw-1.2.1]# mkdir build
[root@localhost clickhouse_fdw-1.2.1]# cd build/
[root@localhost build]# ls
[root@localhost build]# cmake ..
-- The C compiler identification is GNU 8.4.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Setting clickhouse_fdw build type -
-- The CXX compiler identification is GNU 8.4.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.4.2")
-- Checking for module 'libcurl'
-- Found libcurl, version 7.61.1
-- Checking for module 'uuid'
-- Found uuid, version 2.32.1
-- Configuring done
-- Generating done
-- Build files have been written to: /thunisoft/clickhouse_fdw-1.2.1/build
[root@localhost build]# make
Scanning dependencies of target clickhouse_fdw_sql
[ 1%] Generating ../clickhouse_fdw--1.2.sql
[ 1%] Built target clickhouse_fdw_sql
Scanning dependencies of target lz4-lib
[ 2%] Building C object src/clickhouse-cpp/contrib/lz4/CMakeFiles/lz4-lib.dir/lz4.c.o
[ 4%] Building C object src/clickhouse-cpp/contrib/lz4/CMakeFiles/lz4-lib.dir/lz4hc.c.o
[ 5%] Linking C static library liblz4-lib.a
[ 5%] Built target lz4-lib
Scanning dependencies of target cityhash-lib
[ 7%] Building CXX object src/clickhouse-cpp/contrib/cityhash/CMakeFiles/cityhash-lib.dir/city.cc.o
[ 8%] Linking CXX static library libcityhash-lib.a
[ 8%] Built target cityhash-lib
Scanning dependencies of target clickhouse-cpp-lib-static
[ 10%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/base/coded.cpp.o
[ 11%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/base/compressed.cpp.o
[ 12%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/base/input.cpp.o
[ 14%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/base/output.cpp.o
[ 15%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/base/platform.cpp.o
[ 17%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/base/socket.cpp.o
[ 18%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/columns/array.cpp.o
[ 20%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/columns/date.cpp.o
[ 21%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/columns/decimal.cpp.o
[ 22%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/columns/enum.cpp.o
[ 24%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/columns/factory.cpp.o
[ 25%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/columns/ip4.cpp.o
[ 27%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/columns/ip6.cpp.o
[ 28%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/columns/lowcardinality.cpp.o
[ 30%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/columns/nullable.cpp.o
[ 31%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/columns/numeric.cpp.o
[ 32%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/columns/string.cpp.o
[ 34%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/columns/tuple.cpp.o
[ 35%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/columns/uuid.cpp.o
[ 37%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/columns/itemview.cpp.o
[ 38%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/types/type_parser.cpp.o
[ 40%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/types/types.cpp.o
[ 41%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/block.cpp.o
[ 42%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/client.cpp.o
[ 44%] Building CXX object src/clickhouse-cpp/clickhouse/CMakeFiles/clickhouse-cpp-lib-static.dir/query.cpp.o
[ 45%] Linking CXX static library libclickhouse-cpp-lib-static.a
[ 45%] Built target clickhouse-cpp-lib-static
Scanning dependencies of target clickhouse_fdw
[ 47%] Building C object src/CMakeFiles/clickhouse_fdw.dir/clickhouse_fdw.c.o
/thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c: 在函数‘clickhousePlanForeignModify’中:
/thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c:1036:8: 警告:implicit declaration of function ‘heap_open’; did you mean ‘path_open’? [-Wimplicit-function-declaration]
rel = heap_open(rte->relid, NoLock);
^~~~~~~~~
path_open
/thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c:1036:6: 警告:assignment to ‘Relation’ {或称 ‘struct RelationData *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
rel = heap_open(rte->relid, NoLock);
^
/thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c:1070:2: 警告:implicit declaration of function ‘heap_close’; did you mean ‘path_close’? [-Wimplicit-function-declaration]
heap_close(rel, NoLock);
^~~~~~~~~~
path_close
/thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c: 在函数‘clickhouseBeginForeignModify’中:
/thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c:1118:43: 错误:‘ModifyTableState’ {或称 ‘struct ModifyTableState’} has no member named ‘mt_plans’; did you mean ‘mt_done’?
mtstate->mt_plans[subplan_index]->plan,
^~~~~~~~
mt_done
/thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c: 在函数‘foreign_grouping_ok’中:
/thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c:2158:30: 警告:传递‘make_restrictinfo’的第 1 个参数时在不兼容的指针类型间转换 [-Wincompatible-pointer-types]
rinfo = make_restrictinfo(expr,
^~~~
In file included from /thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c:32:
/usr/pgsql-14/include/server/optimizer/restrictinfo.h:24:22: 附注:需要类型‘PlannerInfo *’ {或称 ‘struct PlannerInfo *’},但实参的类型为‘Expr *’ {或称 ‘struct Expr *’}
extern RestrictInfo *make_restrictinfo(PlannerInfo *root,
^~~~~~~~~~~~~~~~~
/thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c:2159:12: 警告:传递‘make_restrictinfo’的第 2 个参数时将整数赋给指针,未作类型转换 [-Wint-conversion]
true,
^~~~
In file included from /thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c:32:
/usr/pgsql-14/include/server/optimizer/restrictinfo.h:24:22: 附注:需要类型‘Expr *’ {或称 ‘struct Expr *’},但实参的类型为‘int’
extern RestrictInfo *make_restrictinfo(PlannerInfo *root,
^~~~~~~~~~~~~~~~~
/thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c:2163:23: 警告:传递‘make_restrictinfo’的第 6 个参数时将指针赋给整数,未作类型转换 [-Wint-conversion]
grouped_rel->relids,
~~~~~~~~~~~^~~~~~~~
In file included from /thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c:32:
/usr/pgsql-14/include/server/optimizer/restrictinfo.h:24:22: 附注:需要类型‘Index’ {或称 ‘unsigned int’},但实参的类型为Relids’ {或称 ‘struct Bitmapset *’}
extern RestrictInfo *make_restrictinfo(PlannerInfo *root,
^~~~~~~~~~~~~~~~~
/thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c:2158:12: 错误:提供给函数‘make_restrictinfo’的实参太少
rinfo = make_restrictinfo(expr,
^~~~~~~~~~~~~~~~~
In file included from /thunisoft/clickhouse_fdw-1.2.1/src/clickhouse_fdw.c:32:
/usr/pgsql-14/include/server/optimizer/restrictinfo.h:24:22: 附注:在此声明
extern RestrictInfo *make_restrictinfo(PlannerInfo *root,
^~~~~~~~~~~~~~~~~
make[2]: *** [src/CMakeFiles/clickhouse_fdw.dir/build.make:82:src/CMakeFiles/clickhouse_fdw.dir/clickhouse_fdw.c.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:255:src/CMakeFiles/clickhouse_fdw.dir/all] 错误 2
make: *** [Makefile:149:all] 错误 2

@BorysSerbyn
Copy link

OK I will fix it right now!

@Hylijia
Copy link
Author

Hylijia commented Nov 16, 2021

Have you fixed it?

@aramperes
Copy link

You are probably using Postgres v13? If so, you should use version 1.3.0 for clickhouse_fdw because of this commit: dbf10e1#diff-ecda780ef4ce082168a0daee70178928d4d68b9869b749e35fec28f86483078d

In your bugreport it says you are using 1.2.1.

@BorysSerbyn
Copy link

BorysSerbyn commented Nov 16, 2021

I basically gave him the answer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants