[cfe-dev] Clang 3.3 and libclang_rt.asan_osx_dynamic.dylib not found?

Jeffrey Walton noloader at gmail.com
Thu Jul 11 22:44:18 PDT 2013


On Fri, Jul 12, 2013 at 1:25 AM, Jeffrey Walton <noloader at gmail.com> wrote:
> On Fri, Jul 12, 2013 at 12:56 AM, Justin Bogner <mail at justinbogner.com> wrote:
>> Jeffrey Walton <noloader at gmail.com> writes:
>>> My program is failing to link with -fsantize=address:
>>  ...
>>> Any ideas where to find libclang_rt.asan_osx_dynamic.dylib?
>>
>> You'll need to build compiler-rt for the sanitizers to work. Grab it and
>> put it under projects/compiler-rt before the configure/make step
> Thanks Justin.
>
> I unpacked compiler-rt-3.3.src.tar.gz into projects and re-ran
> configure/make, but that library is still missing:
>
> $ find /usr/local/ -iname libclang_rt.asan_osx_dynamic.dylib
> $
>
> Does the makefile do the right thing? Or do I need to take more
> special steps (does compiler-rt-3.3.src need to be renamed)?
Yes, it needs renaming. Then it works like a charm. Thanks.

Recipe for those who are interested:

wget http://llvm.org/releases/3.3/llvm-3.3.src.tar.gz
wget http://llvm.org/releases/3.3/cfe-3.3.src.tar.gz
wget http://llvm.org/releases/3.3/compiler-rt-3.3.src.tar.gz
tar xvf llvm-3.3.src.tar.gz
cd llvm-3.3.src/tools
tar xvf ../../cfe-3.3.src.tar.gz
mv cfe-3.3.src clang
cd ..
cd projects
tar xvf ../../compiler-rt-3.3.src.tar.gz
mv compiler-rt-3.3.src/ compiler-rt
cd ..
./configure --enable-optimized --prefix=/usr/local
make -j4
sudo make install



More information about the cfe-dev mailing list