google-deepmind / code_contests

Apache License 2.0
2.1k stars 208 forks source link

Compilation error when using gcc versions {7,9} #26

Open wangdeze18 opened 1 year ago

wangdeze18 commented 1 year ago

Python: 3.6.15 Bazel 5.0.0

I followed the readme (bazel run -c opt :print_names_and_sources C:\tmp\dm-code_contests\dm-code_contests/code_contests_valid.riegeli), but met following errors. Both gcc-7/gcc-9 does not work.

` ERROR: /root/.cache/bazel/_bazel_root/4c0c9775f3bba9ff6053ea6ee19afc7d/external/com_google_riegeli/riegeli/base/BUILD:85:11: Compiling riegeli/base/buffer.cc failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 25 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox In file included from external/com_google_riegeli/riegeli/base/memory.h:26, from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/base.h:313:10: error: 'std::enable_if_t' has not been declared 313 | std::enable_if_t<std::is_unsigned::value && std::is_unsigned::value, | ^~~ external/com_google_riegeli/riegeli/base/base.h:313:21: error: expected '>' before '<' token 313 | std::enable_if_t<std::is_unsigned::value && std::is_unsigned::value, | ^ external/com_google_riegeli/riegeli/base/base.h:322:16: error: 'std::enable_if_t' has not been declared 322 | std::enable_if_t< | ^~~ external/com_google_riegeli/riegeli/base/base.h:322:27: error: expected '>' before '<' token 322 | std::enable_if_t< | ^ external/com_google_riegeli/riegeli/base/base.h:324:10: error: redefinition of 'template<class A, class B, > A riegeli::IntCast(B)' 324 | inline A IntCast(B value) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:315:10: note: 'template<class A, class B, > A riegeli::IntCast(B)' previously declared here 315 | inline A IntCast(B value) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:333:16: error: 'std::enable_if_t' has not been declared 333 | std::enable_if_t< | ^~~ external/com_google_riegeli/riegeli/base/base.h:333:27: error: expected '>' before '<' token 333 | std::enable_if_t< | ^ external/com_google_riegeli/riegeli/base/base.h:335:10: error: redefinition of 'template<class A, class B, > A riegeli::IntCast(B)' 335 | inline A IntCast(B value) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:315:10: note: 'template<class A, class B, > A riegeli::IntCast(B)' previously declared here 315 | inline A IntCast(B value) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:343:16: error: 'std::enable_if_t' has not been declared 343 | std::enable_if_t<std::is_signed::value && std::is_signed::value, | ^~~ external/com_google_riegeli/riegeli/base/base.h:343:27: error: expected '>' before '<' token 343 | std::enable_if_t<std::is_signed::value && std::is_signed::value, | ^ external/com_google_riegeli/riegeli/base/base.h:345:10: error: redefinition of 'template<class A, class B, > A riegeli::IntCast(B)' 345 | inline A IntCast(B value) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:315:10: note: 'template<class A, class B, > A riegeli::IntCast(B)' previously declared here 315 | inline A IntCast(B value) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:358:10: error: 'std::enable_if_t' has not been declared 358 | std::enable_if_t<std::is_unsigned::value && std::is_unsigned::value, | ^~~ external/com_google_riegeli/riegeli/base/base.h:358:21: error: expected '>' before '<' token 358 | std::enable_if_t<std::is_unsigned::value && std::is_unsigned::value, | ^ external/com_google_riegeli/riegeli/base/base.h:368:16: error: 'std::enable_if_t' has not been declared 368 | std::enable_if_t< | ^~~ external/com_google_riegeli/riegeli/base/base.h:368:27: error: expected '>' before '<' token 368 | std::enable_if_t< | ^ external/com_google_riegeli/riegeli/base/base.h:370:10: error: redefinition of 'template<class A, class B, > A riegeli::SaturatingIntCast(B)' 370 | inline A SaturatingIntCast(B value) { | ^~~~~ external/com_google_riegeli/riegeli/base/base.h:360:10: note: 'template<class A, class B, > A riegeli::SaturatingIntCast(B)' previously declared here 360 | inline A SaturatingIntCast(B value) { | ^~~~~ external/com_google_riegeli/riegeli/base/base.h:380:16: error: 'std::enable_if_t' has not been declared 380 | std::enable_if_t< | ^~~ external/com_google_riegeli/riegeli/base/base.h:380:27: error: expected '>' before '<' token 380 | std::enable_if_t< | ^ external/com_google_riegeli/riegeli/base/base.h:382:10: error: redefinition of 'template<class A, class B, > A riegeli::SaturatingIntCast(B)' 382 | inline A SaturatingIntCast(B value) { | ^~~~~ external/com_google_riegeli/riegeli/base/base.h:360:10: note: 'template<class A, class B, > A riegeli::SaturatingIntCast(B)' previously declared here 360 | inline A SaturatingIntCast(B value) { | ^~~~~ external/com_google_riegeli/riegeli/base/base.h:391:16: error: 'std::enable_if_t' has not been declared 391 | std::enable_if_t<std::is_signed::value && std::is_signed::value, | ^~~ external/com_google_riegeli/riegeli/base/base.h:391:27: error: expected '>' before '<' token 391 | std::enable_if_t<std::is_signed::value && std::is_signed::value, | ^ external/com_google_riegeli/riegeli/base/base.h:393:10: error: redefinition of 'template<class A, class B, > A riegeli::SaturatingIntCast(B)' 393 | inline A SaturatingIntCast(B value) { | ^~~~~ external/com_google_riegeli/riegeli/base/base.h:360:10: note: 'template<class A, class B, > A riegeli::SaturatingIntCast(B)' previously declared here 360 | inline A SaturatingIntCast(B value) { | ^~~~~ external/com_google_riegeli/riegeli/base/base.h:415:28: error: 'std::enable_if_t' has not been declared 415 | template <typename A, std::enable_if_t<std::is_signed::value, int> = 0> | ^~~ external/com_google_riegeli/riegeli/base/base.h:415:39: error: expected '>' before '<' token 415 | template <typename A, std::enable_if_t<std::is_signed::value, int> = 0> | ^ external/com_google_riegeli/riegeli/base/base.h:421:16: error: 'std::enable_if_t' has not been declared 421 | std::enable_if_t<std::is_signed::value && std::is_signed::value, | ^~~ external/com_google_riegeli/riegeli/base/base.h:421:27: error: expected '>' before '<' token 421 | std::enable_if_t<std::is_signed::value && std::is_signed::value, | ^ external/com_google_riegeli/riegeli/base/base.h:423:16: error: 'common_type_t' in namespace 'std' does not name a template type; did you mean 'common_type'? 423 | constexpr std::common_type_t<A, B> SignedMin(A a, B b) { | ^~~~~ | common_type external/com_google_riegeli/riegeli/base/base.h:429:10: error: 'std::enable_if_t' has not been declared 429 | std::enable_if_t<(sizeof...(Rest) > 0 && | ^~~ external/com_google_riegeli/riegeli/base/base.h:429:21: error: expected '>' before '<' token 429 | std::enable_if_t<(sizeof...(Rest) > 0 && | ^ external/com_google_riegeli/riegeli/base/base.h:433:16: error: 'common_type_t' in namespace 'std' does not name a template type; did you mean 'common_type'? 433 | constexpr std::common_type_t<A, B, Rest...> SignedMin(A a, B b, Rest... rest) { | ^~~~~ | common_type external/com_google_riegeli/riegeli/base/base.h:440:28: error: 'std::enable_if_t' has not been declared 440 | template <typename A, std::enable_if_t<std::is_signed::value, int> = 0> | ^~~ external/com_google_riegeli/riegeli/base/base.h:440:39: error: expected '>' before '<' token 440 | template <typename A, std::enable_if_t<std::is_signed::value, int> = 0> | ^ external/com_google_riegeli/riegeli/base/base.h:446:16: error: 'std::enable_if_t' has not been declared 446 | std::enable_if_t<std::is_signed::value && std::is_signed::value, | ^~~ external/com_google_riegeli/riegeli/base/base.h:446:27: error: expected '>' before '<' token 446 | std::enable_if_t<std::is_signed::value && std::is_signed::value, | ^ external/com_google_riegeli/riegeli/base/base.h:448:16: error: 'common_type_t' in namespace 'std' does not name a template type; did you mean 'common_type'? 448 | constexpr std::common_type_t<A, B> SignedMax(A a, B b) { | ^~~~~ | common_type external/com_google_riegeli/riegeli/base/base.h:454:10: error: 'std::enable_if_t' has not been declared 454 | std::enable_if_t<(sizeof...(Rest) > 0 && | ^~~ external/com_google_riegeli/riegeli/base/base.h:454:21: error: expected '>' before '<' token 454 | std::enable_if_t<(sizeof...(Rest) > 0 && | ^ external/com_google_riegeli/riegeli/base/base.h:458:16: error: 'common_type_t' in namespace 'std' does not name a template type; did you mean 'common_type'? 458 | constexpr std::common_type_t<A, B, Rest...> SignedMax(A a, B b, Rest... rest) { | ^~~~~ | common_type external/com_google_riegeli/riegeli/base/base.h:500:49: error: 'common_type_t' is not a member of 'std'; did you mean 'common_type'? 500 | : internal::IntersectionTypeImpl<A, B, std::common_type_t<A, B>> {}; | ^~~~~ | common_type external/com_google_riegeli/riegeli/base/base.h:500:49: error: 'common_type_t' is not a member of 'std'; did you mean 'common_type'? 500 | : internal::IntersectionTypeImpl<A, B, std::common_type_t<A, B>> {}; | ^~~~~ | common_type external/com_google_riegeli/riegeli/base/base.h:500:66: error: wrong number of template arguments (4, should be 3) 500 | : internal::IntersectionTypeImpl<A, B, std::common_type_t<A, B>> {}; | ^ external/com_google_riegeli/riegeli/base/base.h:468:8: note: provided for 'template<class A, class B, class Common> struct riegeli::internal::IntersectionTypeImpl' 468 | struct IntersectionTypeImpl; | ^~~~~~~~ external/com_google_riegeli/riegeli/base/base.h:500:67: error: expected '{' before '>' token 500 | : internal::IntersectionTypeImpl<A, B, std::common_type_t<A, B>> {}; | ^~ external/com_google_riegeli/riegeli/base/base.h:506:28: error: 'std::enable_if_t' has not been declared 506 | template <typename A, std::enable_if_t<std::is_unsigned::value, int> = 0> | ^~~ external/com_google_riegeli/riegeli/base/base.h:506:39: error: expected '>' before '<' token 506 | template <typename A, std::enable_if_t<std::is_unsigned::value, int> = 0> | ^ external/com_google_riegeli/riegeli/base/base.h:513:10: error: 'std::enable_if_t' has not been declared 513 | std::enable_if_t<std::is_unsigned::value && std::is_unsigned::value, | ^~~ external/com_google_riegeli/riegeli/base/base.h:513:21: error: expected '>' before '<' token 513 | std::enable_if_t<std::is_unsigned::value && std::is_unsigned::value, | ^ external/com_google_riegeli/riegeli/base/base.h:520:16: error: 'std::enable_if_t' has not been declared 520 | std::enable_if_t< | ^~~ external/com_google_riegeli/riegeli/base/base.h:520:27: error: expected '>' before '<' token 520 | std::enable_if_t< | ^ external/com_google_riegeli/riegeli/base/base.h:532:28: error: 'std::enable_if_t' has not been declared 532 | template <typename A, std::enable_if_t<std::is_unsigned::value, int> = 0> | ^~~ external/com_google_riegeli/riegeli/base/base.h:532:39: error: expected '>' before '<' token 532 | template <typename A, std::enable_if_t<std::is_unsigned::value, int> = 0> | ^ external/com_google_riegeli/riegeli/base/base.h:539:10: error: 'std::enable_if_t' has not been declared 539 | std::enable_if_t<std::is_unsigned::value && std::is_unsigned::value, | ^~~ external/com_google_riegeli/riegeli/base/base.h:539:21: error: expected '>' before '<' token 539 | std::enable_if_t<std::is_unsigned::value && std::is_unsigned::value, | ^ external/com_google_riegeli/riegeli/base/base.h:541:16: error: 'common_type_t' in namespace 'std' does not name a template type; did you mean 'common_type'? 541 | constexpr std::common_type_t<A, B> UnsignedMax(A a, B b) { | ^~~~~ | common_type external/com_google_riegeli/riegeli/base/base.h:546:16: error: 'std::enable_if_t' has not been declared 546 | std::enable_if_t< | ^~~ external/com_google_riegeli/riegeli/base/base.h:546:27: error: expected '>' before '<' token 546 | std::enable_if_t< | ^ external/com_google_riegeli/riegeli/base/base.h:551:16: error: 'common_type_t' in namespace 'std' does not name a template type; did you mean 'common_type'? 551 | constexpr std::common_type_t<A, B, Rest...> UnsignedMax(A a, B b, | ^~~~~ | common_type external/com_google_riegeli/riegeli/base/base.h:559:28: error: 'std::enable_if_t' has not been declared 559 | template <typename T, std::enable_if_t<std::is_unsigned::value, int> = 0> | ^~~ external/com_google_riegeli/riegeli/base/base.h:559:39: error: expected '>' before '<' token 559 | template <typename T, std::enable_if_t<std::is_unsigned::value, int> = 0> | ^ external/com_google_riegeli/riegeli/base/base.h:564:28: error: 'std::enable_if_t' has not been declared 564 | template <typename T, std::enable_if_t<std::is_unsigned::value, int> = 0> | ^~~ external/com_google_riegeli/riegeli/base/base.h:564:39: error: expected '>' before '<' token 564 | template <typename T, std::enable_if_t<std::is_unsigned::value, int> = 0> | ^ external/com_google_riegeli/riegeli/base/base.h:571:10: error: 'std::enable_if_t' has not been declared 571 | std::enable_if_t<(sizeof...(Rest) > 0 && | ^~~ external/com_google_riegeli/riegeli/base/base.h:571:21: error: expected '>' before '<' token 571 | std::enable_if_t<(sizeof...(Rest) > 0 && | ^ external/com_google_riegeli/riegeli/base/base.h:581:28: error: 'std::enable_if_t' has not been declared 581 | template <typename T, std::enable_if_t<std::is_unsigned::value, int> = 0> | ^~~ external/com_google_riegeli/riegeli/base/base.h:581:39: error: expected '>' before '<' token 581 | template <typename T, std::enable_if_t<std::is_unsigned::value, int> = 0> | ^ external/com_google_riegeli/riegeli/base/base.h:589:16: error: 'std::enable_if_t' has not been declared 589 | std::enable_if_t<std::is_unsigned::value && alignment != 0 && | ^~~ external/com_google_riegeli/riegeli/base/base.h:589:27: error: expected '>' before '<' token 589 | std::enable_if_t<std::is_unsigned::value && alignment != 0 && | ^ external/com_google_riegeli/riegeli/base/base.h:599:16: error: 'std::enable_if_t' has not been declared 599 | std::enable_if_t<std::is_unsigned::value && alignment != 0 && | ^~~ external/com_google_riegeli/riegeli/base/base.h:599:27: error: expected '>' before '<' token 599 | std::enable_if_t<std::is_unsigned::value && alignment != 0 && | ^ external/com_google_riegeli/riegeli/base/base.h:611:10: error: 'common_type_t' in namespace 'std' does not name a template type; did you mean 'common_type'? 611 | std::common_type_t<size_t, std::make_unsigned_t, uint64_t>; | ^~~~~ | common_type external/com_google_riegeli/riegeli/base/base.h:673:47: error: 'Position' has not been declared 673 | inline size_t BufferLength(size_t min_length, Position recommended_length, | ^~~~ external/com_google_riegeli/riegeli/base/base.h:674:47: error: 'Position' has not been declared 674 | size_t max_length, Position size_hint, | ^~~~ external/com_google_riegeli/riegeli/base/base.h:675:28: error: 'Position' has not been declared 675 | Position current_size) { | ^~~~ external/com_google_riegeli/riegeli/base/base.h: In function 'size_t riegeli::BufferLength(size_t, int, size_t, int, int)': external/com_google_riegeli/riegeli/base/base.h:677:64: error: no matching function for call to 'UnsignedMin(int&, size_t&)' 677 | return UnsignedMax(UnsignedMin(recommended_length, max_length), min_length); | ^ external/com_google_riegeli/riegeli/base/base.h:507:13: note: candidate: 'template<class A, > constexpr A riegeli::UnsignedMin(A)' 507 | constexpr A UnsignedMin(A a) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:507:13: note: template argument deduction/substitution failed: external/com_google_riegeli/riegeli/base/base.h:677:64: note: candidate expects 1 argument, 2 provided 677 | return UnsignedMax(UnsignedMin(recommended_length, max_length), min_length); | ^ external/com_google_riegeli/riegeli/base/base.h:515:35: note: candidate: 'template<class A, class B, > constexpr riegeli::IntersectionTypeT<A, B> riegeli::UnsignedMin(A, B)' 515 | constexpr IntersectionTypeT<A, B> UnsignedMin(A a, B b) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:515:35: note: template argument deduction/substitution failed: external/com_google_riegeli/riegeli/base/base.h:677:64: note: couldn't deduce template parameter '' 677 | return UnsignedMax(UnsignedMin(recommended_length, max_length), min_length); | ^ external/com_google_riegeli/riegeli/base/base.h:525:44: note: candidate: 'template<class A, class B, class ... Rest, > constexpr riegeli::IntersectionTypeT<A, B, Rest ...> riegeli::UnsignedMin(A, B, Rest ...)' 525 | constexpr IntersectionTypeT<A, B, Rest...> UnsignedMin(A a, B b, Rest... rest) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:525:44: note: template argument deduction/substitution failed: external/com_google_riegeli/riegeli/base/base.h:677:64: note: couldn't deduce template parameter '' 677 | return UnsignedMax(UnsignedMin(recommended_length, max_length), min_length); | ^ external/com_google_riegeli/riegeli/base/base.h: At global scope: external/com_google_riegeli/riegeli/base/base.h:682:28: error: 'Position' has not been declared 682 | Position size_hint, Position current_size) { | ^~~~ external/com_google_riegeli/riegeli/base/base.h:682:48: error: 'Position' has not been declared 682 | Position size_hint, Position current_size) { | ^~~~ external/com_google_riegeli/riegeli/base/base.h: In function 'size_t riegeli::BufferLength(size_t, size_t, int, int)': external/com_google_riegeli/riegeli/base/base.h:684:66: error: no matching function for call to 'UnsignedMin(int, size_t&)' 684 | max_length = UnsignedMin(size_hint - current_size, max_length); | ^ external/com_google_riegeli/riegeli/base/base.h:507:13: note: candidate: 'template<class A, > constexpr A riegeli::UnsignedMin(A)' 507 | constexpr A UnsignedMin(A a) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:507:13: note: template argument deduction/substitution failed: external/com_google_riegeli/riegeli/base/base.h:684:66: note: candidate expects 1 argument, 2 provided 684 | max_length = UnsignedMin(size_hint - current_size, max_length); | ^ external/com_google_riegeli/riegeli/base/base.h:515:35: note: candidate: 'template<class A, class B, > constexpr riegeli::IntersectionTypeT<A, B> riegeli::UnsignedMin(A, B)' 515 | constexpr IntersectionTypeT<A, B> UnsignedMin(A a, B b) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:515:35: note: template argument deduction/substitution failed: external/com_google_riegeli/riegeli/base/base.h:684:66: note: couldn't deduce template parameter '' 684 | max_length = UnsignedMin(size_hint - current_size, max_length); | ^ external/com_google_riegeli/riegeli/base/base.h:525:44: note: candidate: 'template<class A, class B, class ... Rest, > constexpr riegeli::IntersectionTypeT<A, B, Rest ...> riegeli::UnsignedMin(A, B, Rest ...)' 525 | constexpr IntersectionTypeT<A, B, Rest...> UnsignedMin(A a, B b, Rest... rest) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:525:44: note: template argument deduction/substitution failed: external/com_google_riegeli/riegeli/base/base.h:684:66: note: couldn't deduce template parameter '' 684 | max_length = UnsignedMin(size_hint - current_size, max_length); | ^ external/com_google_riegeli/riegeli/base/base.h:686:44: error: no matching function for call to 'UnsignedMax(size_t&, size_t&)' 686 | return UnsignedMax(max_length, min_length); | ^ external/com_google_riegeli/riegeli/base/base.h:533:13: note: candidate: 'template<class A, > constexpr A riegeli::UnsignedMax(A)' 533 | constexpr A UnsignedMax(A a) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:533:13: note: template argument deduction/substitution failed: external/com_google_riegeli/riegeli/base/base.h:686:44: note: candidate expects 1 argument, 2 provided 686 | return UnsignedMax(max_length, min_length); | ^ external/com_google_riegeli/riegeli/base/base.h: In function 'bool riegeli::Wasteful(size_t, size_t)': external/com_google_riegeli/riegeli/base/base.h:691:57: error: no matching function for call to 'UnsignedMax(size_t&, riegeli::internal::type_identity_t&)' 691 | return total - used > UnsignedMax(used, kMinBufferSize); | ^ external/com_google_riegeli/riegeli/base/base.h:533:13: note: candidate: 'template<class A, > constexpr A riegeli::UnsignedMax(A)' 533 | constexpr A UnsignedMax(A a) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:533:13: note: template argument deduction/substitution failed: external/com_google_riegeli/riegeli/base/base.h:691:57: note: candidate expects 1 argument, 2 provided 691 | return total - used > UnsignedMax(used, kMinBufferSize); | ^ In file included from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/memory.h: In function 'size_t riegeli::EstimatedAllocatedSize(size_t)': external/com_google_riegeli/riegeli/base/memory.h:66:52: error: no matching function for call to 'RoundUp<(sizeof (size_t) 2)>(size_t&)' 66 | return RoundUp<sizeof(size_t) 2>(requested_size); | ^ In file included from external/com_google_riegeli/riegeli/base/memory.h:26, from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/base.h:602:13: note: candidate: 'template<long unsigned int alignment, class T, > constexpr T riegeli::RoundUp(T)' 602 | constexpr T RoundUp(T value) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:602:13: note: template argument deduction/substitution failed: In file included from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/memory.h:66:52: note: couldn't deduce template parameter '' 66 | return RoundUp<sizeof(size_t) 2>(requested_size); | ^ external/com_google_riegeli/riegeli/base/memory.h: In function 'T riegeli::NewAligned(size_t, Args&& ...)': external/com_google_riegeli/riegeli/base/memory.h:91:47: error: no matching function for call to 'UnsignedMax(size_t&, long unsigned int)' 91 | num_bytes = UnsignedMax(num_bytes, sizeof(T)); | ^ In file included from external/com_google_riegeli/riegeli/base/memory.h:26, from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/base.h:533:13: note: candidate: 'template<class A, > constexpr A riegeli::UnsignedMax(A)' 533 | constexpr A UnsignedMax(A a) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:533:13: note: template argument deduction/substitution failed: In file included from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/memory.h:91:47: note: candidate expects 1 argument, 2 provided 91 | num_bytes = UnsignedMax(num_bytes, sizeof(T)); | ^ external/com_google_riegeli/riegeli/base/memory.h: In function 'void riegeli::DeleteAligned(T, size_t)': external/com_google_riegeli/riegeli/base/memory.h:129:47: error: no matching function for call to 'UnsignedMax(size_t&, long unsigned int)' 129 | num_bytes = UnsignedMax(num_bytes, sizeof(T)); | ^ In file included from external/com_google_riegeli/riegeli/base/memory.h:26, from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/base.h:533:13: note: candidate: 'template<class A, > constexpr A riegeli::UnsignedMax(A)' 533 | constexpr A UnsignedMax(A a) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:533:13: note: template argument deduction/substitution failed: In file included from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/memory.h:129:47: note: candidate expects 1 argument, 2 provided 129 | num_bytes = UnsignedMax(num_bytes, sizeof(T)); | ^ external/com_google_riegeli/riegeli/base/memory.h: In function 'T riegeli::SizeReturningNewAligned(size_t, size_t, Args&& ...)': external/com_google_riegeli/riegeli/base/memory.h:192:55: error: no matching function for call to 'UnsignedMax(size_t&, long unsigned int)' 192 | min_num_bytes = UnsignedMax(min_num_bytes, sizeof(T)); | ^ In file included from external/com_google_riegeli/riegeli/base/memory.h:26, from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/base.h:533:13: note: candidate: 'template<class A, > constexpr A riegeli::UnsignedMax(A)' 533 | constexpr A UnsignedMax(A a) { | ^~~ external/com_google_riegeli/riegeli/base/base.h:533:13: note: template argument deduction/substitution failed: In file included from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/memory.h:192:55: note: candidate expects 1 argument, 2 provided 192 | min_num_bytes = UnsignedMax(min_num_bytes, sizeof(T)); | ^ In file included from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/buffer.h: In constructor 'riegeli::Buffer::Buffer(riegeli::Buffer&&)': external/com_google_riegeli/riegeli/base/buffer.h:89:18: error: 'exchange' is not a member of 'std'; did you mean 'absl::lts20211102::exchange'? 89 | : data(std::exchange(that.data_, nullptr)), | ^~~~ In file included from external/com_google_absl/absl/container/internal/compressed_tuple.h:40, from external/com_google_absl/absl/container/internal/inlined_vector.h:30, from external/com_google_absl/absl/container/inlined_vector.h:54, from external/com_google_absl/absl/strings/cord.h:78, from external/com_google_riegeli/riegeli/base/buffer.h:22, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_absl/absl/utility/utility.h:314:3: note: 'absl::lts_20211102::exchange' declared here 314 | T exchange(T& obj, U&& new_value) { | ^~~~ In file included from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/buffer.h:90:22: error: 'exchange' is not a member of 'std'; did you mean 'absl::lts20211102::exchange'? 90 | capacity(std::exchange(that.capacity_, 0)) {} | ^~~~ In file included from external/com_google_absl/absl/container/internal/compressed_tuple.h:40, from external/com_google_absl/absl/container/internal/inlined_vector.h:30, from external/com_google_absl/absl/container/inlined_vector.h:54, from external/com_google_absl/absl/strings/cord.h:78, from external/com_google_riegeli/riegeli/base/buffer.h:22, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_absl/absl/utility/utility.h:314:3: note: 'absl::lts_20211102::exchange' declared here 314 | T exchange(T& obj, U&& new_value) { | ^~~~ In file included from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/buffer.h: In member function 'riegeli::Buffer& riegeli::Buffer::operator=(riegeli::Buffer&&)': external/com_google_riegeli/riegeli/base/buffer.h:94:27: error: 'exchange' is not a member of 'std'; did you mean 'absl::lts_20211102::exchange'? 94 | char const data = std::exchange(that.data_, nullptr); | ^~~~ In file included from external/com_google_absl/absl/container/internal/compressed_tuple.h:40, from external/com_google_absl/absl/container/internal/inlined_vector.h:30, from external/com_google_absl/absl/container/inlined_vector.h:54, from external/com_google_absl/absl/strings/cord.h:78, from external/com_google_riegeli/riegeli/base/buffer.h:22, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_absl/absl/utility/utility.h:314:3: note: 'absl::lts_20211102::exchange' declared here 314 | T exchange(T& obj, U&& new_value) { | ^~~~ In file included from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/buffer.h:97:20: error: 'exchange' is not a member of 'std'; did you mean 'absl::lts20211102::exchange'? 97 | capacity = std::exchange(that.capacity_, 0); | ^~~~ In file included from external/com_google_absl/absl/container/internal/compressed_tuple.h:40, from external/com_google_absl/absl/container/internal/inlined_vector.h:30, from external/com_google_absl/absl/container/inlined_vector.h:54, from external/com_google_absl/absl/strings/cord.h:78, from external/com_google_riegeli/riegeli/base/buffer.h:22, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_absl/absl/utility/utility.h:314:3: note: 'absl::lts_20211102::exchange' declared here 314 | T exchange(T& obj, U&& new_value) { | ^~~~ In file included from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/buffer.h: In member function 'char* riegeli::Buffer::Release()': external/com_google_riegeli/riegeli/base/buffer.h:125:15: error: 'exchange' is not a member of 'std'; did you mean 'absl::lts20211102::exchange'? 125 | return std::exchange(data, nullptr); | ^~~~ In file included from external/com_google_absl/absl/container/internal/compressed_tuple.h:40, from external/com_google_absl/absl/container/internal/inlined_vector.h:30, from external/com_google_absl/absl/container/inlined_vector.h:54, from external/com_google_absl/absl/strings/cord.h:78, from external/com_google_riegeli/riegeli/base/buffer.h:22, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_absl/absl/utility/utility.h:314:3: note: 'absl::lts_20211102::exchange' declared here 314 | T exchange(T& obj, U&& new_value) { | ^~~~ In file included from external/com_google_riegeli/riegeli/base/memory.h:26, from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/buffer.cc: In member function 'absl::lts_20211102::Cord riegeli::Buffer::ToCord(absl::lts_20211102::string_view) &&': external/com_google_riegeli/riegeli/base/buffer.cc:39:37: error: wrong number of template arguments (0, should be 1) 39 | RIEGELI_ASSERT(std::greater_equal<>()(substr.data(), data())) | ^ external/com_google_riegeli/riegeli/base/base.h:247:21: note: in definition of macro 'RIEGELI_ASSERT' 247 | while (false && !(expr)) ::riegeli::internal::UnreachableStream() | ^~~~ In file included from /usr/include/c++/9/string:48, from /usr/include/c++/9/bits/locale_classes.h:40, from /usr/include/c++/9/bits/ios_base.h:41, from /usr/include/c++/9/ios:42, from /usr/include/c++/9/ostream:38, from /usr/include/c++/9/iterator:64, from external/com_google_absl/absl/strings/cord.h:69, from external/com_google_riegeli/riegeli/base/buffer.h:22, from external/com_google_riegeli/riegeli/base/buffer.cc:15: /usr/include/c++/9/bits/stl_function.h:391:12: note: provided for 'template struct std::greater_equal' 391 | struct greater_equal : public binary_function<_Tp, _Tp, bool> | ^~~~~ In file included from external/com_google_riegeli/riegeli/base/memory.h:26, from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/buffer.cc:43:23: error: wrong number of template arguments (0, should be 1) 43 | std::less_equal<>()(substr.data() + substr.size(), data() + capacity())) | ^ external/com_google_riegeli/riegeli/base/base.h:247:21: note: in definition of macro 'RIEGELI_ASSERT' 247 | while (false && !(expr)) ::riegeli::internal::UnreachableStream() | ^~~~ In file included from /usr/include/c++/9/string:48, from /usr/include/c++/9/bits/locale_classes.h:40, from /usr/include/c++/9/bits/ios_base.h:41, from /usr/include/c++/9/ios:42, from /usr/include/c++/9/ostream:38, from /usr/include/c++/9/iterator:64, from external/com_google_absl/absl/strings/cord.h:69, from external/com_google_riegeli/riegeli/base/buffer.h:22, from external/com_google_riegeli/riegeli/base/buffer.cc:15: /usr/include/c++/9/bits/stl_function.h:401:12: note: provided for 'template struct std::less_equal' 401 | struct less_equal : public binary_function<_Tp, _Tp, bool> | ^~~~~~ In file included from external/com_google_riegeli/riegeli/base/memory.h:26, from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/buffer.cc: In member function 'void riegeli::Buffer::AppendSubstrTo(absl::lts_20211102::string_view, absl::lts_20211102::Cord&) &&': external/com_google_riegeli/riegeli/base/buffer.cc:55:37: error: wrong number of template arguments (0, should be 1) 55 | RIEGELI_ASSERT(std::greater_equal<>()(substr.data(), data())) | ^ external/com_google_riegeli/riegeli/base/base.h:247:21: note: in definition of macro 'RIEGELI_ASSERT' 247 | while (false && !(expr)) ::riegeli::internal::UnreachableStream() | ^~~~ In file included from /usr/include/c++/9/string:48, from /usr/include/c++/9/bits/locale_classes.h:40, from /usr/include/c++/9/bits/ios_base.h:41, from /usr/include/c++/9/ios:42, from /usr/include/c++/9/ostream:38, from /usr/include/c++/9/iterator:64, from external/com_google_absl/absl/strings/cord.h:69, from external/com_google_riegeli/riegeli/base/buffer.h:22, from external/com_google_riegeli/riegeli/base/buffer.cc:15: /usr/include/c++/9/bits/stl_function.h:391:12: note: provided for 'template struct std::greater_equal' 391 | struct greater_equal : public binary_function<_Tp, _Tp, bool> | ^~~~~ In file included from external/com_google_riegeli/riegeli/base/memory.h:26, from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/buffer.cc:59:23: error: wrong number of template arguments (0, should be 1) 59 | std::less_equal<>()(substr.data() + substr.size(), data() + capacity())) | ^ external/com_google_riegeli/riegeli/base/base.h:247:21: note: in definition of macro 'RIEGELI_ASSERT' 247 | while (false && !(expr)) ::riegeli::internal::UnreachableStream() | ^~~~ In file included from /usr/include/c++/9/string:48, from /usr/include/c++/9/bits/locale_classes.h:40, from /usr/include/c++/9/bits/ios_base.h:41, from /usr/include/c++/9/ios:42, from /usr/include/c++/9/ostream:38, from /usr/include/c++/9/iterator:64, from external/com_google_absl/absl/strings/cord.h:69, from external/com_google_riegeli/riegeli/base/buffer.h:22, from external/com_google_riegeli/riegeli/base/buffer.cc:15: /usr/include/c++/9/bits/stl_function.h:401:12: note: provided for 'template struct std::less_equal' 401 | struct less_equal : public binary_function<_Tp, _Tp, bool> | ^~~~~~ In file included from external/com_google_riegeli/riegeli/base/memory.h:26, from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/buffer.cc: In member function 'void riegeli::Buffer::PrependSubstrTo(absl::lts_20211102::string_view, absl::lts_20211102::Cord&) &&': external/com_google_riegeli/riegeli/base/buffer.cc:71:37: error: wrong number of template arguments (0, should be 1) 71 | RIEGELI_ASSERT(std::greater_equal<>()(substr.data(), data())) | ^ external/com_google_riegeli/riegeli/base/base.h:247:21: note: in definition of macro 'RIEGELI_ASSERT' 247 | while (false && !(expr)) ::riegeli::internal::UnreachableStream() | ^~~~ In file included from /usr/include/c++/9/string:48, from /usr/include/c++/9/bits/locale_classes.h:40, from /usr/include/c++/9/bits/ios_base.h:41, from /usr/include/c++/9/ios:42, from /usr/include/c++/9/ostream:38, from /usr/include/c++/9/iterator:64, from external/com_google_absl/absl/strings/cord.h:69, from external/com_google_riegeli/riegeli/base/buffer.h:22, from external/com_google_riegeli/riegeli/base/buffer.cc:15: /usr/include/c++/9/bits/stl_function.h:391:12: note: provided for 'template struct std::greater_equal' 391 | struct greater_equal : public binary_function<_Tp, _Tp, bool> | ^~~~~ In file included from external/com_google_riegeli/riegeli/base/memory.h:26, from external/com_google_riegeli/riegeli/base/buffer.h:24, from external/com_google_riegeli/riegeli/base/buffer.cc:15: external/com_google_riegeli/riegeli/base/buffer.cc:75:23: error: wrong number of template arguments (0, should be 1) 75 | std::less_equal<>()(substr.data() + substr.size(), data() + capacity())) | ^ external/com_google_riegeli/riegeli/base/base.h:247:21: note: in definition of macro 'RIEGELI_ASSERT' 247 | while (false && !(expr)) ::riegeli::internal::UnreachableStream() | ^~~~ In file included from /usr/include/c++/9/string:48, from /usr/include/c++/9/bits/locale_classes.h:40, from /usr/include/c++/9/bits/ios_base.h:41, from /usr/include/c++/9/ios:42, from /usr/include/c++/9/ostream:38, from /usr/include/c++/9/iterator:64, from external/com_google_absl/absl/strings/cord.h:69, from external/com_google_riegeli/riegeli/base/buffer.h:22, from external/com_google_riegeli/riegeli/base/buffer.cc:15: /usr/include/c++/9/bits/stl_function.h:401:12: note: provided for 'template struct std::less_equal' 401 | struct less_equal : public binary_function<_Tp, _Tp, bool> | ^~~~~~ Target //:print_names_and_sources failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 31.576s, Critical Path: 12.47s INFO: 203 processes: 17 internal, 186 processwrapper-sandbox. FAILED: Build did NOT complete successfully FAILED: Build did NOT complete successfully `

Is there any other way to use this dataset?

felixgimeno commented 1 year ago

Can you try with newer versions of gcc or clang? clang 14 seems to work