From edd at debian.org  Thu Mar 10 18:22:30 2016
From: edd at debian.org (Dirk Eddelbuettel)
Date: Thu, 10 Mar 2016 11:22:30 -0600
Subject: [Rd] Problem building R-3.2.4
In-Reply-To: <56E1A60B.6060701@oracle.com>
References: <56E1A60B.6060701@oracle.com>
Message-ID: <22241.44374.630560.420218@max.nulle.part>


On 10 March 2016 at 08:51, Mick Jordan wrote:
| I am trying to build R-3.2.4 on an Oracle Enterprise Linux system, where 
| I have previously built R-3.1.3 and predecessors without problems. I ran 

Well that is pretty much why R Core asks us to build early, and build often.

| "./configure --with-x=no" ok. The make fails in src/extra/xz with what 
| looks like a Makefile problem:
| 
| liblzma.a: $(liblzma_a_OBJECTS)
|      $rm -f $@
|      $(AR) -cr $@ $(liblzma_a_OBJECTS)
|      $(RANLIB) $@
| 
| 
| What I see in the make log is:
| 
| gcc -std=gnu99 -I./api -I. -I../../../src/include -I../../../src/include 
| -I/usr/local/include -DHAVE_CONFIG_H -fopenmp  -g -O2  -c x86.c -o x86.o
| m -f liblzma.a
| make[4]: m: Command not found
| make[4]: *** [liblzma.a] Error 127
| make[4]: Leaving directory `/tmp/R-3.2.4/src/extra/xz'
| make[3]: *** [R] Error 2
| make[3]: Leaving directory `/tmp/R-3.2.4/src/extra/xz'
| make[2]: *** [make.xz] Error 2
| make[2]: Leaving directory `/tmp/R-3.2.4/src/extra'
| make[1]: *** [R] Error 1
| make[1]: Leaving directory `/tmp/R-3.2.4/src'
| make: *** [R] Error 1
| 
| I'm very suspicious of the "$rm -f @a" line, which also appears in the 
| Makefile.in. Seems like $r has resolved to empty leading to the command 
| "m -f liblzma.a"

The same issue was already reported (and resolved) in the bug tracker earlier
today.  All this is due to 'most systems' using their system lzma (so the
issue was not tickled in eg all the Debian and Ubuntu builds we do) but you
here do not -- and hence got bitten by a Makefile typo.

Just fix it locally to

      @rm -f $@

or use a system lzma.  More details at 

   https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16755

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



[Rd] Problem building R-3.2.4
Dirk Eddelbuettel