Skip to content

Catch compilation fails with LLVM 15 #1687

@kevinushey

Description

@kevinushey

From r-lib/isoband#31.

/usr/local/clang-trunk0/bin/clang++ -std=gnu++14 -I"/data/gannet/ripley/R/R-clang-trunk/include" -DNDEBUG -I../inst/include -DCOMPILING_TESTTHAT  -isystem /usr/local/clang-trunk/include    -fpic  -O3 -Wall -pedantic -frtti  -c test-runner.cpp -o test-runner.o
In file included from test-runner.cpp:7:
In file included from ../inst/include/testthat.h:1:
In file included from ../inst/include/testthat/testthat.h:65:
In file included from ../inst/include/testthat/vendor/catch.h:377:
In file included from /usr/local/clang-trunk0/bin/../include/c++/v1/sstream:186:
In file included from /usr/local/clang-trunk0/bin/../include/c++/v1/istream:165:
In file included from /usr/local/clang-trunk0/bin/../include/c++/v1/ostream:168:
In file included from /usr/local/clang-trunk0/bin/../include/c++/v1/bitset:128:
In file included from /usr/local/clang-trunk0/bin/../include/c++/v1/string:551:
In file included from /usr/local/clang-trunk0/bin/../include/c++/v1/string_view:222:
In file included from /usr/local/clang-trunk0/bin/../include/c++/v1/algorithm:1851:
In file included from /usr/local/clang-trunk0/bin/../include/c++/v1/__algorithm/ranges_sample.h:13:
In file included from /usr/local/clang-trunk0/bin/../include/c++/v1/__algorithm/sample.h:18:
/usr/local/clang-trunk0/bin/../include/c++/v1/__random/uniform_int_distribution.h:235:5: error: static assertion failed due to requirement '__libcpp_random_is_valid_urng<Catch::RandomNumberGenerator, void>::value': 
    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/clang-trunk0/bin/../include/c++/v1/__algorithm/shuffle.h:154:35: note: in instantiation of function template specialization 'std::uniform_int_distribution<long>::operator()<Catch::RandomNumberGenerator>' requested here
            difference_type __i = __uid(__g, _Pp(0, __d));
                                  ^
/usr/local/clang-trunk0/bin/../include/c++/v1/__algorithm/shuffle.h:166:14: note: in instantiation of function template specialization 'std::__shuffle<std::_ClassicAlgPolicy, std::__wrap_iter<Catch::TestCase *>, std::__wrap_iter<Catch::TestCase *>, Catch::RandomNumberGenerator &>' requested here
  (void)std::__shuffle<_ClassicAlgPolicy>(
             ^
../inst/include/testthat/vendor/catch.h:7189:18: note: in instantiation of function template specialization 'std::shuffle<std::__wrap_iter<Catch::TestCase *>, Catch::RandomNumberGenerator &>' requested here
            std::shuffle( vector.begin(), vector.end(), rng );
                 ^
../inst/include/testthat/vendor/catch.h:7207:44: note: in instantiation of function template specialization 'Catch::RandomNumberGenerator::shuffle<std::vector<Catch::TestCase>>' requested here
                    RandomNumberGenerator::shuffle( sorted );
                                           ^
1 error generated.
make: *** [/data/gannet/ripley/R/R-clang-trunk/etc/Makeconf:183: test-runner.o] Error 1
ERROR: compilation failed for package ‘testthat’

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions