<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - gcc 5.3: fails with error: implicit instantiation of undefined template 'std::hash<lldb_private::ScratchTypeSystemClang::IsolatedASTKind>'"
href="https://bugs.llvm.org/show_bug.cgi?id=48869">48869</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>gcc 5.3: fails with error: implicit instantiation of undefined template 'std::hash<lldb_private::ScratchTypeSystemClang::IsolatedASTKind>'
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@lists.llvm.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sylvestre@debian.org
</td>
</tr>
<tr>
<th>CC</th>
<td>aprantl@apple.com, jdevlieghere@apple.com, llvm-bugs@lists.llvm.org, teemperor@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>In theory, llvm should support gcc from version 5.1:
<a href="https://llvm.org/docs/GettingStarted.html#software">https://llvm.org/docs/GettingStarted.html#software</a>
but it fails to build using 5.3.1, the version of gcc on Ubuntu Xenial (a LTS).
I think the regressor is <a href="https://reviews.llvm.org/D92759">https://reviews.llvm.org/D92759</a>
apt.llvm.org for xenial has been broke since Dec 10
Full error:
cd
"/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/build-llvm/tools/clang/stage2-bins/tools/lldb/source/Plugins/TypeSystem/Clang"
&&
"/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/build-llvm/./bin/clang++"
-DHAVE_ROUND -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS
-I"/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/build-llvm/tools/clang/stage2-bins/tools/lldb/source/Plugins/TypeSystem/Clang"
-I"/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang"
-I"/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/build-llvm/tools/clang/stage2-bins/tools/lldb/source"
-I"/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/include"
-I"/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/build-llvm/tools/clang/stage2-bins/tools/lldb/include"
-I"/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/build-llvm/tools/clang/stage2-bins/include"
-I"/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/llvm/include"
-I/usr/include/python3.5m
-I"/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/clang/include"
-I"/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/build-llvm/tools/clang/stage2-bins/tools/lldb/../clang/include"
-I"/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/."
-fuse-ld=gold -fPIC -Wno-unused-command-line-argument
-Wno-unknown-warning-option -fPIC -fvisibility-inlines-hidden -Werror=date-time
-Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter
-Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic
-Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default
-Wno-class-memaccess -Wno-noexcept-type -Wnon-virtual-dtor
-Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion
-ffunction-sections -fdata-sections -Wno-deprecated-declarations
-Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register
-Wno-vla-extension -O2 -DNDEBUG -g1 -fno-exceptions -std=c++14 -o
CMakeFiles/lldbPluginTypeSystemClang.dir/TypeSystemClang.cpp.o -c
"/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp"
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:9:
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h:30:
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/./Plugins/ExpressionParser/Clang/ClangPersistentVariables.h:14:
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/./Plugins/ExpressionParser/Clang/ClangExpressionVariable.h:23:
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/include/lldb/Expression/ExpressionVariable.h:17:
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/include/lldb/Core/ValueObject.h:16:
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/include/lldb/Target/Process.h:21:
In file included from
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/unordered_set:47:
In file included from
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/hashtable.h:35:
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/hashtable_policy.h:85:11:
error: implicit instantiation of undefined template
'std::hash<lldb_private::ScratchTypeSystemClang::IsolatedASTKind>'
noexcept(declval<const _Hash&>()(declval<const _Key&>()))>
^
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/type_traits:138:14:
note: in instantiation of template class
'std::__detail::__is_noexcept_hash<lldb_private::ScratchTypeSystemClang::IsolatedASTKind,
std::hash<lldb_private::ScratchTypeSystemClang::IsolatedASTKind>>' requested
here
: public conditional<_B1::value, _B2, _B1>::type
^
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/type_traits:148:39:
note: in instantiation of template class
'std::__and_<std::__is_fast_hash<std::hash<lldb_private::ScratchTypeSystemClang::IsolatedASTKind>>,
std::__detail::__is_noexcept_hash<lldb_private::ScratchTypeSystemClang::IsolatedASTKind,
std::hash<lldb_private::ScratchTypeSystemClang::IsolatedASTKind>>>' requested
here
: public integral_constant<bool, !_Pp::value>
^
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/unordered_map.h:46:34:
note: in instantiation of template class
'std::__not_<std::__and_<std::__is_fast_hash<std::hash<lldb_private::ScratchTypeSystemClang::IsolatedASTKind>>,
std::__detail::__is_noexcept_hash<lldb_private::ScratchTypeSystemClang::IsolatedASTKind,
std::hash<lldb_private::ScratchTypeSystemClang::IsolatedASTKind>>>>' requested
here
typename _Tr = __umap_traits<__cache_default<_Key, _Hash>::value>>
^
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/unordered_map.h:100:15:
note: in instantiation of default argument for
'__umap_hashtable<lldb_private::ScratchTypeSystemClang::IsolatedASTKind,
std::unique_ptr<lldb_private::TypeSystemClang>,
std::hash<lldb_private::ScratchTypeSystemClang::IsolatedASTKind>,
std::equal_to<lldb_private::ScratchTypeSystemClang::IsolatedASTKind>,
std::allocator<std::pair<const
lldb_private::ScratchTypeSystemClang::IsolatedASTKind,
std::unique_ptr<lldb_private::TypeSystemClang>>>>' required here
typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h:1227:7:
note: in instantiation of template class
'std::unordered_map<lldb_private::ScratchTypeSystemClang::IsolatedASTKind,
std::unique_ptr<lldb_private::TypeSystemClang>>' requested here
m_isolated_asts;
^
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/system_error:134:12:
note: template is declared here
struct hash;
^
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:9:
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h:30:
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/./Plugins/ExpressionParser/Clang/ClangPersistentVariables.h:14:
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/./Plugins/ExpressionParser/Clang/ClangExpressionVariable.h:23:
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/include/lldb/Expression/ExpressionVariable.h:17:
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/include/lldb/Core/ValueObject.h:16:
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/include/lldb/Target/Process.h:39:
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/include/lldb/Target/ThreadPlanStack.h:14:
In file included from
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/unordered_map:48:
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/unordered_map.h:522:7:
error: multiple overloads of 'erase' instantiate to the same signature
'std::unordered_map<lldb_private::ScratchTypeSystemClang::IsolatedASTKind,
std::unique_ptr<lldb_private::TypeSystemClang>>::iterator
(std::unordered_map<lldb_private::ScratchTypeSystemClang::IsolatedASTKind,
std::unique_ptr<lldb_private::TypeSystemClang>>::iterator)' (aka 'int (int)')
erase(iterator __position)
^
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h:1227:7:
note: in instantiation of template class
'std::unordered_map<lldb_private::ScratchTypeSystemClang::IsolatedASTKind,
std::unique_ptr<lldb_private::TypeSystemClang>>' requested here
m_isolated_asts;
^
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/unordered_map.h:517:7:
note: previous declaration is here
erase(const_iterator __position)
^
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:9:
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h:1201:47:
error: cannot initialize object parameter of type 'const
lldb_private::TypeSystemClang' with an expression of type 'const
lldb_private::ScratchTypeSystemClang'
return ClassID == &ID || TypeSystemClang::isA(ClassID);
^~~
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:616:12:
error: no viable conversion from returned value of type
'shared_ptr<lldb_private::ScratchTypeSystemClang>' to function return type
'shared_ptr<lldb_private::TypeSystem>'
return std::make_shared<ScratchTypeSystemClang>(*target, triple);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/shared_ptr.h:107:7:
note: candidate constructor not viable: no known conversion from
'shared_ptr<lldb_private::ScratchTypeSystemClang>' to 'const
std::shared_ptr<lldb_private::TypeSystem> &' for 1st argument
shared_ptr(const shared_ptr&) noexcept = default;
^
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/shared_ptr.h:229:7:
note: candidate constructor not viable: no known conversion from
'shared_ptr<lldb_private::ScratchTypeSystemClang>' to
'std::shared_ptr<lldb_private::TypeSystem> &&' for 1st argument
shared_ptr(shared_ptr&& __r) noexcept
^
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/shared_ptr.h:269:17:
note: candidate constructor not viable: no known conversion from
'shared_ptr<lldb_private::ScratchTypeSystemClang>' to 'std::nullptr_t' (aka
'nullptr_t') for 1st argument
constexpr shared_ptr(nullptr_t) noexcept : shared_ptr() { }
^
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/shared_ptr.h:221:2:
note: candidate template ignored: requirement
'is_convertible<lldb_private::ScratchTypeSystemClang *,
lldb_private::TypeSystem *>::value' was not satisfied [with _Tp1 =
lldb_private::ScratchTypeSystemClang]
shared_ptr(const shared_ptr<_Tp1>& __r) noexcept
^
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/shared_ptr.h:238:2:
note: candidate template ignored: requirement
'is_convertible<lldb_private::ScratchTypeSystemClang *,
lldb_private::TypeSystem *>::value' was not satisfied [with _Tp1 =
lldb_private::ScratchTypeSystemClang]
shared_ptr(shared_ptr<_Tp1>&& __r) noexcept
^
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/shared_ptr.h:255:2:
note: candidate template ignored: could not match 'auto_ptr' against
'shared_ptr'
shared_ptr(std::auto_ptr<_Tp1>&& __r);
^
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/shared_ptr.h:262:2:
note: candidate template ignored: could not match 'unique_ptr' against
'shared_ptr'
shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r)
^
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/shared_ptr.h:116:11:
note: explicit constructor is not a candidate
explicit shared_ptr(_Tp1* __p)
^
/usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/shared_ptr.h:250:11:
note: explicit constructor is not a candidate
explicit shared_ptr(const weak_ptr<_Tp1>& __r)
^
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:9586:46:
error: non-const lvalue reference to type 'lldb_private::TypeSystemClang'
cannot bind to a value of unrelated type 'lldb_private::ScratchTypeSystemClang'
m_scratch_ast_source_up->InstallASTContext(*this);
^~~~~
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/./Plugins/ExpressionParser/Clang/ClangASTSource.h:64:43:
note: passing argument to parameter 'ast_context' here
void InstallASTContext(TypeSystemClang &ast_context);
^
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:9589:3:
error: cannot initialize object parameter of type
'lldb_private::TypeSystemClang' with an expression of type
'lldb_private::ScratchTypeSystemClang'
SetExternalSource(proxy_ast_source);
^~~~~~~~~~~~~~~~~
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:9593:20:
error: cannot initialize object parameter of type
'lldb_private::TypeSystemClang' with an expression of type
'lldb_private::ScratchTypeSystemClang'
TypeSystemClang::Finalize();
^~~~~~~~
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:9612:12:
error: cannot initialize return object of type 'lldb_private::TypeSystemClang
*' with an rvalue of type 'lldb_private::ScratchTypeSystemClang *'
return &scratch_ast;
^~~~~~~~~~~~
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:9663:26:
error: cannot initialize object parameter of type
'lldb_private::TypeSystemClang' with an expression of type
'lldb_private::ScratchTypeSystemClang'
importer.ForgetSource(&getASTContext(), src_ctx);
^~~~~~~~~~~~~
In file included from
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:9:
/build/llvm-toolchain-snapshot-12~++20210125020813+f4537935dcdb/lldb/source/./Plugins/TypeSystem/Clang/TypeSystemClang.h:1227:7:
warning: private field 'm_isolated_asts' is not used [-Wunused-private-field]
m_isolated_asts;
^
1 warning and 9 errors generated.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>