<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:12pt"><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 12pt;">I am trying to build lldb on a Ubuntu 12.04 x86_64 box. I have a self-hosted clang 3.3 toolchain successfully built and installed on this box. So, I thought it would be simple just add a symlink lldb to the lldb-3.3-src into the llvm/tools/, redo the configure, make, and make install would do it.</div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 12pt;"><br></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">Not really! </div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 16px; color: rgb(0, 0, 0);
 background-color: transparent; font-style: normal;"><br></div><div style="background-color: transparent;"><span style="color: rgb(64, 127, 0); font-weight: bold;">zackp@nb1:~/Downloads/clang3.3/build$ ../llvm/configure --prefix=/usr --enable-optimized --disable-assertions --enable-targets=host-only --enable-cxx11=yes --enable-libcpp=yes --with-extra-ld-options="-lc++abi"</span></div><div><span style="font-weight: bold; color: rgb(64, 127, 0);">zackp@nb1:</span><span style="color: rgb(64, 127, 0); font-weight: bold;">~/Downloads/clang3.3/build$ make -j 2</span></div><div style="font-size: 16px; background-color: transparent; font-style: normal;"><span style="color: rgb(192, 0, 0);">[...]</span></div><div style="background-color: transparent;"><span style="color: rgb(192, 0, 0);">llvm[4]: Compiling Mangled.cpp for Release build</span></div><div style="background-color: transparent;"><span style="color: rgb(192, 0,
 0);">/home/zackp/Downloads/clang3.3/llvm-3.3.src/tools/lldb/source/Core/Mangled.cpp:218:21: error: use of undeclared identifier 'free'</span></div><div style="background-color: transparent;"><span style="color: rgb(192, 0, 0);">                    <span style="font-weight: bold;">free (demangled_name);</span></span></div><div style="background-color: transparent;"><span style="color: rgb(192, 0, 0);">                    ^</span></div><div style="background-color: transparent;"><span style="color: rgb(192, 0, 0);">1 error generated.</span></div><div style="background-color: transparent;"><span style="color: rgb(192, 0, 0);">make[4]: *** [/home/zackp/Downloads/clang3.3/build/tools/lldb/source/Core/Release/Mangled.o] Error 1</span></div><div style="background-color: transparent;"><span style="color: rgb(192, 0, 0);">make[4]: *** Waiting for unfinished
 jobs....</span></div><div style="background-color: transparent;"><span style="color: rgb(192, 0, 0);">make[4]: Leaving directory `/home/zackp/Downloads/clang3.3/build/tools/lldb/source/Core'</span></div><div style="background-color: transparent;"><span style="color: rgb(192, 0, 0);">make[3]: *** [all] Error 1</span></div><div style="background-color: transparent;"><span style="color: rgb(192, 0, 0);">make[3]: Leaving directory `/home/zackp/Downloads/clang3.3/build/tools/lldb/source'</span></div><div style="background-color: transparent;"><span style="color: rgb(192, 0, 0);">make[2]: *** [all] Error 1</span></div><div style="background-color: transparent;"><span style="color: rgb(192, 0, 0);">make[2]: Leaving directory `/home/zackp/Downloads/clang3.3/build/tools/lldb'</span></div><div style="background-color: transparent;"><span style="color: rgb(192, 0, 0);">make[1]: *** [all] Error 1</span></div><div style="background-color: transparent;"><span
 style="color: rgb(192, 0, 0);">make[1]: Leaving directory `/home/zackp/Downloads/clang3.3/build/tools'</span></div><div style="background-color: transparent;"><span style="color: rgb(192, 0, 0);">make: *** [all] Error 1</span></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 12pt;"><br></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 12pt;">Questions: </div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 12pt;">0. why in a C++ code, the C free function is used?</div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 12pt;">1. Why when using it, the <span style="font-weight: bold;">#include <cstdlib></span> is nowhere in the source?</div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 12pt;"><br></div><div style="font-family:
 'Courier New', courier, monaco, monospace, sans-serif; font-size: 12pt;">Regards,</div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 12pt;"><br></div><div style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 12pt;">-- Zack</div>  </div></body></html>