daqana / dqrng

Fast Pseudo Random Number Generators for R
https://daqana.github.io/dqrng/
Other
42 stars 8 forks source link

Does not compile on Solaris #1

Closed rstub closed 6 years ago

rstub commented 6 years ago

c.f. https://cran.r-project.org/web/checks/check_results_dqrng.html

opt/csw//bin/g++ -std=gnu++11 -I"/home/ripley/R/gcc/include" -DNDEBUG -I../inst/include -I"/home/ripley/R/Lib32/Rcpp/include" -I"/home/ripley/R/Lib32/BH/include" -I/opt/csw/include -I/usr/local/include   -fPIC  -O2 -c dqrng.cpp -o dqrng.o
In file included from dqrng.cpp:22:0:
../inst/include/pcg_random.hpp:1639:18: error: reference to ‘extended’ is ambiguous
 using ext_std8 = extended<table_pow2, advance_pow2, BaseRNG,
                  ^
In file included from /usr/include/math.h:382:0,
                 from /opt/csw/include/c++/5.2.0/cmath:44,
                 from /home/ripley/R/Lib32/Rcpp/include/Rcpp/platform/compiler.h:100,
                 from /home/ripley/R/Lib32/Rcpp/include/Rcpp/r/headers.h:48,
                 from /home/ripley/R/Lib32/Rcpp/include/RcppCommon.h:38,
                 from /home/ripley/R/Lib32/Rcpp/include/Rcpp.h:27,
                 from dqrng.cpp:18:
/usr/include/floatingpoint.h:71:18: note: candidates are: typedef unsigned int extended [3]
 typedef unsigned extended[3];
                  ^

Introducing a namespace into pcg_*.hpp should help.