Opened 11 years ago
Closed 11 years ago
#39267 closed defect (duplicate)
clang-3.3: Address sanitizer library needs id to be changed on install
Reported by: | dh@… | Owned by: | jeremyhu (Jeremy Huddleston Sequoia) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.3 |
Keywords: | Cc: | larryv (Lawrence Velázquez) | |
Port: | clang-3.3 |
Description
Compiling (and linking) using the -fsanitize=address flags leads to an executable with dangling library dependencies. This is because a library has been installed with a bad id
$ otool -L /opt/local/libexec/llvm-3.3/lib/clang/3.3/lib/darwin/libclang_rt.asan_osx_dynamic.dylib /opt/local/libexec/llvm-3.3/lib/clang/3.3/lib/darwin/libclang_rt.asan_osx_dynamic.dylib: /opt/local/var/macports/build/_opt_mports_dports_lang_llvm-3.3/clang-3.3/work/trunk/Release+Debug+Asserts/lib/clang/3.3/lib/darwin/libclang_rt.asan_osx_dynamic.dylib (compatibility version 0.0.0, current version 0.0.0) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 833.25.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
Manually fixing the id solves the problem
$ sudo install_name_tool -id /opt/local/libexec/llvm-3.3/lib/clang/3.3/lib/darwin/libclang_rt.asan_osx_dynamic.dylib /opt/local/libexec/llvm-3.3/lib/clang/3.3/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
So I guess this just needs to be added to the post-destroot ... I'm not sure if this also affects 3.2.
Change History (4)
comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)
Owner: | changed from jeremyhu to jeremyhu@… |
---|
comment:2 Changed 11 years ago by larryv (Lawrence Velázquez)
Replying to dh@…:
So I guess this just needs to be added to the post-destroot ... I'm not sure if this also affects 3.2.
It does.
% otool -L /opt/local/libexec/llvm-3.2/lib/clang/3.2/lib/darwin/libclang_rt.asan_osx_dynamic.dylib /opt/local/libexec/llvm-3.2/lib/clang/3.2/lib/darwin/libclang_rt.asan_osx_dynamic.dylib: /opt/local/var/macports/build/_opt_mports_dports_lang_llvm-3.2/clang-3.2/work/llvm-3.2.src/Release+Debug+Asserts/lib/clang/3.2/lib/darwin/libclang_rt.asan_osx_dynamic.dylib (compatibility version 0.0.0, current version 0.0.0) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 945.11.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 744.12.0)
comment:4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of #38527.
Note: See
TracTickets for help on using
tickets.
Trac takes full email addresses, not MacPorts handles.