ActiveMQ C++ Client
  1. ActiveMQ C++ Client
  2. AMQCPP-370

pkg-config does not properly indicate static dependencies

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.5
    • Fix Version/s: 3.4.1, 3.5.0
    • Component/s: CMS Impl
    • Labels:
      None
    • Environment:

      Linux

      Description

      The output from pkg-config does not properly indicate the full dependency requirements for static linking. For example, if configured --with-openssl=... then the pkg-config --static output should reflect this.

      Here's an example from libcurl demonstrating this:
      curl-7.21.6 $ ./configure
      curl-7.21.6 $ cp libcurl.pc libcurl-plain.pc
      curl-7.21.6 $ ./configure --with-ssl
      curl-7.21.6 $ diff libcurl-plain.pc libcurl.pc
      38c38
      < Libs.private: -lrt

      > Libs.private: -lssl -lcrypto -lrt -lssl -lcrypto -ldl
      curl-7.21.6 $ pkg-config --libs libcurl
      -lcurl
      curl-7.21.6 $ pkg-config --libs --static libcurl
      -lcurl -lssh2 -lssl -lcrypto -lrt -lz
      curl-7.21.6 $

      This can be (crudely) fixed by adding the following to activemq-cpp.pc.in:

      Libs.private = @AMQ_LIBS@

      [A cleaner solution would require updates of configure.ac for a more precise specification.]

        Activity

        Hide
        Timothy Bish added a comment -

        Patches welcome.

        Show
        Timothy Bish added a comment - Patches welcome.
        Hide
        Kevin Quick added a comment -

        Patch included in original comment:

        activemq-cpp.pc.in: Libs.private = @AMQ_LIBS@

        Show
        Kevin Quick added a comment - Patch included in original comment: activemq-cpp.pc.in: Libs.private = @AMQ_LIBS@
        Hide
        Timothy Bish added a comment -

        Patch applied in trunk

        Show
        Timothy Bish added a comment - Patch applied in trunk

          People

          • Assignee:
            Timothy Bish
            Reporter:
            Kevin Quick
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development