Problems with LLDB for Ubuntu 12.04

I have spent a long time over the last few days doing the 'easy' thing of installing LLDB on my computer system.

I had intended to use the LLVM/Clang 3.4 release which was due out on 23rd December 2013. Although that date has now gone from the web site 3.4 the release has not appeared. So I have started to work with the 3.5 svn trunk codes.

I use Ubuntu 12.04 which Ubuntu regard as a release with long term stability, which suits me as mainly a user rather than a developer of compilers etc. That uses gcc 4.6, which does not support c++1y much at all. Hence my use of clang, with much enthusiasm, as I want to use c++1y.

The current release of LLDB will not build with gcc 4.6 because of the use of features which are in the new standard but not supported in gcc 4.6 version of libstdc++.

It will also not build with the current clang/libc++ combination either, as it all compiles but will not link the main library because it is trying to use both libc++ and libstdc++ string at the same time which is impossible.

So what Ubuntu regard as a long term stable system is not supported by LLDB.

This is reflected in discussion on lldb-dev but not in the build instructions on the web site. There has been some discussion about the need to install a later gcc such as 4.8.

I think it would be very helpful if the different parts of LLVM would be clear about which compilers are supported.

Thank you

John Fletcher

Here is a message which I posted to cfe-users, and I am reposting it here as probably the right place for it.

This is from something else which I posted on cfe-dev:

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:

http://stackoverflow.com/questions/12542971/using-libstdc-compiled-libraries-with-clang-stdlib-libc

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 have tried with versions of libc++ built with either libc++abi or libcxxrt in case that made a difference. It did not.

It would be helpful to know

a) What is the last version of LLDB which will build with gcc 4.6?

b) Will that be useful for working with more recent clang 3.5 with c++1y?

Thank you

John Fletcher

I note from the release notes for LLVM 3.4 that gcc 4.6 is not on the supported compiler list for this release, and won't be for future releases. I have explained below that at the moment with the 3.5 svn release I cannot get LLDB to compile using clang and libc++ and it will not compile with gcc 4.6. I asked two questions which have had so far no response:

a) What is the last version of LLDB which will build with gcc 4.6?

b) Will that be useful for working with more recent clang 3.5 with c++1y?

I note from the release of 3.4 there is a binary for llvm+clang for Ubuntu 12.04. It would be very helpful if there could also be a binary release of LLDB for the same system as it is not possible at the moment to build LLDB on 12.04 without installing extra compilers.

Ubuntu 12.04 is intended by Ubuntu to be a 'Long Term Support' version, so it would be helpful if LLDB/LLVM would go along with the spirit of that and fill in the gaps in the tools.

Best wishes

John Fletcher

I note from the release notes for LLVM 3.4 that gcc 4.6 is not on the supported compiler list for this release,

By “this release”, do you mean the (~6 months away) 3.5 release? GCC 4.6 is supported for Clang 3.4 (the current stable release, released earlier today).

Richard

My apologies, I misread the paragraph in the release notes for 3.4. The reference to 4.7.x is for the next release.

The piece that particularly interests me is LLDB. I was waiting over Christmas for the 3.4 release and instead started using the current SVN codes.

Does this mean that the 3.4 release of LLDB will build with gcc 4.6?

The current LLDB (3.5 svn) I cannot get to build with an uptodate clang and libc++ because somewhere in the code it still wants the libstdc++ string library.

Thank you

John