[Rcpp-devel] Getting different build commands on Linux vs. Mac OS

Ralf Stubner ralf.stubner at r-institute.com
Mon Apr 30 15:54:52 CEST 2018


On 30.04.2018 12:48, Evan Biederstedt wrote:
> How do I direct the Makevars to use g++ and give me the "correct" build
> as I see on Linux? `CXX=g++` or `CXX=/usr/local/bin/g++` doesn't appear
> to work. 

Quoting Duncan Murdoch in
https://stat.ethz.ch/pipermail/r-package-devel/2017q4/002087.html:

> According to section 1.2.1 "Using Makevars" in Writing R Extensions,
> R_HOME/etcR_ARCH/Makeconf is included after Makevars, so what you're
> seeing is by design. I believe this is so that packages are built with
> tools compatible with those that built R. (Remember, packages are
> designed for distribution to diverse systems.)

So you might change various flags within src/Makevars via for example
PKG_CXXFLAGS, but you cannot overwrite CXXFLAGS or CXX itself. And there
is no PKG_CXX. You can change the used compiler for *your* system via
~/.R/Makevars, though. From my point of view that is a (short-time)
workaround only. You have to figure out why clang does not like your
package/library.

Greetings
Ralf


-- 
Ralf Stubner
Senior Software Engineer / Trainer

daqana GmbH
Dortustraße 48
14467 Potsdam

T: +49 331 23 70 81 66
F: +49 331 23 70 81 67
M: +49 162 20 91 196
Mail: ralf.stubner at daqana.com

Sitz: Potsdam
Register: AG Potsdam HRB 27966 P
Ust.-IdNr.: DE300072622
Geschäftsführer: Prof. Dr. Dr. Karl-Kuno Kunze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4008 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20180430/de52e86d/attachment-0001.bin>


More information about the Rcpp-devel mailing list