Unable to build lldb 3.5

Our sys admin has been unsuccessful building lldb 3.5 on CentOS 6.5. We are trying to install it for the first time, because we are compiling software with clang 3.5, and TotalView does not yet support the weird debug info produced by clang. We hope that lldb will do better.

He was unable to build lldb 3.5 with clang 3.5, so he is using gcc 4.8.3, which we are using as the gcc-toolchain for clang builds. It dies with this error:

llvm[2]: Compiling SBDebugger.cpp for Release+Asserts build
/usr/local/src/llvm-3.5.0.src/tools/lldb/source/API/SBDebugger.cpp: In function ‘llvm::sys::DynamicLibrary LoadPlugin(const DebuggerSP&, const lldb_private::FileSpec&, lldb_private::Error&)’:
/usr/local/src/llvm-3.5.0.src/tools/lldb/source/API/SBDebugger.cpp:87:137: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [-Wpedantic]
          LLDBCommandPluginInit init_func = (LLDBCommandPluginInit)dynlib.getAddressOfSymbol("_ZN4lldb16PluginInitializeENS_10SBDebuggerE");
In file included from /usr/local/src/llvm-3.5.0.src/tools/lldb/source/API/SBDebugger.cpp:47:0:
/usr/local/src/llvm-3.5.0.src/include/llvm/Support/DynamicLibrary.h:46:14: error: ‘llvm::sys::DynamicLibrary::DynamicLibrary(void*)’ is private
      explicit DynamicLibrary(void *data = &Invalid) : Data(data) {}
/usr/local/src/llvm-3.5.0.src/tools/lldb/source/API/SBDebugger.cpp:107:38: error: within this context
      return llvm::sys::DynamicLibrary();

How can we download, build, and install a version of lldb that will debug our clang-3.5-built software on CentOS 6.5?

Have you tried checking out LLDB trunk?
As far as I know, for LLDB specifically, the LLVM versioning does not mark any specific stable release point - following trunk (or at least something reasonably close to trunk) is usually a good bet though - at least, if that is broken, somebody will chime in and fix it!

Thanks. I’ll recommend that to my guy. We didn’t realize that lldb wasn’t vetted the way clang is for an llvm release.

I misunderstood what my sys admin told me. He was building lldb from the trunk, when g++ 4.8.3 gave that error. Has there been a fix for it in the last few days? How do I report a bug like this?

To be honest, things have been compiling just fine around here for a while, but I work on OS X with clang, so your luck may vary.

Do you have a trunk LLVM as well?
As for bugs, LLVM has a bugzilla you could use.

Yes, he is building from the LLVM trunk. I’ll look for the bugzilla site.

If I have this correct, you want LLDB to be able to debug software compiled with clang 3.5. You don’t care what version LLDB is built against, it just has to be able to debug clang 3.5 executables.

If this is the case, you will need to create a separate repository for building clang and lldb. The repository you build LLDB against should have LLVM, clang, and LLDB all at trunk. You can still build clang against 3.5 in your separate repository.

The issue here seems to be that an API change was made in LLVM 3.5 which LLDB at trunk won’t build against.