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++] pkg-config flags don't include -ldl for static builds #40577

Closed
bkietz opened this issue Mar 15, 2024 · 1 comment
Closed

[C++] pkg-config flags don't include -ldl for static builds #40577

bkietz opened this issue Mar 15, 2024 · 1 comment
Assignees
Milestone

Comments

@bkietz
Copy link
Member

bkietz commented Mar 15, 2024

pkg-config's libraries are not automatically derived from /ARROW_(STATIC|SHARED)_INSTALL_INTERFACE_LIBS/, instead they are managed in independent variables /ARROW_PC_LIBS(|_PRIVATE). When linking statically, pkg-config doesn't pick up the new dependency on libdl introduced by #39067

This produces unresolved symbol errors

@bkietz bkietz self-assigned this Mar 15, 2024
@bkietz bkietz changed the title [C++] Ensure pkg-config flags include -ldl for static builds [C++] pkg-config flags don't include -ldl for static builds Mar 15, 2024
bkietz added a commit to bkietz/arrow that referenced this issue Mar 15, 2024
bkietz added a commit that referenced this issue Mar 16, 2024
#40578)

### Rationale for this change

When linking statically, pkg-config doesn't pick up the new dependency on libdl introduced by #39067

This produces [unresolved symbol errors](#39067 (comment))

### What changes are included in this PR?

Addition of `-ldl` to `ARROW_PC_LIBS_PRIVATE` to ensure linkage to the necessary library

### Are these changes tested?

yes

### Are there any user-facing changes?

no

* GitHub Issue: #40577

Authored-by: Benjamin Kietzman <bengilgit@gmail.com>
Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
@bkietz bkietz added this to the 16.0.0 milestone Mar 16, 2024
@bkietz
Copy link
Member Author

bkietz commented Mar 16, 2024

Issue resolved by pull request 40578
#40578

@bkietz bkietz closed this as completed Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant