[Rd] Building R for AIX in 64-bit mode

aixtools aixtools at gmail.com
Fri Nov 6 15:08:48 CET 2015

On 2015-11-04 17:46, aixtools wrote:
> On 2015-11-04 17:31, aixtools wrote:
>> On 2015-11-04 16:51, aixtools wrote:
>>> On 2015-10-15 15:02, Prof Brian Ripley wrote:
>>>> On 15/10/2015 13:32, Michael Felt wrote:
>>>>> Hi.
>>>>> Just wanted to let you know I am getting close to packaging R for 
>>>>> AIX in
>>>>> 64.bit mode.
>>>> Which version? (You mentioned 3.1.3 and 3.2.2 far below.)  There is 
>>>> little value in reporting on frozen branches, and most value in 
>>>> reporting on R-devel where all the current changes have been 
>>>> incorporated.
>>> This report is based on R-3.2.2 I shall repeat asap with R-devel and 
>>> report any significant differences.
> In particular - I wonder about lzma as I already knew this (having 
> built xz a long time ago. LZMA has been replaced by XZ. Do not know 
> why, and do not want to.
> BUT there is no reliable source for LZMA5 (the XZ project only reports 
> LZMA2 and LZMA4). Please see the wiki at: 
> https://en.wikipedia.org/wiki/XZ_Utils
> Paused for now - awaiting reply
Well, seems I stand corrected - it is not a change since 17 October, but 
since R-3.2.2 and some directories have been removed from R distribution.

However, I am wondering about this logic - of requiring both lzma and 
xz, whereas before xz was required if lzma was not available.
from the diff of R-3.2.2 and R-devel
   ## R_TRE
@@ -3192,11 +3270,10 @@
   ## Try finding liblzma library and headers.
   ## We check that both are installed,
- [if test "x${use_system_xz}" = xyes; then
-   AC_CHECK_LIB(lzma, lzma_version_number, [have_lzma=yes], [have_lzma=no])
-   if test "${have_lzma}" = yes; then
-     AC_CHECK_HEADERS(lzma.h, [have_lzma=yes], [have_lzma=no])
-   fi
+ [AC_CHECK_LIB(lzma, lzma_version_number, [have_lzma=yes], [have_lzma=no])
+ if test "${have_lzma}" = yes; then
+   AC_CHECK_HEADERS(lzma.h, [have_lzma=yes], [have_lzma=no])
+ fi
   if test "x${have_lzma}" = xyes; then
   AC_CACHE_CHECK([if lzma version >= 5.0.3], [r_cv_have_lzma],
@@ -3223,11 +3300,9 @@
   if test "x${have_lzma}" = xyes; then
     AC_DEFINE(HAVE_LZMA, 1, [Define if your system has lzma >= 5.0.3.])
     LIBS="-llzma ${LIBS}"
- fi
-   have_lzma="no"
+   AC_MSG_ERROR("liblzma library and headers are required")
- AM_CONDITIONAL(BUILD_XZ, [test x${have_lzma} != xyes])
   ])# R_LZMA

If I read the XZ portal - they say XZ is based on LZMA (and it seems the 
lzma support you are looking for comes from xz. So, what the false fail 
on lzma - as it seems it is only XZ you are looking for, or need.)
Having this more clear I can now understand the logic of your numbering 
(taking the version # of LZMA from XZ with the compression algorithm 
being LZMA2)

Anything re: gotchas between 3.2.2 and R-devel is appreciated.
>> configure:35724: checking for lzma_version_number in -llzma
>> configure:35757: gcc -maix64 -std=gnu99 -o conftest -I/opt/64/include 
>> -I/opt/buildaix/include -O2 -mminimal-toc -I/opt/buildaix/include 
>> -I/opt/include  -L/usr/local/lib conftest.c -llzma  -lbz2 -lz -lrt 
>> -ldl -lm  -liconv >&5
>> configure:35757: $? = 1
>> configure: failed program was:
>> configure:35766: result: no
>> configure:35851: error: "liblzma library and headers are required"
>> configure: exit 1
>> ++++ ++++

More information about the R-devel mailing list