Skip to content

Conversation

@eddelbuettel
Copy link
Collaborator

Defining -DARMA_USE_CURRENT avoids a nag from the compiler which CRAN may nag you about at the next upload:

ccache g++-15 -I"/usr/share/R/include" -DNDEBUG  -I'/usr/local/lib/R/site-library/Rcpp/include' -I'/usr/local/lib/R/site-library/RcppArmadillo/include'    -I../inst/include -fopenmp -fpic  -O3 -Wall -pipe -pedantic -Wno-parentheses -Wno-ignored-attributes -Wno-unused-function    -c example-linear-regression-lbfgs.cpp -o example-linear-regression-lbfgs.o
In file included from /usr/local/lib/R/site-library/RcppArmadillo/include/RcppArmadillo.h:29,
                 from ../inst/include/RcppEnsmallen.h:22,
                 from RcppExports.cpp:4:
/usr/local/lib/R/site-library/RcppArmadillo/include/RcppArmadillo/version/arma.h:71:153: note: ‘#pragma message: Using fallback compilation with Armadillo 14.6.3. Please consider defining -DARMA_USE_CURRENT. See GitHub issue #475 for more.’
   71 |         #pragma message("Using fallback compilation with Armadillo 14.6.3. Please consider defining -DARMA_USE_CURRENT. See GitHub issue #475 for more.")
      |                                                                                                                                                         ^
In file included from /usr/local/lib/R/site-library/RcppArmadillo/include/RcppArmadillo.h:29,
                 from ../inst/include/RcppEnsmallen.h:22,
                 from example-linear-regression-lbfgs.cpp:1:
/usr/local/lib/R/site-library/RcppArmadillo/include/RcppArmadillo/version/arma.h:71:153: note: ‘#pragma message: Using fallback compilation with Armadillo 14.6.3. Please consider defining -DARMA_USE_CURRENT. See GitHub issue #475 for more.’
   71 |         #pragma message("Using fallback compilation with Armadillo 14.6.3. Please consider defining -DARMA_USE_CURRENT. See GitHub issue #475 for more.")
      |                                                                                                                                                         ^
ccache g++-15 -Wl,-S -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro -o RcppEnsmallen.so RcppExports.o example-linear-regression-lbfgs.o -fopenmp -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR

The #define itself is harmless and cannot do anything nefarious at older or different versions.

@coatless
Copy link
Collaborator

coatless commented Sep 8, 2025

I think CRAN is still catching up with the new RcppArmadillo release?

** libs
using C++ compiler: ‘g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’
g++ -std=gnu++17 -I"/opt/R/4.5.1/lib/R/include" -DNDEBUG  -I'/home/runner/work/_temp/Library/Rcpp/include' -I'/home/runner/work/_temp/Library/RcppArmadillo/include' -I/usr/local/include   -I../inst/include -fopenmp -DARMA_USE_CURRENT -fpic  -g -O2  -Wall -pedantic -fdiagnostics-color=always  -c RcppExports.cpp -o RcppExports.o
In file included from ../inst/include/RcppEnsmallen.h:25,
                 from RcppExports.cpp:4:
../inst/include/ensmallen.hpp:35:10: fatal error: armadillo: No such file or directory
   35 | #include <armadillo>
      |          ^~~~~~~~~~~
compilation terminated.
make: *** [/opt/R/4.5.1/lib/R/etc/Makeconf:211: RcppExports.o] Error 1
ERROR: compilation failed for package ‘RcppEnsmallen’
* removing ‘/tmp/RtmpcqQrRF/Rinst1b50111e4fd7/RcppEnsmallen’

I'll re-trigger the build in about 5 hours.

@eddelbuettel
Copy link
Collaborator Author

Just a case of binaries lagging source. Just wait a day or so. You can easily validate on your own system it is all good if you compile from CRAN sources. CI setups using binaries (i.e. r2u) lag by a day, those using r-universe are golden already:

image

@eddelbuettel
Copy link
Collaborator Author

Can we put GHA CI 'into sleep' for 24 hours? Point taken that I should have opened this a day later but hey, that's what the re-run button is for, right?

@eddelbuettel
Copy link
Collaborator Author

Oh and given how RcppEnsmallen wants that #include <armadillo> we should probably sprinkle in a '>= 15.0.2-1'.

@coatless
Copy link
Collaborator

coatless commented Sep 8, 2025

@eddelbuettel done in 4c97083.

@eddelbuettel
Copy link
Collaborator Author

That will, of course, break CI in another way unless we opt into a quick 'install from source' step...

@coatless
Copy link
Collaborator

coatless commented Sep 8, 2025

That will, of course, break CI in another way unless we opt into a quick 'install from source' step...

I waited until CRAN updated ;)

All green on my end. So, in we go and off to CRAN!

@coatless coatless merged commit 20675ef into main Sep 8, 2025
6 checks passed
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.

3 participants