[llvm-bugs] [Bug 48869] New: gcc 5.3: fails with error: implicit instantiation of undefined template 'std::hash<lldb_private::ScratchTypeSystemClang::IsolatedASTKind>'
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jan 25 01:08:36 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=48869
Bug ID: 48869
Summary: gcc 5.3: fails with error: implicit instantiation of
undefined template
'std::hash<lldb_private::ScratchTypeSystemClang::Isola
tedASTKind>'
Product: lldb
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: release blocker
Priority: P
Component: All Bugs
Assignee: lldb-dev at lists.llvm.org
Reporter: sylvestre at debian.org
CC: aprantl at apple.com, jdevlieghere at apple.com,
llvm-bugs at lists.llvm.org, teemperor at gmail.com
In theory, llvm should support gcc from version 5.1:
https://llvm.org/docs/GettingStarted.html#software
but it fails to build using 5.3.1, the version of gcc on Ubuntu Xenial (a LTS).
I think the regressor is https://reviews.llvm.org/D92759
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210125/897a4d8b/attachment-0001.html>
More information about the llvm-bugs
mailing list