<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64018>64018</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
VirtualFileSystem.cpp: fails to build on linux with g++ 7 - `no matching function for call to 'std::_Rb_tree`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
build-problem,
llvm
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
sylvestre
</td>
</tr>
</table>
<pre>
with bionic:
```
/usr/bin/g++-7 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Support -I/build/source/llvm/lib/Support -Iinclude -I/build/source/llvm/include -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fdebug-prefix-map=/build/source/build-llvm=build-llvm -fdebug-prefix-map=/build/source/= -no-canonical-prefixes -no-canonical-prefixes -O3 -DNDEBUG -std=c++1z -fno-exceptions -funwind-tables -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/VirtualFileSystem.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/VirtualFileSystem.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/VirtualFileSystem.cpp.o -c /build/source/llvm/lib/Support/VirtualFileSystem.cpp
In file included from /usr/include/c++/7/map:60:0,
from /build/source/llvm/include/llvm/Support/YAMLParser.h:46,
from /build/source/llvm/lib/Support/VirtualFileSystem.cpp:38:
/usr/include/c++/7/bits/stl_tree.h: In instantiation of 'std::pair<std::_Rb_tree_iterator<_Val>, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(_Arg&&) [with _Arg = std::pair<llvm::StringRef, std::unique_ptr<llvm::vfs::detail::InMemoryNode> >; _Key = std::__cxx11::basic_string<char>; _Val = std::pair<const std::__cxx11::basic_string<char>, std::unique_ptr<llvm::vfs::detail::InMemoryNode> >; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::unique_ptr<llvm::vfs::detail::InMemoryNode> > >; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::unique_ptr<llvm::vfs::detail::InMemoryNode> > >]':
/usr/include/c++/7/bits/stl_map.h:810:57: required from 'std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::insert(_Pair&&) [with _Pair = std::pair<llvm::StringRef, std::unique_ptr<llvm::vfs::detail::InMemoryNode> >; <template-parameter-2-2> = void; _Key = std::__cxx11::basic_string<char>; _Tp = std::unique_ptr<llvm::vfs::detail::InMemoryNode>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::unique_ptr<llvm::vfs::detail::InMemoryNode> > >; typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator = std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, std::unique_ptr<llvm::vfs::detail::InMemoryNode> > >]'
/build/source/llvm/lib/Support/VirtualFileSystem.cpp:752:60: required from here
/usr/include/c++/7/bits/stl_tree.h:2091:28: error: no matching function for call to 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::unique_ptr<llvm::vfs::detail::InMemoryNode> >, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::unique_ptr<llvm::vfs::detail::InMemoryNode> > >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::unique_ptr<llvm::vfs::detail::InMemoryNode> > > >::_M_get_insert_unique_pos(std::pair<llvm::StringRef, std::unique_ptr<llvm::vfs::detail::InMemoryNode> >::first_type&)'
= _M_get_insert_unique_pos(_KeyOfValue()(__v));
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWE1T27oa_jXKRqOMIydOssgixPWZzCHQIRTmrDyy_drRPbLkSjIl_fV3ZJt8QYFC7y2LMhlsSa8evZ-PJDNjeCEBZmh0hkZhj9V2o_TMbMUdGKuhl6hsO_vG7QYnXEmeIn-OvBB5cxR43a9t0qg2GtEo4RLRqED0DNEzMsYkjP-6-BKvL79cLT65Vry-Dhfx4vJifT2_uI5X88XV5Xo_EF1ereaPu8-Xq-W-dyl4gmi0rqtKaYvJ0i1cc5EhGhlV6xQQjYS4K93jRJTLVNQZPD9pJ5Qby9J_SaWVhdQqTYzVShaY3OZKl8xicgtaK438sO0gBtJac7vF5FYqUsvaQEZSVZZMZkRwCYTpoi5BurkZs0AsL8FZGl1eXS-jfzpfIT-kmOSflwtM8jtueMIFt1vCpQMxZMOzDOTB-gdYuVRE8Bxci2QGMLllQjjZe6vZkWYV06wECxqT22-aW3AWclkYTG5TZiz5WjPRzii5MVwWJOcgMsIlt5wJ_h20waSCjEnL01ZSKFk0_zC55WUleMotyZkQdqNVXWw6PLZNgNRyj5S1A1LBfQqVJXZbOd0zEGCBSCXJHde2ZoJkVulW2Lm2dWarogCWOS25zEBaZrmSmOQZZ4VUxvLUkFQJNznPa5m6YRcy9zROjll21IakLkilIef3pGQV8sOn0q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