[LLVMbugs] [Bug 21618] New: libclang_rt.asan_osx_dynamic.dylib incorrect RPATH

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Nov 20 08:21:30 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=21618

            Bug ID: 21618
           Summary: libclang_rt.asan_osx_dynamic.dylib incorrect RPATH
           Product: clang
           Version: 3.5
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ruslan_baratov at yahoo.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

*asan*.dylib has an incorrect rpath:

> otool -L lib/clang/3.5.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
   
/private/tmp/llvm-release/final/Phase3/Release/llvmCore-3.5.0-final.obj/Release/lib/clang/3.5.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
(compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version
120.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
1197.1.1)

It's probably some temporary build location which not exists.

This lead to error:
> cat main.cpp
#include <iostream>
int main() {
  std::cout << "hello" << std::endl;
}
> clang++ -fsanitize=address main.cpp -o foo && ./foo
dyld: Library not loaded:
/private/tmp/llvm-release/final/Phase3/Release/llvmCore-3.5.0-final.obj/Release/lib/clang/3.5.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
  Referenced from: /.../foo
  Reason: image not found
Trace/BPT trap: 5

Simple workaround:
> install_name_tool /path/to/real/*.dylib -id /path/to/real/*.dylib

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141120/a4aa1b6d/attachment.html>


More information about the llvm-bugs mailing list