RcppCore / RcppEigen

Rcpp integration for the Eigen templated linear algebra library
Other
110 stars 40 forks source link

Installation error in R versions 3.4 and 3.5 since today's release #107

Closed bockthom closed 2 years ago

bockthom commented 2 years ago

With today's release of RcppEigen on CRAN, the RcppEigen installation breaks on R versions 3.4 and 3.5. (For R versions 3.6 to 4.2 it can be installed without error).

On R version 3.4.4, I get the following error when installing RcppEigen from CRAN:

fastLm.cpp: In function ‘int lmsol::gesdd(Eigen::MatrixXd&, Eigen::ArrayXd&, Eigen::MatrixXd&)’:
fastLm.cpp:147:54: error: expected ‘)’ before ‘FCONE’
     &m, Vt.data(), &n, &wrk, &mone, &iwork[0], &info FCONE);
                                                      ^~~~~
fastLm.cpp:151:59: error: expected ‘)’ before ‘FCONE’
     &m, Vt.data(), &n, &work[0], &lwork, &iwork[0], &info FCONE);
                                                           ^~~~~

4 hours ago this error did not yet appear, so i guess this might be caused by the new version of RcppEigen on CRAN, as the new version was released on CRAN since then.

eddelbuettel commented 2 years ago

Please use the archive/ section at CRAN. I have no choice in this matter, CRAN via email from Prof Ripley requested this change.

Also, if I may, R 4.2.0 is coming out. If you a need for an R release from over half a decade ago, you may have a need to pin it to package releases from an equally dated era.

bockthom commented 2 years ago

Please use the archive/ section at CRAN. I have no choice in this matter, CRAN via email from Prof Ripley requested this change.

Also, if I may, R 4.2.0 is coming out. If you a need for an R release from over half a decade ago, you may have a need to pin it to package releases from an equally dated era.

Thanks for your fast reply. This is totally fine. But then please add a version requirement to your "Depends" section of your package description, like other R packages do, such that your package is not available for earlier R versions any more. This would help users to know that it is intended that this package in its current version cannot be installed on older versions of R (and maybe prevents other users from opening issues as I did).

For example, methodsS3 states that the minimum requirement is R 2.13.0 [1] or the SetMethods package requires R >= 3.5.0 [2]. [1] https://cran.r-project.org/web/packages/R.methodsS3/index.html [2] https://cran.r-project.org/web/packages/SetMethods/index.html

Thanks in advance!

eddelbuettel commented 2 years ago

That's a good point on the '>=' helping. The use of FCONE (an R-internal macro helping "them" to enforce USE_FC_LEN_T and cleaner Fortran/C interfaces) is indeed contingent on R (>= 3.6.0).

Out of curiousity: how come you build (so quickly) post release for (that broad) a set? Some sort of software engineering research or alike?

eddelbuettel commented 2 years ago

Done in a8064e6

bockthom commented 2 years ago

Out of curiousity: how come you build (so quickly) post release for (that broad) a set? Some sort of software engineering research or alike?

Somehow, but not related to R or package management, I stumbled over this error just by chance :smile: We have a CI pipeline which tests our software (written in R) on various versions of R from 3.4 to 4.1. For each of these R versions, we install the necessary R packages needed in our tool from the most recent package version on CRAN and then run our test pipeline. Today, 5 hours ago, the pipeline runs successfully for all tested R versions, but 2 hours ago it suddenly failed for R 3.4 and R 3.5. The only thing I have changed on the source code in between was fixing a typo in a comment, which should not change the outcome of the pipeline at all. So the only thing which could have changed in between were the packages on CRAN. So, it what pretty easy to figure out that there was a new release of RcppEigen on CRAN. But that I figured this out was just by chance as I committed to our software a few hours before your package release and a few hours after and the state of the CI pipeline changed.

Anyway, thanks for adding the version depends.

eddelbuettel commented 2 years ago

And if I may, why are you wasting that many cpu cycles on configs nobody uses? "Because some other book said so" ? CRAN use release, devel and (on some platforms) old-release. That always struck me as sensible. Anyway....

bockthom commented 2 years ago

why are you wasting that many cpu cycles on configs nobody uses?

"nobody uses" might be wrong. There might be some legacy systems where older R versions are installed and where it is very costly or even impossible to update the R version (for whatever reasons) and we just check whether our software still runs on these legacy systems independent of the package version (but of course we use R versions >= 4.1 in our production environments and fix the package versions there). However, usually this is only checked once within in a couple of weeks. So it was really a random coincidence that the CI pipeline ran before and after your release today.

eddelbuettel commented 2 years ago

As I stated before: whoever insists on using R from six years ago and then maintains they cannot update should probably not update CRAN daily to current packages. It is simply outside of our 'societal contract'. There is also so much we can guarantee for free, and while we do that (well, I may add) for current versions, this is outside the scope.

You or your users may disagree, but CRAN make Policy and we live with it. Works for me (despite occassional pain points) but this is user error.

I appreciate that you took the time to describe the setup.

bockthom commented 2 years ago

As I stated before: whoever insists on using R from six years ago and then maintains they cannot update should probably not update CRAN daily to current packages. It is simply outside of our 'societal contract'. There is also so much we can guarantee for free, and while we do that (well, I may add) for current versions, this is outside the scope.

You or your users may disagree, but CRAN make Policy and we live with it. Works for me (despite occassional pain points) but this is user error.

No, I don't disagree with you. In fact, I completely agree with you. I was not requesting for fixing this for old R versions, I just reported the error as I did not know whether it was an intended change by you or an easily fixable bug. As you added the "Depends" statement to your description, I am totally fine with that, as such information helps me and other users to easily recognize that an older R version is not supported any more and everything is fine. However, unfortunately, the "Depends" statement you have added is not yet added on the CRAN website https://cran.r-project.org/web/packages/RcppEigen/index.html, which will make other users ran into the same problem as I, as if such errors as reported above occur, I first check the depends section on CRAN. Maybe you could find some means to update the Description also on the CRAN website.

Anyway, thanks for replying to this issue. Updating the Depends section totally fixes this issue, so I will treat this issue as closed.

jwmor commented 2 years ago

Exact same error for me with R 3.6 on RHEL 7.

eddelbuettel commented 2 years ago

As I said before:

As I stated before: whoever insists on using R from six years ago and then maintains they cannot update should probably not update CRAN daily to current packages. It is simply outside of our 'societal contract'. There is also so much we can guarantee for free, and while we do that (well, I may add) for current versions, this is outside the scope.

The change is one requested by CRAN. There was no other change. If your life choices mean you are stuck with R 3.6.0, please either edit the file, or #define FCONE as something empty, or use an older version of RcppEigen.