Skip to content

[C++] Issues compiling with gcc-14 #44877

@olafx

Description

@olafx

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<arrow::Schema>, std::vector<std::shared_ptr<arrow::Array>, std::allocator<std::shared_ptr<arrow::Array>>> const&, long long)", referenced from:
      _main in ccfptoOo.o
  "arrow::field(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<arrow::DataType>, bool, std::shared_ptr<arrow::KeyValueMetadata const>)", referenced from:
      _main in ccfptoOo.o
  "arrow::Buffer::FromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)", referenced from:
      _main in ccfptoOo.o
  "arrow::schema(std::vector<std::shared_ptr<arrow::Field>, std::allocator<std::shared_ptr<arrow::Field>>>, std::shared_ptr<arrow::KeyValueMetadata const>)", referenced from:
      _main in ccfptoOo.o
  "arrow::ArrayData::Make(std::shared_ptr<arrow::DataType>, long long, std::vector<std::shared_ptr<arrow::Buffer>, std::allocator<std::shared_ptr<arrow::Buffer>>>, 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++

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions