[MacPorts] #51542: clang-3.8 and clang-3.9 fail to function due to rpath

MacPorts noreply at macports.org
Wed Jun 1 23:02:38 PDT 2016


#51542: clang-3.8 and clang-3.9 fail to function due to rpath
-------------------------------------+------------------------
  Reporter:  kenneth.f.cunningham@…  |      Owner:  jeremyhu@…
      Type:  defect                  |     Status:  new
  Priority:  Normal                  |  Milestone:
 Component:  ports                   |    Version:  2.3.4
Resolution:                          |   Keywords:
      Port:  clang-3.8               |
-------------------------------------+------------------------

Comment (by kenneth.f.cunningham@…):

 OK - here's a few more clues.

 clang-3.4, which works out of the box, has this otool output:
 {{{
 $ otool -l /opt/local/libexec/llvm-3.4/bin/../lib/libLTO.dylib | grep -A2
 LC_RPATH
           cmd LC_RPATH
       cmdsize 40
          path @executable_path/../lib (offset 12)
 }}}

 clang-3.7, which also works out of the box, has this otool output:
 {{{
 $ otool -l /opt/local/libexec/llvm-3.7/bin/../lib/libLTO.dylib | grep -A2
 LC_RPATH
           cmd LC_RPATH
       cmdsize 40
          path @executable_path/../lib (offset 12)
 }}}
 clang-3.8, which did not work without modification, has this (the last
 entry I added with the install_name_tool:
 {{{
 KensMacBookPro:test_llvm cunningh$ otool -l
 /opt/local/libexec/llvm-3.8/bin/../lib/libLTO.dylib | grep -A2 LC_RPATH
           cmd LC_RPATH
       cmdsize 32
          path @loader_path (offset 12)
 --
           cmd LC_RPATH
       cmdsize 40
          path @executable_path/../lib (offset 12)
 --
           cmd LC_RPATH
       cmdsize 48
          path /opt/local/libexec/llvm-3.8/lib (offset 12)
 }}}

 and clang-3.9, which also did not work without modification, has this:
 {{{
 $ otool -l /opt/local/libexec/llvm-3.9/bin/../lib/libLTO.dylib | grep -A2
 LC_RPATH
           cmd LC_RPATH
       cmdsize 32
          path @loader_path (offset 12)
 --
           cmd LC_RPATH
       cmdsize 40
          path @executable_path/../lib (offset 12)
 --
           cmd LC_RPATH
       cmdsize 48
          path /opt/local/libexec/llvm-3.9/lib (offset 12)
 }}}

 so - strangely - the two older clang versions, with no @loader_path set,
 work. The newer two, with the @loader_path, do not (unless I hard code it
 in).

 I've been reading this article over
 <https://wincent.com/wiki/@executable_path,_@load_path_and_@rpath> and I
 don't see the reason this is happening, but perhaps you do.

-- 
Ticket URL: <https://trac.macports.org/ticket/51542#comment:10>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list