Bug 1465647 - R 3.4.0 brings in Cairo built with R 3.3.3, which breaks
Summary: R 3.4.0 brings in Cairo built with R 3.3.3, which breaks
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: R
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-27 20:34 UTC by David Mathog
Modified: 2017-06-29 15:05 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-29 15:05:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description David Mathog 2017-06-27 20:34:23 UTC
Description of problem:

R-3.4.0-2.el6.x86_64 or an associated RPM brings in Cairo built with R 3.3.3
and that version of Cairo breaks "shiny-server".


Version-Release number of selected component (if applicable):
This is on Centos 6.9.  RPM named above.

How reproducible:
100%


Steps to Reproduce:
1. install R-3.4.0
2. run R
3. pkgs <- as.data.frame(installed.packages(), stringsAsFactors = FALSE, row.names = FALSE)
4. pkgs[, c("Package", "Version", "Built")]

Actual results:

output line for Cairo is:

7          Cairo    1.5-9 3.3.3


Expected results:

7          Cairo    1.5-9 3.4.0


Additional info:

The 3.4.0 build breaks shiny-server, resulting in a crash dump like:

*** caught segfault ***
address 0xd3, cause 'memory not mapped'

Traceback:
 1: .External("cairo_create_new_device", as.character(ctype), file,     width, height, pointsize, bg, canvas, umpl, dpi, ..., PACKAGE = "Cairo")
 2: Cairo(width, height, type = "png", file = filename, pointsize = pointsize,     bg = bg, res = res, ...)
...

The problem can be resolved from within R by:

> install.packages("Cairo")

after which shiny-server works again and in the test described above
Cairo shows the expected "3.4.0".

This problem showed up on a production system which was previously running R 3.3.3.  A second, near duplicate system, where automatic updates were broken, so it had not updated to R 3.4.0, did not even show Cairo from within R
using the test above.  Upgrading R manually to 3.4.0 broke shiny-server like the production system, and then reinstalling Cairo in R fixed it.

Comment 1 Tom "spot" Callaway 2017-06-29 15:05:13 UTC
R (the source component from upstream) does not include the "Cairo" package library. It lives in CRAN:
   https://cran.r-project.org/web/packages/Cairo/

This means that the EPEL R package didn't build it at all (right, wrong, or otherwise). :)

R 3.4.0 is a little special. Buried in the release notes (https://cran.r-project.org/doc/manuals/r-release/NEWS.html) is this gem:

PACKAGE INSTALLATION

  ...

    Packages which register native routines for .C or .Fortran need to be re-installed for this version (unless installed with R-devel SVN revision r72375 or later).

*****

As you have pointed out, on your system, the Cairo package library was built against R 3.3.3, and needs to be rebuilt against 3.4.0 before it works properly again. In fact, all R package libraries which are compiled from C/Fortran will need the same treatment, but simply rerunning install.packages() for each module installed before 3.4.0 should do the trick. 

Sorry for the confusion. In Fedora, we provide some CRAN package libraries as RPMS (though, not so much in EPEL), and we rebuilt all of them from source at the same time as the R 3.4.0 update to minimize this impact, but there is no good way for us to rebuild installed package libraries on end-user systems.


Note You need to log in before you can comment on or make changes to this bug.