In short, the default Makevars{.win} file should be updated with:

CXX_STD = CXX11
PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) 
PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

c.f. 
https://github.com/RcppCore/RcppArmadillo/blob/58b11c738d31b9e8d9fa6b39e2290b2ac08aefc4/inst/skeleton/Makevars#L11-L14

Sincerely,

JJB

On 8/20/18, 5:40 PM, "R-package-devel on behalf of Dirk Eddelbuettel" 
<r-package-devel-boun...@r-project.org on behalf of e...@debian.org> wrote:

    
    On 20 August 2018 at 22:14, Georgi Boshnakov wrote:
    | Hi,
    | 
    | Recently the results page of my package on CRAN at
    | https://cran.r-project.org/web/checks/check_results_sarima.html,
    | started to show the NOTE below for some systems.
    | I am using Rcpp/RcppArmadillo without any manual interventions on my 
side. 
    | 
    | Is it reasonable to expect that the NOTE will disappear if I rebuild the 
package with an up-to-date version of  Rcpp
    | and maybe rerunning RcppAttributes().?
    
    No you have to edit src/Makevars{,win} yourself.
    
    | ==================================
    | 
    | Check: use of SHLIB_OPENMP_*FLAGS in Makefiles 
    | Result: NOTE 
    |      src/Makevars: SHLIB_OPENMP_CXXFLAGS is included in PKG_CXXFLAGS but 
not in PKG_LIBS
    |      src/Makevars: SHLIB_OPENMP_CFLAGS is included in PKG_LIBS but not in 
PKG_CFLAGS
    |      src/Makevars.win: SHLIB_OPENMP_CXXFLAGS is included in PKG_CXXFLAGS 
but not in PKG_LIBS
    |      src/Makevars.win: SHLIB_OPENMP_CFLAGS is included in PKG_LIBS but 
not in PKG_CFLAGS
    
    Basically just use SHLIB_OPENMP_CXXFLAGS in PKG_LIBS as well. As the
    paragraph quoted below suggests.
    
    Our initial example in RcppArmadillo was sloppy was mix *_CFLAGS and
    *_CXXFLAGS use, and that is no longer liked at the CRAN side.
    
    Dirk
    
    |     Use of these macros is discussed in sect 1.2.1.1 of 'Writing R
    |     Extensions'. The macros for different languages may differ so the
    |     matching macro must be used in PKG_CXXFLAGS (etc) and match that used
    |     in PKG_LIBS (except for F77: see the manual).
    | 
    | ====================================
    | 
    | ______________________________________________
    | R-package-devel@r-project.org mailing list
    | https://stat.ethz.ch/mailman/listinfo/r-package-devel
    
    -- 
    http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
    
    ______________________________________________
    R-package-devel@r-project.org mailing list
    https://stat.ethz.ch/mailman/listinfo/r-package-devel
    

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to