[MacPorts] #53299: clang-3.9: sanitizer libraries not at the right place

MacPorts noreply at macports.org
Fri Jan 13 05:30:09 UTC 2017


#53299: clang-3.9: sanitizer libraries not at the right place
--------------------+-----------------------
 Reporter:  akimd   |      Owner:
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:  2.3.5
 Keywords:          |       Port:  clang-3.9
--------------------+-----------------------
 Hi,

 It seems that clang expects the libraries for C++ to be at another place:

 {{{
 $ cat foo.cc
 12
 int main()
 {
   return 1 << 34;
 }

 $ clang++-mp-3.9 -fsanitize=undefined foo.cc
 foo.cc:3:12: warning: shift count >= width of type [-Wshift-count-
 overflow]
   return 1 << 34;
            ^  ~~
 1 warning generated.
 $ ./a.out
 dyld: Library not loaded:
 /opt/local/libexec/llvm-3.9/lib/libclang_rt.ubsan_osx_dynamic.dylib
   Referenced from: /private/tmp/./a.out
   Reason: image not found
 zsh: abort (core dumped)  ./a.out
 $ ls  /opt/local/libexec/llvm-3.9/lib/libclang_*
 zsh: no matches found: /opt/local/libexec/llvm-3.9/lib/libclang_*
 $ ls /opt/local/libexec/llvm-3.9/lib/clang/3.9.1/lib/darwin
 libclang_rt.10.4.a                      libclang_rt.eprintf.a
 libclang_rt.safestack_osx.a             libclang_rt.tsan_osx_dynamic.dylib
 libclang_rt.asan_osx_dynamic.dylib      libclang_rt.osx.a
 libclang_rt.stats_client_osx.a
 libclang_rt.ubsan_osx_dynamic.dylib
 libclang_rt.cc_kext.a                   libclang_rt.profile_osx.a
 libclang_rt.stats_osx_dynamic.dylib
 $ DYLD_LIBRARY_PATH=/opt/local/libexec/llvm-3.9/lib/clang/3.9.1/lib/darwin
 ./a.out
 foo.cc:3:12: runtime error: shift exponent 34 is too large for 32-bit type
 'int'
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/53299>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list