[C++] Issues compiling with gcc-14
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the bug, including details regarding any error messages, version, and platform.
I have 3 compilers: GCC-14, Clang-19, Apple Clang 16 on AArch64. I'm compiling `arrow/cpp/examples/minimal_build` with CMake, or alternatively I can compile something like `CXX -std=c++17 -O3 test.cpp -I$(ARROW_INCLUDE) -L$(ARROW_LIB) -larrow -larrow_dataset -larrow_acero -lparquet`, works fine with Clang-19 and Apple Clang 16, but with GCC I get these odd errors:
```
Undefined symbols for architecture arm64:
"arrow::Table::Make(std::shared_ptr, std::vector, std::allocator>> const&, long long)", referenced from:
_main in ccfptoOo.o
"arrow::field(std::__cxx11::basic_string, std::allocator>, std::shared_ptr, bool, std::shared_ptr)", referenced from:
_main in ccfptoOo.o
"arrow::Buffer::FromString(std::__cxx11::basic_string, std::allocator>)", referenced from:
_main in ccfptoOo.o
"arrow::schema(std::vector, std::allocator>>, std::shared_ptr)", referenced from:
_main in ccfptoOo.o
"arrow::ArrayData::Make(std::shared_ptr, long long, std::vector, std::allocator>>, long long, long long)", referenced from:
__ZN5arrow12NumericArrayINS_9Int32TypeEEC1IS1_EENSt9enable_ifIXsrSt17integral_constantIbXsrNS_10TypeTraitsIT_EE17is_parameter_freeEE5valueExE4typeERKSt10shared_ptrINS_6BufferEESG_xx in ccfptoOo.o
```
Even with CMake it does this after adding `set(CMAKE_CXX_COMPILER "/opt/homebrew/bin/g++-14")` to the makefile, and only for this compiler. No idea what's going on. I have not had similar issues with this compiler. I read Apache Arrow is GCC compatible so, I'm stuck.
### Component(s)
C++
Contributor guide
Assessment
This issue has not been assessed yet.