Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Minimal Arrow Library Contains Undefined Symbols from IPC sources #45512

Closed
WillAyd opened this issue Feb 12, 2025 · 1 comment
Closed
Assignees
Milestone

Comments

@WillAyd
Copy link
Contributor

WillAyd commented Feb 12, 2025

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

If you disable every option of the C++ build:

$ cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja -DARROW_COMPUTE=OFF -DARROW_IPC=OFF -DARROW_JSON=OFF -DARROW_CSV=OFF -DARROW_BUILD_TESTS=OFF -DARROW_FILESYSTEM=OFF -DARROW_BUILD_INTEGRATION=OFF -DARROW_ALTIVEC=OFF
$ cmake --build build

The produced libarrow.so file will contain undefined symbols:

$ objdump -T -C ./build/release/libarrow.so | grep ipc
0000000000000000      D  *UND*	0000000000000000  Base        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&)
0000000000000000      D  *UND*	0000000000000000  Base        arrow::ipc::IpcReadOptions::Defaults()
0000000000000000      D  *UND*	0000000000000000  Base        arrow::ipc::IpcWriteOptions::Defaults()
0000000000000000      D  *UND*	0000000000000000  Base        arrow::ipc::RecordBatchFileReader::Open(arrow::io::RandomAccessFile*, arrow::ipc::IpcReadOptions const&)

As far as I can tell from the linker, these symbols are required by arrow/compute/expression.cc

This issue was originally noticed in #45441 (comment)

Component(s)

C++

WillAyd added a commit to WillAyd/arrow that referenced this issue Feb 12, 2025
@kou kou changed the title Minimal Arrow Library Contains Undefined Symbols from IPC sources [C++] Minimal Arrow Library Contains Undefined Symbols from IPC sources Feb 13, 2025
kou pushed a commit that referenced this issue Feb 13, 2025
…45513)

### Rationale for this change

When building the Arrow library without IPC, the library ends up with undefined symbols to functions that are only available with ARROW_IPC=ON

### What changes are included in this PR?

Use the ARROW_IPC macro to detect if IPC is being used, and when not, return a NotImplementedError

### Are these changes tested?

Compiles cleanly and no longer shows undefined IPC symbols

### Are there any user-facing changes?

No
* GitHub Issue: #45512

Authored-by: Will Ayd <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
@kou kou added this to the 20.0.0 milestone Feb 13, 2025
@kou
Copy link
Member

kou commented Feb 13, 2025

Issue resolved by pull request 45513
#45513

@kou kou closed this as completed Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants