there is an existing trac ticket about 
this…<https://trac.macports.org/ticket/53299#comment:9 
<https://trac.macports.org/ticket/53299#comment:9>>

the rpath is not set right - needs a minor fix (or a symlink).

Jeremy’s too busy to get to it, and open to patches.

Ken


> On Nov 9, 2017, at 6:50 PM, Jeffrey Walton <noloa...@gmail.com> wrote:
> 
> Hi Everyone,
> 
> I'm using MacPorts Clang 3.9 compiler. I'm trying to run Asan on a
> program built with -fsantize=address but things are failing to link:
> 
> ld: file not found:
> /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
> clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
> Makefile:891: recipe for target 'libcryptopp.la' failed
> ...
> 
> A quick ls shows it is indeed missing:
> 
> $ ls /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/lib/darwin/
> libclang_rt.10.4.a      libclang_rt.eprintf.a
> libclang_rt.cc_kext.a   libclang_rt.osx.a
> 
> A couple of attempts to locate and install one:
> 
> $ sudo port install asan
> Error: Port asan not found
> $ port search asan
> No match for asan found
> $ sudo port install libclang_rt.asan_osx_dynamic.dylib
> Error: Port libclang_rt.asan_osx_dynamic.dylib not found
> $ port search libclang_rt.asan_osx_dynamic.dylib
> No match for libclang_rt.asan_osx_dynamic.dylib found
> 
> The dylib is mentioned a few times in
> https://trac.macports.org/ticket/50511, but I'm not quite following
> what needs to be installed.
> 
> What package provides the address sanitizers? How do I install Asan
> for the Clang 3.9 compiler?
> 
> Thanks in advance,
> 
> Jeff
> 
> *************************
> 
> $ ls /opt/local/bin | egrep -E 'gcc|g\+\+'
> clang++-mp-3.6
> clang++-mp-3.7
> clang++-mp-3.8
> clang++-mp-3.9
> g++-mp-5
> g++-mp-6
> gcc-ar-mp-5
> gcc-ar-mp-6
> gcc-mp-5
> gcc-mp-6
> gcc-nm-mp-5
> gcc-nm-mp-6
> gcc-ranlib-mp-5
> gcc-ranlib-mp-6
> x86_64-apple-darwin13-g++-mp-5
> x86_64-apple-darwin13-g++-mp-6
> x86_64-apple-darwin13-gcc-5.5.0
> x86_64-apple-darwin13-gcc-6.4.0
> x86_64-apple-darwin13-gcc-ar-mp-5
> x86_64-apple-darwin13-gcc-ar-mp-6
> x86_64-apple-darwin13-gcc-mp-5
> x86_64-apple-darwin13-gcc-mp-6
> x86_64-apple-darwin13-gcc-nm-mp-5
> x86_64-apple-darwin13-gcc-nm-mp-6
> x86_64-apple-darwin13-gcc-ranlib-mp-5
> x86_64-apple-darwin13-gcc-ranlib-mp-6

Reply via email to