Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-4047

Multiple -rpath options are not handled correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.1.0
    • Build

    Description

      https://github.com/apache/trafficserver/pull/324

      Using TS_ADDTO to add the custom locations of libraries results in incorrect "-rpath" directive to the linker. This is because TS_ADDTO creates a unique list of tokens that it adds to its target. E.g.,

      ./configure --with-openssl=/usr/local/openssl --with-zlib=/usr/local/zlib
      the above should result in

      LIBTOOL_LINK_FLAGS: -rpath /usr/local/openssl/lib /usr/local/zlib/lib
      The absence of "-rpath" in front of the second path causes an error in the linker!

      This is fixed by introducing a new macro TS_ADD_RPATH_TO that takes a path and adds it with the "-rpath " prefix.

      Also added influential environmental variable RPATH that can be used to give a base value for the rpath. So, the following

      ./configure --with-openssl=/usr/local/openssl --with-zlib=/usr/local/zlib RPATH=/foo
      will result in

      LIBTOOL_LINK_FLAGS: -rpath /foo -rpath /usr/local/zlib/lib -rpath /usr/local/openssl/lib

      Attachments

        Activity

          People

            briang Brian Geffon
            jamespeach James Peach
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: