Thanks to @Botje ! This problem is probably caused by -D_GLIBCXX_USE_CXX11_ABI=0
.
In the Makefile of DuckDB_fdw, it added -D_GLIBCXX_USE_CXX11_ABI=0, when I building duckdb from source, this flag was not setted.
ifeq ($(detected_OS),Linux)
# DLSUFFIX = .so
PG_CXXFLAGS = -std=c++11
detected_arch := $(shell uname -m)
ifeq ($(detected_arch),x86_64)
PG_CXXFLAGS = -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0
endif
endif
Now I can CREATE the extension by either add definitions -D_GLIBCXX_USE_CXX11_ABI=0
in the duckdb's CMakeLists.txt or change D_GLIBCXX_USE_CXX11_ABI=0
to 1
in duckdb_fdw's Makefile .
I don't know why duckdb_fdw needs an order ABI yet. Due to the two part will interact with Postgres, I'm not sure which one is better, I will test it later.