[lldb-dev] Building lldb on Mac command line

Michael Sartain mikesart at valvesoftware.com
Mon Jun 17 08:04:43 PDT 2013

On Sat, Jun 15, 2013 at 7:28 AM, Malea, Daniel <daniel.malea at intel.com>wrote:

> It sounds like a missing “–stdlib=libc++” (or “–std=c++11”) flag …
> probably a bug in the Cmake scripts.
In case this might help anyone else, this is the line that got things
building for me:

cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-std=c++0x
-stdlib=libc++" -C ../llvm/ -G Ninja

> ****
> ** That said, building with cmake on Mac is still maturing – I believe
> there’s still no support for building/signing debugserver – so just the
> ‘lldb’ frontend tool is built which is suitable for remote debugging.
> If you want a full-featured lldb+debugserver on Mac, you still have to
> build with xcode (or xcodebuild from the cmdline) after following the
> code_signing.txt instructions.
I am failing miserably getting it to build with xcode. It's telling me the
link command is failing with what looks like a ton of missing symbols, but
I'm not even sure where I'd start looking on getting that fixed. I've got
the command line build working though - so I think I should be ok assuming
the check-lldb stuff will work from there. Just want to make sure I'm not
breaking anything on the Mac with our Linux changes.


Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)

Target: x86_64-apple-darwin12.4.0

Thread model: posix

-demangle -dynamic -dylib -dylib_compatibility_version 1
-dylib_current_version 300.99.0 -arch x86_64 -dylib_install_name
@rpath/LLDB.framework/LLDB -exported_symbols_list
resources/lldb-framework-exports -macosx_version_min 10.7.0 -single_module
-t -o
-framework Carbon -framework DebugSymbols -lpython -lllvmclang -framework
Foundation -lxml2
-framework CoreFoundation -lobjc -framework Security -lc++ -lSystem

const&, char const*) const in libllvmclang.a(libclangDriver-ToolChains.o)

ld: symbol(s) not found for architecture x86_64


clang: error: linker command failed with exit code 1 (use -v to see
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130617/bca9b345/attachment.html>

More information about the lldb-dev mailing list