RcppEigen icon indicating copy to clipboard operation
RcppEigen copied to clipboard

Need for $(FLIBS)

Open dmbates opened this issue 12 years ago • 1 comments

With the "header only" version of Rcpp the PKG_LIBS definition In src/Makevars and src/Makevars.win can drop the call to Rcpp::LdFlags(). This is one of the big advantages of a header-only C++ library -- all the code in incorporated at compile time, not during linking.

Vincent Yu asked if it would be possible to eliminate $(FLIBS) there too as it just makes for more work under OS X. The answer, sadly, is "no" and the reason had nothing to do with the Eigen package itself - it is a consequence of Dirk and I getting to carried away with corner cases when we wrote the vignette. We added a method to the demo function fastLm that uses the LAPACK function dgesdd to compute the singular value decomposition. That one call, in a demo function no less, means that you must include $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) in the definition of PKG_LIBS.

It would be awkward to try to change that because a version of that vignette is published in JSS

dmbates avatar Nov 15 '13 16:11 dmbates

Hm. Tough call.

Should we consider commenting out this one GESD::GESD() class (maybe via #define ?) and add a comment and/or footnote that users can reenable it at the cost of extending src/Makevars?

On the other hand, are we sure nothing in Eigen calls LAPACK by itself? I know I still need this in Armadillo too, but Armadillo is more open about requiring LAPACK rather than (mostly? completely?) replacing it with its own code as Eigen does.

[ For the record, I prefer the old email list over the new issue tickets. I almost missed these entries, and I would have seen this 9 hours ago via rcpp-core. ]

eddelbuettel avatar Nov 16 '13 01:11 eddelbuettel