C++ header <random> not found

See https://api.travis-ci.org/v3/job/688142918/log.txt

E> clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rpf/include' -I/usr/local/include     -mmacosx-version-min=10.7    -fPIC  -Wall -g -O2  -c Compute.cpp -o Compute.o

E> Compute.cpp:20:10: fatal error: 'random' file not found

E> #include <random>

E>          ^~~~~~~~

E> 1 error generated.

E> make[1]: *** [Compute.o] Error 1

@jeroen @jimhester Please suggest a solution. Thank you.

1 Like

This looks like a bug in your package. Why are you setting:

1 Like

Need to set stdlib to access random?

-stdlib=libc++

As @jeroen notes, the duplicate/clashing min versions

-mmacosx-version-min=10.13 
-mmacosx-version-min=10.7