[MacPorts] #51542: clang-3.8 and clang-3.9 fail to function due to rpath
MacPorts
noreply at macports.org
Sun Jun 5 10:27:48 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@…):
Jeremy -- adding @loader_path/ to the rpaths seems to fix the issue with
snowleopard.
{{{
sudo install_name_tool -add_rpath @loader_path/
/opt/local/libexec/llvm-3.8/bin/../lib/libLTO.dylib
$ 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 32
path @loader_path/ (offset 12)
}}}
{{{
$ clang -v hello.c -o hello
clang version 3.8.0 (branches/release_38 262722)
Target: x86_64-apple-darwin10.8.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-3.8/bin
"/opt/local/libexec/llvm-3.8/bin/clang" -cc1 -triple x86_64-apple-
macosx10.6.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name
hello.c -mrelocation-model pic -pic-level 2 -mthread-model posix
-mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-
linker-version 136 -v -dwarf-column-info -debugger-tuning=lldb -resource-
dir /opt/local/libexec/llvm-3.8/bin/../lib/clang/3.8.0 -fdebug-
compilation-dir /Users/Shared/test_llvm -ferror-limit 19 -fmessage-length
80 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.6.0 -fencode-
extended-block-signature -fmax-type-align=16 -fdiagnostics-show-option
-fcolor-diagnostics -o /var/folders/I0/I0fOotq3ErGZHYxrmmWiqU+++TI/-Tmp
-/hello-d43f94.o -x c hello.c
clang -cc1 version 3.8.0 based upon LLVM 3.8.0 default target x86_64
-apple-darwin10.8.0
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/opt/local/libexec/llvm-3.8/bin/../lib/clang/3.8.0/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
"/opt/local/libexec/llvm-3.8/bin/ld" -demangle -dynamic -arch x86_64
-macosx_version_min 10.6.0 -o hello -lcrt1.10.6.o
/var/folders/I0/I0fOotq3ErGZHYxrmmWiqU+++TI/-Tmp-/hello-d43f94.o -lSystem
$ ./hello
hello world
}}}
--
Ticket URL: <https://trac.macports.org/ticket/51542#comment:15>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list