<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">there is an existing trac ticket about this…<<a href="https://trac.macports.org/ticket/53299#comment:9" class="">https://trac.macports.org/ticket/53299#comment:9</a>><div class=""><br class=""></div><div class="">the rpath is not set right - needs a minor fix (or a symlink).</div><div class=""><br class=""></div><div class="">Jeremy’s too busy to get to it, and open to patches.</div><div class=""><br class=""></div><div class="">Ken</div><div class=""><div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class="">On Nov 9, 2017, at 6:50 PM, Jeffrey Walton <<a href="mailto:noloader@gmail.com" class="">noloader@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi Everyone,<br class=""><br class="">I'm using MacPorts Clang 3.9 compiler. I'm trying to run Asan on a<br class="">program built with -fsantize=address but things are failing to link:<br class=""><br class="">ld: file not found:<br class="">/opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/lib/darwin/libclang_rt.asan_osx_dynamic.dylib<br class="">clang: error: linker command failed with exit code 1 (use -v to see invocation)<br class="">Makefile:891: recipe for target '<a href="http://libcryptopp.la" class="">libcryptopp.la</a>' failed<br class="">...<br class=""><br class="">A quick ls shows it is indeed missing:<br class=""><br class="">$ ls /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/lib/darwin/<br class="">libclang_rt.10.4.a      libclang_rt.eprintf.a<br class="">libclang_rt.cc_kext.a   libclang_rt.osx.a<br class=""><br class="">A couple of attempts to locate and install one:<br class=""><br class="">$ sudo port install asan<br class="">Error: Port asan not found<br class="">$ port search asan<br class="">No match for asan found<br class="">$ sudo port install libclang_rt.asan_osx_dynamic.dylib<br class="">Error: Port libclang_rt.asan_osx_dynamic.dylib not found<br class="">$ port search libclang_rt.asan_osx_dynamic.dylib<br class="">No match for libclang_rt.asan_osx_dynamic.dylib found<br class=""><br class="">The dylib is mentioned a few times in<br class=""><a href="https://trac.macports.org/ticket/50511" class="">https://trac.macports.org/ticket/50511</a>, but I'm not quite following<br class="">what needs to be installed.<br class=""><br class="">What package provides the address sanitizers? How do I install Asan<br class="">for the Clang 3.9 compiler?<br class=""><br class="">Thanks in advance,<br class=""><br class="">Jeff<br class=""><br class="">*************************<br class=""><br class="">$ ls /opt/local/bin | egrep -E 'gcc|g\+\+'<br class="">clang++-mp-3.6<br class="">clang++-mp-3.7<br class="">clang++-mp-3.8<br class="">clang++-mp-3.9<br class="">g++-mp-5<br class="">g++-mp-6<br class="">gcc-ar-mp-5<br class="">gcc-ar-mp-6<br class="">gcc-mp-5<br class="">gcc-mp-6<br class="">gcc-nm-mp-5<br class="">gcc-nm-mp-6<br class="">gcc-ranlib-mp-5<br class="">gcc-ranlib-mp-6<br class="">x86_64-apple-darwin13-g++-mp-5<br class="">x86_64-apple-darwin13-g++-mp-6<br class="">x86_64-apple-darwin13-gcc-5.5.0<br class="">x86_64-apple-darwin13-gcc-6.4.0<br class="">x86_64-apple-darwin13-gcc-ar-mp-5<br class="">x86_64-apple-darwin13-gcc-ar-mp-6<br class="">x86_64-apple-darwin13-gcc-mp-5<br class="">x86_64-apple-darwin13-gcc-mp-6<br class="">x86_64-apple-darwin13-gcc-nm-mp-5<br class="">x86_64-apple-darwin13-gcc-nm-mp-6<br class="">x86_64-apple-darwin13-gcc-ranlib-mp-5<br class="">x86_64-apple-darwin13-gcc-ranlib-mp-6<br class=""></div></div></blockquote></div><br class=""></div></body></html>