Describe the bug
Compilation fails with:
[ 33%] Building CXX object hphp/runtime/CMakeFiles/hphp_runtime_static.dir/base/unit-cache.cpp.o
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/stl_pair.h:59,
from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/string:40,
from /hhvm/hphp/runtime/base/stream-wrapper.h:20,
from /hhvm/hphp/runtime/base/unit-cache.h:19,
from /hhvm/hphp/runtime/base/unit-cache.cpp:16:
/usr/include/c++/10/type_traits: In instantiation of ‘struct std::is_default_constructible’:
/usr/include/c++/10/type_traits:143:12: required from ‘struct std::_and<std::is_default_constructible, std::is_default_constructible<HPHP::RankedCHM<const HPHP::StringData*, HPHP::{anonymous}::CachedUnitNonRepo, HPHP::StringDataHashCompare, HPHP::RankUnitCache>>, std::_not<std::_and<std::__is_implicitly_default_constructible, std::__is_implicitly_default_constructible<HPHP::RankedCHM<const HPHP::StringData, HPHP::{anonymous}::CachedUnitNonRepo, HPHP::StringDataHashCompare, HPHP::RankUnitCache>> > > >’
/usr/include/c++/10/bits/stl_pair.h:244:59: required by substitution of ‘template<class _U1, class _U2, typename std::enable_if<std::_and<std::is_default_constructible<_U1>, std::is_default_constructible<_U2>, std::_not<std::_and<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> > > >::value, bool>::type > constexpr std::pair<const unsigned int, HPHP::RankedCHM<const HPHP::StringData, HPHP::{anonymous}::CachedUnitNonRepo, HPHP::StringDataHashCompare, HPHP::RankUnitCache>>::pair() [with _U1 = const unsigned int; _U2 = HPHP::RankedCHM<const HPHP::StringData, HPHP::{anonymous}::CachedUnitNonRepo, HPHP::StringDataHashCompare, HPHP::RankUnitCache>*; typename std::enable_if<std::_and<std::is_default_constructible<_U1>, std::is_default_constructible<_U2>, std::_not<std::_and<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> > > >::value, bool>::type = ]’
/hhvm/build/third-party/folly/bundled_folly-prefix/include/folly/AtomicHashArray-inl.h:63:19: required from here
/usr/include/c++/10/type_traits:918:52: error: non-constant condition for static assertion
918 | static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/type_traits:918: confused by earlier errors, bailing out
make[2]: *** [hphp/runtime/CMakeFiles/hphp_runtime_static.dir/build.make:1733: hphp/runtime/CMakeFiles/hphp_runtime_static.dir/base/unit-cache.cpp.o] Error 1
make[2]: Leaving directory '/hhvm/build'
make[1]: *** [CMakeFiles/Makefile2:2550: hphp/runtime/CMakeFiles/hphp_runtime_static.dir/all] Error 2
make[1]: Leaving directory '/hhvm/build'
make: *** [Makefile:130: all] Error 2
Standalone code, or other way to reproduce the problem
cmake -DMYSQL_UNIX_SOCK_ADDR=/var/run/mysqld/mysqld.sock -DCMAKE_BUILD_TYPE=Debug ..
make
Expected behavior
compiles correctly
Actual behavior
fails with error above
Environment
Ubuntu 20.04
gcc 10.3
aarch64
Additional context
This problem does not occur when compiling a non-debug build