Skip to content

[C++] Declare required Libs.private in arrow.pc package config #16856

Closed

Description

@asfimport

The current arrow.pc package config file produced is deficient and doesn't properly declare static libraries pre-requisities that must be linked in in order to statically link in libarrow.a

Currently it just has:

 Libs: -L${libdir} -larrow

But in cases, e.g. where you enabled snappy, brotli or zlib support in arrow, our toolchains need to see an arrow.pc file something more like:

 Libs: -L${libdir} -larrow
 Libs.private: -lsnappy -lboost_system -lz -llz4 -lbrotlidec -lbrotlienc -lbrotlicommon -lzstd

If not, we get linkage errors.  I'm told the convention is that if the .a has an UNDEF, the Requires.private plus the Libs.private should resolve all the undefs. See the Libs.private info in https://linux.die.net/man/1/pkg-config

 

Note, however, as Sutou Kouhei pointed out in #5123 (comment) the additional Libs.private need to be dynamically generated based on whether functionality like snappy, brotli or zlib is enabled..

Reporter: Michael Maguire
Assignee: Kouhei Sutou / @kou

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-6312. Please see the migration documentation for further details.

Activity

  1. asfimport commented on Aug 30, 2019

    @asfimport
    Author

    Wes McKinney / @wesm:
    Would you like to update your PR to make a change for 0.15.0?

  2. asfimport commented on Sep 6, 2019

    @asfimport
    Author

    Wes McKinney / @wesm:
    I moved this out of 0.15.0. Patches welcome

  3. asfimport commented on Jul 9, 2020

    @asfimport
    Author

    Wes McKinney / @wesm:
    I'm handling the bundled static library issue by producing a "megabundle" of all the ExternalProject static libraries as libarrow_bundled_dependencies.a. Either this could be added to arrow.pc or static linkers will need to add this to their linker setup manually

  4. asfimport commented on Feb 17, 2021

    @asfimport
    Author
  5. asfimport commented on Jul 5, 2021

    @asfimport
    Author

    Kouhei Sutou / @kou:
    Issue resolved by pull request 10626
    #10626

  6. added this to the 5.0.0 milestone on Jan 11, 2023
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