srlanalytics / bdfm

Bayesian dynamic factor model estimation and predictive statistics including nowcasting and forecasting
MIT License
5 stars 6 forks source link

Compiler NOTE #67

Closed christophsax closed 5 years ago

christophsax commented 5 years ago

Probably in newer Rs, I get this NOTE. Not urgent, but needs do go away before CRAN.

N  checking use of SHLIB_OPENMP_*FLAGS in Makefiles
     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 linking is by C++
     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 linking is by C++
   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 Fortran: see the manual).
SethOttoQuant commented 5 years ago

Yikes, not sure about this one. It'll take some googling...

SethOttoQuant commented 5 years ago

OK... I was able to get rid of the note by editing the Makevars files to:

## optional
#CXX_STD = CXX11

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

from the original PKG_LIBS = $(SHLIB_OPENMP_CFLAGS) .... Not sure this is in fact best practice, but everything runs so we should be fine.