[cfe-dev] Serious problem building LLDB to go with Clang 3.5 on Ubuntu 12.04

Fletcher, John P j.p.fletcher at aston.ac.uk
Tue Dec 31 04:21:43 PST 2013

I have Clang and use it a lot.  I want to move to Clang 3.5 so that I can work with c++1y.

My system is Ubuntu Linux 12.04 which has gcc 4.6 as its standard compiler.  This does not have support for c++1y and so I have built libc++.  I installed this with libcxxrt which is one of the options for that and have been using libc++ for some time, including an svn release to accompany clang.

My problems have started when I wanted to build LLDB as well, so I obtained the latest trunk SVN (198208).

This will not build with libstdc++ from GCC 4.6 as LLDB uses the 'emplace' member of map which is not supported by GCC 4.6:
llvm[4]: Compiling TypeFormat.cpp for Release+Asserts build
/home/fletcher/LLVM/llvm-3.5.svn/llvm/tools/lldb/source/DataFormatters/TypeFormat.cpp:196:25: error: 
      no member named 'emplace' in 'std::map<void *, lldb_private::ClangASTType,
      std::less<void *>, std::allocator<std::pair<void *const, lldb_private::ClangASTType> >
                ~~~~~~~ ^
1 error generated.
So I have to move to libc++ to build LLDB

Unfortunately, as far as I can see, this needs the libc++abi rather than the libcxxrt version, so I have had problems with that, now overcome.

The killer problem is that liblldb.so will not link, which is caused by the incompatibility of the std::string definitions.  I could not understand why it would not link until I read this:


It looks to me as though the current LLDB is not buildable on Ubuntu 12.04 without adding a newer version of libstdc++ as it will not build with libc++ on 12.04

This would be solved if it had an option not to use map.emplace so that it would work with gcc 4.6

I don't think there is much more I can do unless I were to start actually messing with the code of LLDB.

Please help.  I am not on LLVM-dev which may be where this should be.

Happy New Year

John Fletcher

More information about the cfe-dev mailing list