[Rd] Package Matrix does not compile in R-devel_2009-01-10

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jan 13 12:04:44 CET 2009

I've discovered that Mac OS still has a FreeBSD make with which I can 
reproduce this.  So I am working with Martin on a patch for the next 
Matrix update.

Meanwhile, if there is an issue with building R-devel with GNU make 
under FreeBSD (e.g.

env MAKE=gmake ./configure
env MAKE=gmake make

we would like to know what it is (see the inline comment in my first 

On Mon, 12 Jan 2009, Rainer Hurling wrote:

> Thank you Brian,
> for this detailed answer. I think you are right with the new rules.
> Before contacting the maintainers I will try to collect some more information 
> about the observed failure. Without setting the environment variable MAKE to 
> gmake, I get excatly the same break when installing Matrix under R-2.8.1. So 
> I can test it under 2.8.1.
> Rainer
> On 11.01.2009 23:42 (UTC+1), Prof Brian Ripley wrote:
>> You need to take this up with the package maintainers: although recommended 
>> packages are distributed with R,  they are still contributed packages with 
>> separate maintainers.
>> At one point Matrix did work with a non-GNU make (the Solaris one) after 
>> suggestions from R-core members on how to remove the obvious GNUisms.  It 
>> would cetainly be helpful to let the package maintainers know what changes 
>> do work.  (I presume the issue is
>> amd_i_%.o: amd_%.c $(INC)
>>         $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -I../Include -DDINT -c $< -o $@
>> amd_l_%.o: amd_%.c $(INC)
>>         $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -I../Include -DDLONG -c $< -o 
>> $@
>> which are new rules since I was able to test.)
>> Unfortunately I can no longer build Matrix (and hence R-devel) on Solaris, 
>> as the Sun Studio compilers say some of the C++ code is invalid (and it 
>> looks so to me, and I reported it a while back): the file is 
>> spqr_front.cpp, so it has not got as far as the point that is giving you 
>> trouble.
>> On Sun, 11 Jan 2009, Rainer Hurling wrote:
>>> Dear developers,
>>> today I tried to build and install R-devel_2009-01-10 on FreeBSD 
>>> 8.0-CURRENT (i386) for testing purposes.
>>> All went well until compiling the now recommended (integrated) Matrix 
>>> package. At this point the following break occured:
>>> ------------------------------------------------
>>> begin installing recommended package Matrix
>>> * Installing *source* package 'Matrix' ...
>>> ** libs
>>> gcc -std=gnu99 -I/usr/local/R-devel/include -I./UFconfig 
>>> -I/usr/local/include -fpic  -g -O2 -c CHMfactor.c -o CHMfactor.o
>>> [..snip..]
>>> gcc -std=gnu99 -I/usr/local/R-devel/include -I../Include -I../../UFconfig 
>>> -I/usr/local/include    -fpic  -g -O2 -c colamd_global.c -o 
>>> colamd_global.o
>>> gcc -std=gnu99 -I/usr/local/R-devel/include -I../Include -I../../UFconfig 
>>> -I/usr/local/include    -fpic  -g -O2 -I../Include -DDLONG -c colamd.c -o 
>>> colamd_l.o
>>> ar -rucs ../../COLAMD.a colamd_global.o colamd_l.o # colamd.o
>>> ( cd Source ; make lib )
>>> gcc -std=gnu99 -I/usr/local/R-devel/include -I../Include -I../../UFconfig 
>>> -I/usr/local/include    -fpic  -g -O2 -c amd_global.c -o amd_global.o
>>> make: don't know how to make amd_l_1.o. Stop
>>> *** Error code 2
>>> Stop in /tmp/Rtmpx5nUS8/R.INSTALL10d63af1/Matrix/src/AMD.
>>> *** Error code 1
>>> Stop in /tmp/Rtmpx5nUS8/R.INSTALL10d63af1/Matrix/src.
>>> ERROR: compilation failed for package 'Matrix'
>>> * Removing '/usr/local/R-devel/library/Matrix'
>>> *** Error code 1
>>> Stop in /usr/local/R-devel/src/library/Recommended.
>>> *** Error code 1
>>> Stop in /usr/local/R-devel/src/library/Recommended.
>>> *** Error code 1
>>> Stop in /usr/local/R-devel.
>>> ------------------------------------------------
>>> Please note, that on FreeBSD there is a BSD 'make' as default. If I want 
>>> to use gmake instead, I explicitly have to set it. Unfortunately this does 
>>> not work within building the whole R-devel system.
>> It would be helpful to know why not.  AFAIK GNU make works on other 
>> platforms with their own make.
>>> With R-2.8.1 I have no problems installing and using R. When I want to 
>>> build the (external) Matrix package I have to set an environment variable 
>>> to gmake, found at /usr/local/bin/gmake and all works well.
>>> Now my question: Is it possible to change the configure/build of the 
>>> integrated Matrix package on R-devel? For all other packages there is no 
>>> need to do so (at least for FreeBSD ;-)
>>> Please let me know if I can help.
>>> Thanks in advance,
>>> Rainer Hurling

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-devel mailing list