[Rprotobuf-yada] building on windows

Dirk Eddelbuettel edd at debian.org
Thu Feb 17 03:34:57 CET 2011


On 16 February 2011 at 18:18, eckuipers-web at yahoo.com wrote:
| Hey Dirk,
| Building the google protobuf library under windows just works for me with 
| configure; make; make install. I was talking about RProtoBuf, which also seems 
| to have a configure script that i need to run.

Oh, sorry, I misunderstood. You're ahead of the curve.

Windows behaviour for CRAN package is standardized and document. Configure is
never used. In most cases, locations are hardwired.  Here is what my
RQuantLib package has in src/Makevars.win:

   ## This assume that we can call Rscript to ask Rcpp about its locations
   ## Use the R_HOME indirection to support installations of multiple R version
   RCPP_LDFLAGS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::LdFlags()")

   ## The environment variable QUANTLIB_ROOT has to point to an existing build of QuantLib
   PKG_CXXFLAGS=-I$(QUANTLIB_ROOT) -I. 
   PKG_LIBS=$(RCPP_LDFLAGS) -L$(QUANTLIB_ROOT)/lib -lQuantLib-mgw-0_9_9

The first paragraph deals with Rcpp. LinkingTo: in Description gets the
headers; the RCPP_LDFLAGS deals with the Rcpp library to link to.  You could
copy this as is.

The second paragraph then sets the -I flag to find Quantlib header -- adapt
accordingly and for now don't bother with an env.var.  It also sets the
libraries, once for Rcpp from above and then for QuantLib.

Enough of a pattern?

Dirk

| Best,
| Koert
| 
| ----- Original Message ----
| > From: Dirk Eddelbuettel <edd at debian.org>
| > To: eckuipers-web at yahoo.com
| > Cc: rprotobuf-yada at r-forge.wu-wien.ac.at
| > Sent: Wed, February 16, 2011 8:34:24 PM
| > Subject: Re: [Rprotobuf-yada] building on windows
| > 
| > 
| > On 16 February 2011 at 16:59, eckuipers-web at yahoo.com wrote:
| > |  Hey all,
| > | 
| > | I again look again at building RProtoBuf on windows... 
| > |  How do i  start? The first thing is to do a ./configure i guess? Now i have  
| >my 
| >
| > | regular  mingw/msys environment in which i could try to do this.  But R also 
| 
| > | comes with its own mingw compiler environment in Rtools. Does  Rtools have a 
| 
| > | shell  in which i could do the configure?
| > 
| > When  we mentioned this to Kenton, he looked surprised -- to him it just
| > worked via  'configure; make; make install'.  It was my understanding that he
| > used  just a regular MSys / MinGW environment for this.
| > 
| > So if you have bit of  patience to try this, I would suggest the following
| > two-step:
| > 
| >    i)  take the Protocol Buffers folks by their word and see if you can  build
| >       a MinGW library and binary; this should work with  a regular MSys but
| >       you may need to install a few tools;  I recall it failed for me when it
| >       came to libtool so  maybe I had a bad libtool version
| > 
| >   ii) with a library from i), we  should be able to have R and RProtoBuf take
| >       advantage of  it.
| > 
| > Doing i) would be a really great help. 
| > 
| > We could even talk to  Uwe to see if he'd want it for CRAN builds.
| > 
| > Dirk
| > 
| > -- 
| > Dirk  Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
| > 

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rprotobuf-yada mailing list