最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c++ - C++20 Compilation Error with Apache Arrow Flight SQL 19: Incomplete Type FlightEndpoint - Stack Overflow

programmeradmin1浏览0评论

I am trying to use Apache Arrow Flight SQL 19 in a C++20 project, but as soon as I include <arrow/flight/api.h>, I get multiple compilation errors related to FlightEndpoint being an incomplete type.

Erro message:

FAILED: src/utility/server/CMakeFiles/serverLib.dir/StatementHandler.cpp.o 
/usr/bin/clang++-20 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/lib/llvm-20/include -I/lingo-db/include -I/lingo-db/vendored -I/lingo-db/build/lingodb-release/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=gnu++20 -fvisibility=hidden   -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -MD -MT src/utility/server/CMakeFiles/serverLib.dir/StatementHandler.cpp.o -MF src/utility/server/CMakeFiles/serverLib.dir/StatementHandler.cpp.o.d -o src/utility/server/CMakeFiles/serverLib.dir/StatementHandler.cpp.o -c /lingo-db/src/utility/server/StatementHandler.cpp
In file included from /lingo-db/src/utility/server/StatementHandler.cpp:7:
In file included from /usr/include/arrow/api.h:22:
In file included from /usr/include/arrow/array.h:41:
In file included from /usr/include/arrow/array/array_base.h:24:
In file included from /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/vector:66:
/usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_vector.h:370:35: error: arithmetic on a pointer to an incomplete type 'arrow::flight::FlightEndpoint'
  370 |                       _M_impl._M_end_of_storage - _M_impl._M_start);

My CMake Setup:

find_package(Arrow 19 REQUIRED)
find_package(ArrowFlight 19 REQUIRED)
find_package(ArrowFlightSql 19 REQUIRED)

add_library(serverLib OBJECT StatementHandler.cpp)
target_link_libraries(serverLib PRIVATE Arrow::arrow_static PRIVATE ArrowFlight::arrow_flight_static PRIVATE ArrowFlightSql::arrow_flight_sql_static)

Simplest code that triggers the error:

#include <arrow/api.h>
#include <arrow/flight/api.h>

Things I Have Tried:

  • Using shared libraries instead of static linking
  • different arrow versions
  • including arrow/flight/types.h first
发布评论

评论列表(0)

  1. 暂无评论