Skip to content

Remove obsolete CXX_STD = CXX11 to allow Armadillo 15.0.x migration#5

Closed
eddelbuettel wants to merge 1 commit intomlampros:masterfrom
eddelbuettel:master
Closed

Remove obsolete CXX_STD = CXX11 to allow Armadillo 15.0.x migration#5
eddelbuettel wants to merge 1 commit intomlampros:masterfrom
eddelbuettel:master

Conversation

@eddelbuettel
Copy link

Armadillo 15.0.* now makes C++14 the minimum compilation standard. For most packages, adapting to it can be very simple, and yours is one of them. In this PR we simply remove the declaration from Makevars and Makevars.win -- and no other changes are needed.

Please see issues #475 and below for context, and notably #489 for this first wave of PRs. It would be terrific if you could make an upload to CRAN 'soon' to remove the reliance on C++11 which we needed in the past, but which is by now a hindrance. Please do not hesitate to reach out if I can assist in any way or clarify matters.

/cc @kurthornik

@mlampros
Copy link
Owner

@eddelbuettel
thank you for the pull request. I follow RcppArmadillo and I am aware of the latest RcppArmadillo issues
Last week I submitted updated versions to CRAN for all (my) 6 R packages (ClusterR, elmNNRcpp, fastGLCM, KernelKnn, VMDecomp, SuperpixelImageSegmentation) mentioned in #484 and #486 Github issues.
Thank you for your efforts (especially for RcppArmadillo that I use mostly in my R packages)

@eddelbuettel
Copy link
Author

Sorry, I must have missed than against the current GitHub sources. Thank you so much for taking care of all these updates so quickly, it is really appreciated!

@eddelbuettel
Copy link
Author

I just got to your ClusterR and once again: Thank you! Version 1.3.4 already takes care of things! I am little behind given RcppArmadillo's over 1200 reverse dependencies so this is really appreciated!

(The DESCRIPTION file for ClusterR says you need to install libarmadillo-dev (etc), that is generally incorrect. Notice that eg on Linux we link ClusterR as

g++ -Wl,-S -shared -L/usr/lib/R/lib -Wl,-z,relro -o ClusterR.so RcppExports.o export_inst_folder_headers.o init.o -llapack -lblas -lgfortran -lm -lquadmath -fopenmp -L/usr/lib/R/lib -lR

so no libarmadillo here: all it needs comes from R (for example the LAPACK/BLAS bits) and RcppArmadillo (the headers).) I

@mlampros
Copy link
Owner

mlampros commented Sep 27, 2025

@eddelbuettel

I'm sorry for the late reply. I understand that you have to resolve many issues related to the reverse dependencies of RcppArmadillo.

I have an internal R package that picks the system requirements from the DESCRIPTION file and creates the Dockerfile, which Dockerfile then I use in a Github action to create the docker image of the package. I did this because a few of my R packages require specific software (for instance ClusterR requires libgmp3) and I'm not familiar with configuration files.

I understand that we should only include system requirements related to the installed R package. Do you think it would be an issue if I don't remove these system requirements from the DESCRIPTION file?

@eddelbuettel
Copy link
Author

Oh I see -- that makes sense because you wrote your own bespoke software to parse that free-format line in DESCRIPTION. The comment I was making was more general in the sense that a few of us have belabored the fact that there is no machine parseable format to express this generally.

So for example Inaki maintains a database here in this csv file at GitHub (plus other files in that repo), and the posit folks have something similar too to support tooling they provide.

I encode these too for my r2u system providing CRAN as binaries for Ubuntu (and I should really align this with Inaki I suppose).

So I simply did not know your use case here, and it is hard to know as the field is free form :-/ So by all means keep it. Nothing really is require unless CRAN says 😉

That said, to use RcppArmadillo you should never need libarmadillo-dev unless you are doing something very non-standard (and I ran into one new package that contacted me did that too). So if you want to change that I can probably help you.

@mlampros
Copy link
Owner

To come to the system requirements I used the following

sysreqs::sysreq_commands(DESCRIPTION_file, platform = "linux-x86_64-ubuntu-gcc", soft = TRUE) 

from the sysreqs but it only retrieved the minimal requirements. However recently the 'sysreqs` was archived in favor of rstudio/r-system-requirements

I think it's time to adjust the DESCRIPTION files because I don't know how these files are used either from CRAN or from other packages. I'll start slowly to make the adjustments and thanks for the resources (database, r2u) and the reminder for the DESCRIPTION file

@mlampros
Copy link
Owner

mlampros commented Sep 27, 2025

I tried now the pak R package and seems to show all results even for the dependencies (just for reference)

> pak::pkg_sysreqs(pkg = 'ClusterR', dependencies = TRUE, upgrade = TRUE, sysreqs_platform = "ubuntu")
── Install scripts ────────────────────────────── Ubuntu NA ──
apt-get -y update
apt-get -y install libfftw3-dev libcurl4-openssl-dev libssl-dev make libgmp3-dev zlib1g-dev libjpeg-dev pandoc libpng-dev libtiff-dev

── Packages and their system dependencies ──────────────────────────────────────────
ClusterRlibfftw3-dev
curllibcurl4-openssl-dev, libssl-dev
fsmake
gmplibgmp3-dev
httpuvmake, zlib1g-dev
jpeglibjpeg-dev
knitrpandoc
OpenImageRlibfftw3-dev, libjpeg-dev, libpng-dev
openssllibssl-dev
pnglibpng-dev
rmarkdownpandoc
sassmake
tifflibjpeg-dev, libtiff-dev

@eddelbuettel
Copy link
Author

I would not know as I do not use pak.

When I do install.packages("ClusterR") in the r2u container no system libraries are installed, only 20 or so R packages taking all of six seconds (!!) and the package loads fine.

When I run ldd /usr/lib/R/site-library/ClusterR/libs/ClusterR.so I see no reference to libfftw3 there. Maybe there is a difference between mandatory and optional dependencies (ie "Suggests:" in R terms) here...

@mlampros
Copy link
Owner

I'll proceed and remove the SystemRequirements as you suggested and thanks again for your comment on this.

@eddelbuettel
Copy link
Author

eddelbuettel commented Sep 27, 2025

Please let me repeat my initial comment:

The DESCRIPTION file for ClusterR says you need to install libarmadillo-dev (etc), that is generally incorrect.

I made a very specific comment. You have not replied at all to that comment. I have no general problem with using SystemRequirement -- the field is there for a reason -- but I felt it would help if I pointed out to you you should not need this as libarmadillo-dev is not usually required to use RcppArmadillo. That was, and is all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants