Skip to content

Commit

Permalink
Remove All PKG_LIBS Flags
Browse files Browse the repository at this point in the history
A previous pull request (satijalab#466) removed the unused `$(FLIBS)` flag from the Makevars file, which was a mistake because there are circumstances where linking to `$(LAPACK_LIBS) $(BLAS_LIBS)` depend on fortran and so can create compile errors.  This new commit removes all of these unused flags, rather than just one.  Thus avoiding unneccesary linkage, fortran errors AND `R CMD CHECK` errors.

For background, in older versions of Rcpp, these compile flags were required.  However, Rcpp has since been updated to avoid this issue.  Their FAQ (http://dirk.eddelbuettel.com/code/rcpp/Rcpp-FAQ.pdf) describes the issue

    2.15. **What about the new ‘no-linking’ feature.** Starting with Rcpp
    0.11.0, functionality provided by Rcpp and used by packages
    built with Rcpp accessed via the registration facility offered by
    R (and which is used by lme4 and Matrix, as well as by xts and
    zoo). This requires no effort from the user / programmer, and
    even frees us from explicit linking instruction. In most cases, the
    files src/Makevars and src/Makevars.win can now be removed.
    Exceptions are the use of RcppArmadillo (which needs an entry
    PKG_LIBS=$(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)) and
    packages linking to external libraries they use.
    But for most packages using Rcpp, only two things are required:

    • an entry in DESCRIPTION such as Imports: Rcpp (which
    may be versioned as in Imports: Rcpp (>= 0.11.0)), and

    • an entry in NAMESPACE to ensure Rcpp is correctly instantiated,
    for example importFrom(Rcpp, evalCpp). The name of the symbol does not really matter.

Rcpp version 0.11.0 was released years before the current version of R required by Seurat (3.4.0), so although this requirement is implicit, this commit also specifies the version requirement.

Sorry for the mistake last time!
  • Loading branch information
evolvedmicrobe committed Jun 22, 2018
1 parent e1f8ecc commit 93b856f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Imports:
reshape2,
gplots,
gdata,
Rcpp,
Rcpp (>= 0.11.0),
tclust,
ranger,
dtw,
Expand All @@ -64,7 +64,7 @@ Imports:
reticulate,
foreach,
hdf5r
LinkingTo: Rcpp, RcppEigen, RcppProgress
LinkingTo: Rcpp (>= 0.11.0), RcppEigen, RcppProgress
License: GPL-3 | file LICENSE
LazyData: true
Collate:
Expand Down
1 change: 0 additions & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
CXX_STD = CXX11

0 comments on commit 93b856f

Please sign in to comment.