[Rd] Using Rtools with gcc 4.8.3
I started working on some R bindings for mongo-c-driver [1]. The C library compiles fine on Ubuntu Trusty (gcc 4.8.2) and osx (clang), however on my windows machine (gcc 4.6.3 from Rtools 3.1) it fails with: 'INIT_ONCE_STATIC_INIT' undeclared. Google suggests that this might be a problem in older versions of mingw-w64. So I grabbed a copy of mingw-w64 version 4.8.3 and indeed, here the library compiles without errors. Now I am unsure how to make mingw 4.8.3 work with Rtools. I extracted the contents of [2] into "C:\RBuildTools\3.1\gcc-4.8.3\" and my package Makevars contains CC = "c:/RBuildTools/3.1/gcc-4.8.3/bin/gcc" However it seems like R still uses the old gcc 4.6.3 for R CMD INSTALL. What am I doing wrong? Is there a recommended setup for building packages on Windows using a Rtools but with another compiler? In addition: will I be able to publish this package to CRAN, or do I have to wait for Rtools to get updated with a more recent gcc? [1] https://github.com/mongodb/mongo-c-driver [2] http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.8.3/threads-posix/dwarf/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Using Rtools with gcc 4.8.3
On 05.10.2014 12:20, Jeroen Ooms wrote: I started working on some R bindings for mongo-c-driver [1]. The C library compiles fine on Ubuntu Trusty (gcc 4.8.2) and osx (clang), however on my windows machine (gcc 4.6.3 from Rtools 3.1) it fails with: 'INIT_ONCE_STATIC_INIT' undeclared. Google suggests that this might be a problem in older versions of mingw-w64. So I grabbed a copy of mingw-w64 version 4.8.3 and indeed, here the library compiles without errors. Now I am unsure how to make mingw 4.8.3 work with Rtools. I extracted the contents of [2] into "C:\RBuildTools\3.1\gcc-4.8.3\" and my package Makevars contains CC = "c:/RBuildTools/3.1/gcc-4.8.3/bin/gcc" However it seems like R still uses the old gcc 4.6.3 for R CMD INSTALL. What am I doing wrong? Is there a recommended setup for building packages on Windows using a Rtools but with another compiler? In addition: will I be able to publish this package to CRAN, or do I have to wait for Rtools to get updated with a more recent gcc? Currently only 4.6.3 is supported and that is the one used to build binary packages on CRAN. Hence you need to wait until it is updated. Best, Uwe Ligges [1] https://github.com/mongodb/mongo-c-driver [2] http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.8.3/threads-posix/dwarf/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Using Rtools with gcc 4.8.3
On Sun, Oct 5, 2014 at 6:51 AM, Uwe Ligges wrote: > > > On 05.10.2014 12:20, Jeroen Ooms wrote: >> >> I started working on some R bindings for mongo-c-driver [1]. The C >> library compiles fine on Ubuntu Trusty (gcc 4.8.2) and osx (clang), >> however on my windows machine (gcc 4.6.3 from Rtools 3.1) it fails >> with: 'INIT_ONCE_STATIC_INIT' undeclared. Google suggests that this >> might be a problem in older versions of mingw-w64. So I grabbed a copy >> of mingw-w64 version 4.8.3 and indeed, here the library compiles >> without errors. >> >> Now I am unsure how to make mingw 4.8.3 work with Rtools. I extracted >> the contents of [2] into "C:\RBuildTools\3.1\gcc-4.8.3\" and my >> package Makevars contains >> >>CC = "c:/RBuildTools/3.1/gcc-4.8.3/bin/gcc" >> >> However it seems like R still uses the old gcc 4.6.3 for R CMD >> INSTALL. What am I doing wrong? Is there a recommended setup for >> building packages on Windows using a Rtools but with another compiler? >> >> In addition: will I be able to publish this package to CRAN, or do I >> have to wait for Rtools to get updated with a more recent gcc? > > > Currently only 4.6.3 is supported and that is the one used to build binary > packages on CRAN. Hence you need to wait until it is updated. > > Best, > Uwe Ligges > > >> >> [1] https://github.com/mongodb/mongo-c-driver >> [2] >> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.8.3/threads-posix/dwarf/ >> Are there any plans for this? gcc is already up to 4.9.1 and I am sure a lot of people would like to see the latest version available as part of Rtools. -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Using Rtools with gcc 4.8.3
Le 5 oct. 2014 à 13:14, Gabor Grothendieck a écrit : > On Sun, Oct 5, 2014 at 6:51 AM, Uwe Ligges > wrote: >> >> >> On 05.10.2014 12:20, Jeroen Ooms wrote: >>> >>> I started working on some R bindings for mongo-c-driver [1]. The C >>> library compiles fine on Ubuntu Trusty (gcc 4.8.2) and osx (clang), >>> however on my windows machine (gcc 4.6.3 from Rtools 3.1) it fails >>> with: 'INIT_ONCE_STATIC_INIT' undeclared. Google suggests that this >>> might be a problem in older versions of mingw-w64. So I grabbed a copy >>> of mingw-w64 version 4.8.3 and indeed, here the library compiles >>> without errors. >>> >>> Now I am unsure how to make mingw 4.8.3 work with Rtools. I extracted >>> the contents of [2] into "C:\RBuildTools\3.1\gcc-4.8.3\" and my >>> package Makevars contains >>> >>> CC = "c:/RBuildTools/3.1/gcc-4.8.3/bin/gcc" >>> >>> However it seems like R still uses the old gcc 4.6.3 for R CMD >>> INSTALL. What am I doing wrong? Is there a recommended setup for >>> building packages on Windows using a Rtools but with another compiler? >>> >>> In addition: will I be able to publish this package to CRAN, or do I >>> have to wait for Rtools to get updated with a more recent gcc? >> >> >> Currently only 4.6.3 is supported and that is the one used to build binary >> packages on CRAN. Hence you need to wait until it is updated. >> >> Best, >> Uwe Ligges >> >> >>> >>> [1] https://github.com/mongodb/mongo-c-driver >>> [2] >>> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.8.3/threads-posix/dwarf/ >>> > > Are there any plans for this? gcc is already up to 4.9.1 and I am > sure a lot of people would like to see the latest version available as > part of Rtools. +1. Please. I’d like a newer gcc as part of Rtools too. My reason for it is that it would bring actual C++11, rather than unfinished C++0x as gcc 4.6.3 currently ships. That would allow more adoption of the newer C++ standard for packages [*]. Furthermore, a current version of gcc will also give a good support for C++14, the current C++ standard. I said it in the past, I don’t have the skills to make this happen myself but I would consider funding someone’s time (within reason) and offer mine for testing it. Romain *: currently Rcpp11, the best way to connect R and C++11, has to compromise on what C++11 means so that it works on windows. This is bad. The compromise is minimal, but still. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Using Rtools with gcc 4.8.3
Le 5 oct. 2014 à 13:56, Romain François a écrit : > > Le 5 oct. 2014 à 13:14, Gabor Grothendieck a écrit : > >> On Sun, Oct 5, 2014 at 6:51 AM, Uwe Ligges >> wrote: >>> >>> >>> On 05.10.2014 12:20, Jeroen Ooms wrote: I started working on some R bindings for mongo-c-driver [1]. The C library compiles fine on Ubuntu Trusty (gcc 4.8.2) and osx (clang), however on my windows machine (gcc 4.6.3 from Rtools 3.1) it fails with: 'INIT_ONCE_STATIC_INIT' undeclared. Google suggests that this might be a problem in older versions of mingw-w64. So I grabbed a copy of mingw-w64 version 4.8.3 and indeed, here the library compiles without errors. Now I am unsure how to make mingw 4.8.3 work with Rtools. I extracted the contents of [2] into "C:\RBuildTools\3.1\gcc-4.8.3\" and my package Makevars contains CC = "c:/RBuildTools/3.1/gcc-4.8.3/bin/gcc" However it seems like R still uses the old gcc 4.6.3 for R CMD INSTALL. What am I doing wrong? Is there a recommended setup for building packages on Windows using a Rtools but with another compiler? In addition: will I be able to publish this package to CRAN, or do I have to wait for Rtools to get updated with a more recent gcc? >>> >>> >>> Currently only 4.6.3 is supported and that is the one used to build binary >>> packages on CRAN. Hence you need to wait until it is updated. >>> >>> Best, >>> Uwe Ligges >>> >>> [1] https://github.com/mongodb/mongo-c-driver [2] http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.8.3/threads-posix/dwarf/ >> >> Are there any plans for this? gcc is already up to 4.9.1 and I am >> sure a lot of people would like to see the latest version available as >> part of Rtools. > > +1. Please. I’d like a newer gcc as part of Rtools too. My reason for it is > that it would bring actual C++11, rather than unfinished C++0x as gcc 4.6.3 > currently ships. That would allow more adoption of the newer C++ standard for > packages [*]. > > Furthermore, a current version of gcc will also give a good support for > C++14, the current C++ standard. > > I said it in the past, I don’t have the skills to make this happen myself but > I would consider funding someone’s time (within reason) and offer mine for > testing it. > > Romain > > *: currently Rcpp11, the best way to connect R and C++11, has to compromise > on what C++11 means so that it works on windows. This is bad. The compromise > is minimal, but still. Those missing features in C++0x from 4.6.3 include: - delegate constructors - template aliases (a more powerful `using` keyword We’ve worked around that, but at the expense of some code clarity, safety and boilerplateness (esp. the delegate constructor feature). __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Using Rtools with gcc 4.8.3
On 05/10/2014, 6:20 AM, Jeroen Ooms wrote: > I started working on some R bindings for mongo-c-driver [1]. The C > library compiles fine on Ubuntu Trusty (gcc 4.8.2) and osx (clang), > however on my windows machine (gcc 4.6.3 from Rtools 3.1) it fails > with: 'INIT_ONCE_STATIC_INIT' undeclared. Google suggests that this > might be a problem in older versions of mingw-w64. So I grabbed a copy > of mingw-w64 version 4.8.3 and indeed, here the library compiles > without errors. > > Now I am unsure how to make mingw 4.8.3 work with Rtools. I extracted > the contents of [2] into "C:\RBuildTools\3.1\gcc-4.8.3\" and my > package Makevars contains > > CC = "c:/RBuildTools/3.1/gcc-4.8.3/bin/gcc" > > However it seems like R still uses the old gcc 4.6.3 for R CMD > INSTALL. What am I doing wrong? Is there a recommended setup for > building packages on Windows using a Rtools but with another compiler? No, but I'd like to update Rtools to use the new compiler. Have you got some time to help with that? Duncan Murdoch > > In addition: will I be able to publish this package to CRAN, or do I > have to wait for Rtools to get updated with a more recent gcc? > > > [1] https://github.com/mongodb/mongo-c-driver > [2] > http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.8.3/threads-posix/dwarf/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Using Rtools with gcc 4.8.3
On Sun, Oct 5, 2014 at 2:29 PM, Duncan Murdoch wrote: > No, but I'd like to update Rtools to use the new compiler. Have you got > some time to help with that? Sure I'm not exactly a windows expert but I'll help where I can (and it seems others on the list are willing to jump in as well) __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel