Closed albertus82 closed 5 months ago
Hi, I am also running on RHEL8 after we've upgraded our system and we are facing the same issue on R 4.3.0 or R 4.2.0. Regards, Yves-Marie
I curcumvented this problem installing an older version of the package, but obviously this cannot be considered a long-term solution:
install.packages("https://cran.r-project.org/src/contrib/Archive/DescTools/DescTools_0.99.52.tar.gz", repos=NULL, type="source")
I see that v0.99.54 was published on 2024-02-03, but compilation keeps failing with the same error.
Hmm, this is apparently a compiler problem in linux. If this persists, I will go back to "accumulate" instead of "reduce" (which proved to be a little bit faster...). Can you please make sure, that you have the most current compilers available in your environment?
Hi,
the OS minor version is up-to-date and I applied all the available updates (dnf upgrade
), but gcc version is the one you can see in the log. In recent days I have installed hundreds of R packages with this configuration and sadly this is the only one that I cannot compile successfully. I could try installing some Developer Toolset to use a different version of gcc than the system version, but I'm not sure if that's a good idea
Thank you for your kind support.
Hm, the package is compiled on CRAN without any errors:
I have also checked the function, it is about five times faster than the potential replacement "accumulate". So I will stick to it.
But what you can try is to simply replace the std:reduce function in the function "List n_pow_sum(NumericVector x)" (file aux_fct.cpp)
double mean = std::reduce(x.begin(), x.end(), 0.0, std::plus
which should work for older versions too. Also try:
library("Rcpp")
cppFunction("
double SumAccu(NumericVector x) {
return std::accumulate(x.begin(), x.end(), 0.0, std::plus<double>());
}")
cppFunction("
double SumReduce(NumericVector x) {
return std::reduce(x.begin(), x.end(), 0.0, std::plus<double>());
}")
x <- runif(100)
SumReduce(x)
SumAccu(x)
Can we close this issue?
I cannot upgrade from RHEL 8 to 9 at this moment, so I must install v0.99.52 manually. I think you can close this as "Won't fix", thanks.
Ok, good luck anyway!
Hi, I'm failing to build successfully from sources under Red Hat Enterprise Linux 8:
Thank you for your support.