Skip to content

[C++] Static linking with IPC disabled leads to link error in computer/function_internal.cc #44563

Closed

Description

@jleibs

Describe the bug, including details regarding any error messages, version, and platform.

Version: arrow-18.0.0
Host platform: arch linux

When building a static library that depends on a manual build of arrow, it appears that the contents of function_internal.cc, which is brought in regardless of the status of -DARROW_COMPUTE indirectly uses IPC:

Offending line:

ARROW_ASSIGN_OR_RAISE(auto writer, ipc::MakeFileWriter(stream, batch->schema()));

If IPC is disabled (-DARROW_IPC=OFF), this leads to a link error:

/home/jleibs/rerun/build/debug/arrow/src/arrow_cpp/cpp/src/arrow/compute/function_internal.cc:73:(.text._ZNK5arrow7compute8internal18GenericOptionsType9SerializeERKNS0_15FunctionOptionsE+0x5d4): undefined reference to `arrow::ipc::IpcWriteOptions::Defaults()'
/home/jleibs/rerun/.pixi/envs/cpp/bin/../lib/gcc/x86_64-conda-linux-gnu/12.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /home/jleibs/rerun/build/debug/arrow/src/arrow_cpp/cpp/src/arrow/compute/function_internal.cc:73:(.text._ZNK5arrow7compute8internal18GenericOptionsType9SerializeERKNS0_15FunctionOptionsE+0x632): undefined reference to `arrow::ipc::MakeFileWriter(std::shared_ptr<arrow::io::OutputStream>, std::shared_ptr<arrow::Schema> const&, arrow::ipc::IpcWriteOptions const&, std::shared_ptr<arrow::KeyValueMetadata const> const&)'

Component(s)

C++

Activity

  1. added a commit that references this issue on Nov 8, 2024
  2. added a commit that references this issue on Jan 4, 2025
  3. added this to the 19.0.0 milestone on Jan 5, 2025
  4. added a commit that references this issue on Jan 6, 2025
  5. kou commented on Jan 6, 2025

    @kou
    Member

    Issue resolved by pull request 45171
    #45171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions