[Rd] Notes on building a gcc toolchain for Rtools (but not multilib)

Duncan Murdoch murdoch.duncan at gmail.com
Tue Mar 10 19:44:29 CET 2015


On 10/03/2015 2:26 PM, Hsiu-Khuern Tang wrote:
> On Tue, Mar 10, 2015 at 4:07 AM, Duncan Murdoch
> <murdoch.duncan at gmail.com> wrote:
> > On 09/03/2015 11:02 PM, Hsiu-Khuern Tang wrote:
> >> Hi Duncan,
> >>
> >> On Mon, Mar 9, 2015 at 10:40 AM, Duncan Murdoch
> >> <murdoch.duncan at gmail.com> wrote:
> >>> On 09/03/2015 11:07 AM, Hsiu-Khuern Tang wrote:
> >>>>
> >>>> On Mon, Mar 9, 2015 at 3:50 AM, Duncan Murdoch <murdoch.duncan at gmail.com>
> >>>> wrote:
> >>>>> On 08/03/2015 10:02 PM, Hsiu-Khuern Tang wrote:
> >>>>>> Hi,
> >>>>>>
> >>>>>> [This is a follow-up to the "New version of Rtools for Windows" thread
> >>>>>> in January, but I just subscribed and don't know how to reply to an
> >>>>>> old thread -- my apologies.]
> >>>>>
> >>>>> I am planning to put a new Rtools online today that uses a different
> >>>>> build of gcc 4.9.2.  I will be concentrating on getting it to work with
> >>>>> all the external libraries before the 3.2.0 release next month.  I'm not
> >>>>> planning to try to get it to work with R-patched, and I expect it won't:
> >>>>>  I needed to make a number of patches to R-devel for compatibility.
> >>>>
> >>>> I also worked off R-devel (I said wrongly that it was R-patched in my
> >>>> original post) and benefited from your compatibility changes.
> >>>>
> >>>> I look forward to the new Rtools and will test it by compiling some
> >>>> packages.
> >>>
> >>>
> >>> It's now on the main site at CRAN, and should propagate to the mirrors
> >>> reasonably quickly.  I'm hoping that tomorrow's R-devel build will use it,
> >>> but there may be some last minute problems.
> >>
> >> Is the new Rtools at
> >> http://cran.r-project.org/bin/windows/Rtools/Rtools33.exe?  I'm still
> >> getting "Error 404 object not found".
> >
> > There were some permission problems on the file for a while yesterday;
> > perhaps the index page got propagated but the actual file didn't.
> >
> > Duncan Murdoch
> >
>
> Got it now, thanks!  Are you planning to publish the build scripts for
> the new Rtools as well?

Yes, they are on pre-CRAN now (that's where I put things, CRAN picks 
them up from there, the mirrors pick them up from CRAN).  Not sure when 
they'll propagate, but the URL is

bin/windows/Rtools/scripts

I'm going to be uploading a new Rtools33.exe in a few minutes.  It puts 
back gdb, which had been included in the 4.6.3 build but not this one; 
it is now in Rtools/bin as gdb.exe for 32 bits and gdb64.exe for 64 
bits.  It also cleans up the PATH editing; the new scheme doesn't need 
gcc to be on the PATH.  And the index page points to the scripts.

Duncan Murdoch
>
> I did the following limited test on the new Rtools:
>
> R CMD INSTALL --no-multiarch Rcpp_0.11.5.tar.gz
>
> I did this under various settings:
>
> - the default settings
> - with -std=c++11 added to CXXFLAGS in my .R\Makevars file.
>
> This was done under the newly released R-3.1.3, using the 64-bit R binary.
>
> Here are my findings:
>
> - With the default settings, the command succeeded
>
> - With -std=c++11, there were two problems:
>    + api.cpp failed to compile because it could not find execinfo.h
>      * I worked around this by using CXXFLAGS=-DWIN32 -std=c++11
>      * CXXFLAGS=-std=gnu++11 also works around this
>      * Maybe Rcpp needs to guard against this?
>    + the package could not be loaded because some of the object files
> contain symbols named .refptr.* and .weak.*, which should be excluded
> from the exports list
>      * To work around this, put this line in .R\Makevars: NM_FILTER = |
> sed -e '/\.refptr\./d; /\.weak\./d'
>
>
> - Hsiu-Khuern
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list