[lldb-dev] lldb 3.4 rc1 is failing with gcc 4.6

Sylvestre Ledru sylvestre at debian.org
Sun Nov 24 03:15:55 PST 2013


Hello,

I am working on the port of lldb on the various Debian architectures
[1]. On some of them (sparc, s390x, powerpc, ia64, ...),
the version of gcc used is 4.6 and lldb fails to build because of this
declaration.
    Mutex *m_mutex = nullptr;
in include/lldb/Utility/Iterable.h

It fails with:

/«BUILDDIR»/llvm-toolchain-3.4-3.4~+rc1/tools/lldb/source/../include/lldb/Utility/Iterable.h:197:22: sorry, unimplemented: non-static data member initializers
/«BUILDDIR»/llvm-toolchain-3.4-3.4~+rc1/tools/lldb/source/../include/lldb/Utility/Iterable.h:197:22: error: 'constexpr' needed for in-class initialization of static data member 'm_mutex' of non-integral type
/«BUILDDIR»/llvm-toolchain-3.4-3.4~+rc1/tools/lldb/source/../include/lldb/Utility/Iterable.h: In constructor 'lldb_private::LockingAdaptedIterable<C, E, A>::LockingAdaptedIterable(C&, lldb_private::Mutex&)':
/«BUILDDIR»/llvm-toolchain-3.4-3.4~+rc1/tools/lldb/source/../include/lldb/Utility/Iterable.h:201:9: error: class 'lldb_private::LockingAdaptedIterable<C, E, A>' does not have any field named 'm_mutex'
/«BUILDDIR»/llvm-toolchain-3.4-3.4~+rc1/tools/lldb/source/../include/lldb/Utility/Iterable.h:203:9: error: 'm_mutex' was not declared in this scope
/«BUILDDIR»/llvm-toolchain-3.4-3.4~+rc1/tools/lldb/source/../include/lldb/Utility/Iterable.h: In constructor 'lldb_private::LockingAdaptedIterable<C, E, A>::LockingAdaptedIterable(lldb_private::LockingAdaptedIterable<C, E, A>&&)':
/«BUILDDIR»/llvm-toolchain-3.4-3.4~+rc1/tools/lldb/source/../include/lldb/Utility/Iterable.h:208:9: error: class 'lldb_private::LockingAdaptedIterable<C, E, A>' does not have any field named 'm_mutex'
/«BUILDDIR»/llvm-toolchain-3.4-3.4~+rc1/tools/lldb/source/../include/lldb/Utility/Iterable.h: In destructor 'lldb_private::LockingAdaptedIterable<C, E, A>::~LockingAdaptedIterable()':
/«BUILDDIR»/llvm-toolchain-3.4-3.4~+rc1/tools/lldb/source/../include/lldb/Utility/Iterable.h:215:13: error: 'm_mutex' was not declared in this scope


Is there a workaround to tackle this limitation ? I could switch to gcc
4.8 but it would break the backport of lldb on http://llvm.org/apt/
(especially on old Ubuntu without gcc 4.8)

Thanks,
Sylvestre



[1] https://buildd.debian.org/status/package.php?p=llvm-toolchain-3.4



More information about the lldb-dev mailing list