Build R RPMS on an older Fedora

I posted this in R-sig-fedora, or at least I thought I did. But the message did not appear.

A user wanted an R-3.0.1 RPM for Fedora 17, which reached end of life. That wasn’t being provided by Fedora or Epel because F17 had reached end of life. Here’s my answer, of which I’m proud.

It is easy to build your own RPM for your system. I don’t want to discourage your from updating, but it would not be hard at all. (I wrote out how a couple of years ago. http://pj.freefaculty.org/blog/?p=73. This is the old style way, but I’m old)

I have a Fedora 17 virtual machine, but only in 32 bit. I’m trying this now. R does not rely on cutting edge software, I’ll be stunned if I can’t build it in Fedora 17. F17 is still newer than EL6 in most things, after all.

This is an old VM, I did not start it for at least 6 months. Not completely up to date. The first attempt to rebuild R fails, it needs RPMs for libSM-devel, libICE-devel, libjpeg-devel, libpango-devel, libicu-devel, and about 20 others. I was little worried this will necessitate a complete update.

No, OK. I ran into a little wrinkle that it found an old version of the R package “compiler” and tried to use that, but after removing R, I got a clean build. Evidence:

http://pj.freefaculty.org/Fedora/17/i386/R

R-3.0.1-2.fc17.i386.rpm 06-Aug-2013 15:58 18K
R-3.0.1-2.fc17.src.rpm 06-Aug-2013 15:59 24M
R-core-3.0.1-2.fc17…> 06-Aug-2013 15:59 52M
R-core-devel-3.0.1-2..> 06-Aug-2013 15:59 91K
R-devel-3.0.1-2.fc17..> 06-Aug-2013 15:59 17K
R-java-3.0.1-2.fc17…> 06-Aug-2013 15:59 18K
R-java-devel-3.0.1-2..> 06-Aug-2013 15:59 18K
libRmath-3.0.1-2.fc1..> 06-Aug-2013 15:58 244K
libRmath-devel-3.0.1..> 06-Aug-2013 15:58 23K
libRmath-static-3.0…> 06-Aug-2013 15:58 127K

There’s one long-ish patch of almost build, then it fails because it finds the old copy of R’s compile. After removing old R, all good. But at the end you see the RPM pop out.

It runs, I installed it. I can’t say for sure if any functionality was omitted because this particular vm lacked some other devel package. But it proves a point. I guess you can tell if you look at the build output. I did most of this work in an Emacs eshell, you can see errors and failures.

http://pj.freefaculty.org/Fedora/17/i386/R/shell-20130806.txt

The 64bit version is left as an exercise for the reader :) Or somebody else who has a virtual machine for that. Or somebody who wants to incentivize me.

Although I changed to other linux systems, I still like RPM. The RPM system is a very well thought out thing. And I marvel once again at the autoconf magic of the R Core Team. I’ve never had patience to learn that, but I admire people who have.

About pauljohn

Paul E. Johnson is a Professor of Political Science at the University of Kansas. He is an avid Linux User, an adequate system administrator and C programmer, and humility is one of his greatest strengths.
This entry was posted in R and tagged , , . Bookmark the permalink.