Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-6312

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.14.1
    • 5.0.0
    • C++

    Description

      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 https://github.com/apache/arrow/pull/5123#issuecomment-522771452, the additional Libs.private need to be dynamically generated based on whether functionality like snappy, brotli or zlib is enabled..

      Attachments

        Issue Links

          Activity

            People

              kou Kouhei Sutou
              apache@michaelmaguire.ca Michael Maguire
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 10m
                  2h 10m