RcppCore / RcppEigen

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

Configuration to reduce console output? #90

Closed bbimber closed 3 years ago

bbimber commented 4 years ago

We are building an R project on travis-ci with many dependencies. RcppEigen 0.3.3.7.0 is installed. The console output from anything involving RcppEigen is huge, and we're hitting limits on travis-ci with respect to log size. I googled this, and tried a few things, including setting "CXXFLAGS=$CXXFLAGS -w -DEIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS" in $HOME/.R/Makevars. These flags are passed to many g++ commands, but many dont seem to inherit this. Are there any additional config options I can set to reduce the console output from RcppEigen? Thanks in advance.

One example output is here:

https://api.travis-ci.com/v3/job/379691434/log.txt

the first few lines of an example are:

begin installing package ‘RSQLite’

eddelbuettel commented 4 years ago

Good point. I keep a few options "locally" in ~/.R/Makevars because we are "not allowed" to set them in the src/Makevars{,.in} for reasons of "portability". CRAN has its methods and reason but sometimes you wonder...

So the quickest hack I can think of is to simple run a few lines of shell code to echo or cat into ~/.R/Makevars on your Travis account (or prepare and commit a file and just copy it in).

There is little we can do for the official package because of the CRAN Repository Policy.

bbimber commented 4 years ago

@eddelbuettel so what are those lines of code?

eddelbuettel commented 4 years ago

Not claiming these are perfect for your issue but I would just add compiler flags til Boost and Eigen are quiet. They usually tell you at the end of each line what triggered them so this gives an idea:

#PEDANTIC=-pedantic -Werror -DBOOST_NO_AUTO_PTR
#PEDANTIC=-pedantic -DBOOST_NO_AUTO_PTR -Wno-ignored-attributes
#PEDANTIC=-pedantic -DBOOST_NO_AUTO_PTR
#PEDANTIC= -DBOOST_NO_AUTO_PTR -Wno-sign-compare -Wno-parentheses -Wno-maybe-uninitialized
PEDANTIC=-pedantic
#PEDANTIC=-DBOOST_NO_AUTO_PTR

#XTRAFLAGS=-Wno-misleading-indentation -Wno-unused -Wno-ignored-attributes -Wno-class-memaccess
#XTRAFLAGS=-Wno-misleading-indentation -Wno-unused -Wno-ignored-attributes -Wno-parentheses -Wno-address-of-packed-member
#XTRAFLAGS=-Wno-misleading-indentation -Wno-unused -Wno-ignored-attributes
#XTRAFLAGS=-Wno-misleading-indentation -Wno-unused -march=native
#XTRAFLAGS=-Wno-misleading-indentation -Wno-ignored-attributes
#XTRAFLAGS=-Wno-deprecated-declarations -Wno-parentheses
#XTRAFLAGS=-Wno-ignored-attributes -Wno-deprecated-declarations -fno-common
#XTRAFLAGS=-Wno-deprecated-declarations -Wno-parentheses
#XTRAFLAGS=-Wno-parentheses
#XTRAFLAGS=-mshstk
#XTRAFLAGS=-Wno-ignored-attributes
XTRAFLAGS=

followed by

CFLAGS=               -g -O3 -Wall -pipe $(PEDANTIC) $(XTRAFLAGS) -std=gnu99

## for C++ and C++11 code
CXXFLAGS=               -g -O3 -Wall -pipe $(PEDANTIC) $(XTRAFLAGS)
CXX1XFLAGS=     -g -O3 -Wall -pipe $(PEDANTIC) $(XTRAFLAGS)
CXX11FLAGS=     -g -O3 -Wall -pipe $(PEDANTIC) $(XTRAFLAGS)
CXX14FLAGS=     -g -O3 -Wall -pipe $(PEDANTIC) $(XTRAFLAGS)
CXX17FLAGS=     -g -O3 -Wall -pipe $(PEDANTIC) $(XTRAFLAGS)

FLAGS=-Wall -O3 -g -pipe $(PEDANTIC) $(XTRAFLAGS)