New Windows binary for R 3.3.0

Updated 22 June 2016

One of the important changes in this release 3.3.0 of R is the use of a new toolchain for  Windows. Unfortunately, for packages written in C++, the new toolchain is incompatible with the old one. So I had to build a new version of JAGS for use with R 3.3.0 and above.

When you upgrade to R 3.3.0 or higher you will need to remove the current installed version of JAGS (using the Control Panel) and run the  JAGS-4.2.0-Rtools33.exe installer. Then you will be able to install the binary rjags package from CRAN.

If you continue to use R 3.2.5 or earlier then you should not use the new installer but should continue to use  JAGS-4.2.0.exe.

Q: Why is this important?

A: If you install a version of JAGS that does not match your R installation then the rjags package will spontaneously crash.

Q: Why is this happening?

A: The Rtools compiler creates binaries that are statically linked to the C++ runtime. This is good because it means that R does not need to ship with a dynamic link library (DLL) for the C++ runtime (avoiding DLL Hell). It is harmless for the vast majority of R packages that are completely self contained. However, it is a problem for packages that need to interface to an external C++ DLL. Both the R package (e.g. rjags) and the external DLL (e.g. JAGS) must be compiled with the same compiler.

Q: This is a bit awkward isn’t it?

Yes it is awkward for JAGS users. However, in terms of the management of R packages this is a minority issue. As far as I know, the only other R packages affected are the ones that interface to SYMPHONY, gdal, and QuantLib.



5 thoughts on “New Windows binary for R 3.3.0

  1. Hi I am using R verion 3.3.0 and I just downloaded and run the JAGS-4.2.0-Rtools33.exe installer but am getting the error:

    Warning in install.packages :
    package ‘C:/Users/usuario/Downloads/JAGS-4.2.0-Rtools33.exe’ is not available (for R version 3.3.0)
    I do not have any versions of JAGS already installed so don´t think that is the problem. Any advice?

    • That is not how you install JAGS. After downloading the installer JAGS-4.2.0-Rtools33.exe you should open Windows Explorer and double click on the icon. This will launch the installer. After installation of JAGS is completed you should then launch R and use install.packages(“rjags”) from your R session to install the rjags package.

  2. Thanks for all your work in producing JAGS and keeping it up to date. But can you please rebadge JAGS 4.2.0-Rtools33 as 4.2.1?
    I’m drafting an email to participants at a workshop next month, some of whom need to get their IT dept to install software on their laptops. It would be so much easier if I could say, “Upgrade to R 3.3.0 and to JAGS 4.2.1. If you must still use R 3.2.x, you need JAGS 4.2.0”. Right now it’s a mess and folks will get it wrong.
    Rebadging would also make trouble-shooting easier, as loading rjags would give a message saying “Linking to JAGS 4.2.1”. You could see if it was the right version for their R installation.
    Thanks, Mike.

    • Mike, I’m planning to switch over the default Windows installer to the Rtools33 one with the release of R 3.3.1 this Tuesday. Will this help?

      Not everybody likes to upgrade to an x.y.0 release, but x.y.1 means that any new bugs introduced with the .0 release have been ironed out. You can then tell everyone to use R 3.3.0 or above and use the new installer (which will be the default).

      In the long term, I need to put some more bullet-proofing into the JAGS installer and the rjags package so it can warn the user when there is binary incompatibility without crashing. This will happen again as the “new” toolchain for Windows is based on quite an old version of gcc, and will need to be upgraded again at some point (e.g. to supper C++14).

      • OK I think I have found a solution. I have made the default download for Windows an HTML file. When a Windows user presses the “Download” button, it will download the HTML file which should then open up in their browser. This file contains instructions and links to the two installers, which should allow the user to find the appropriate installer based on their R version.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s