[lldb-dev] Using a undeclared free function in lldb Mangled.cpp causes build failure
Zack Perry
zack.perry at sbcglobal.net
Thu Aug 15 09:41:39 PDT 2013
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.
Not really!
zackp at 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"
zackp at nb1:~/Downloads/clang3.3/build$ make -j 2
[...]
llvm[4]: Compiling Mangled.cpp for Release build
/home/zackp/Downloads/clang3.3/llvm-3.3.src/tools/lldb/source/Core/Mangled.cpp:218:21: error: use of undeclared identifier 'free'
free (demangled_name);
^
1 error generated.
make[4]: *** [/home/zackp/Downloads/clang3.3/build/tools/lldb/source/Core/Release/Mangled.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory `/home/zackp/Downloads/clang3.3/build/tools/lldb/source/Core'
make[3]: *** [all] Error 1
make[3]: Leaving directory `/home/zackp/Downloads/clang3.3/build/tools/lldb/source'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/home/zackp/Downloads/clang3.3/build/tools/lldb'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/zackp/Downloads/clang3.3/build/tools'
make: *** [all] Error 1
Questions:
0. why in a C++ code, the C free function is used?
1. Why when using it, the #include <cstdlib> is nowhere in the source?
Regards,
-- Zack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130815/e82d97ca/attachment.html>
More information about the lldb-dev
mailing list