moba15 opened a new issue, #45608:
URL: https://github.com/apache/arrow/issues/45608
### Describe the bug, including details regarding any error messages,
version, and platform.
I am encountering compilation errors when using Apache Arrow Flight SQL 19
in a C++20 project. The issue appears when including <arrow/flight/api.h>,
where arrow::flight::FlightEndpoint is reported as an incomplete type.
The compiler erros i get:
`
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);
`
**System Information:**
OS: Ubuntu (installed Apache Arrow from the official repo)
Compiler: Clang 20
C++ Standard: C++20
Apache Arrow Version: 19
Installation Method: Official Apache Arrow APT repository
`sudo apt install -y -V libarrow-dev libarrow-flight-dev
libarrow-flight-sql-dev`
**Cmake**
`
add_library(serverLib OBJECT
StatementHandler.cpp)
target_link_libraries(serverLib PUBLIC Arrow::arrow_static
ArrowFlight::arrow_flight_static ArrowFlightSql::arrow_flight_sql_static
Parquet::parquet_static ArrowDataset::arrow_dataset_static)
set_target_properties(serverLib PROPERTIES CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON)
`
**Steps Taken to Resolve the Issue:**
- Explicitly including <arrow/flight/types.h> before <arrow/flight/api.h> :
No effect
- Reordering includes (e.g., <arrow/flight/api.h> before <arrow/api.h>): No
effect
- Using other compiler version clang 19.x: no effect
Expected Behavior:
Compilation should succeed without incomplete type errors when using Flight
SQL in a C++20 environment.
### Component(s)
C++
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]