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

aixtools aixtools at gmail.com
Wed Nov 4 17:31:13 CET 2015


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.
"A lot of hassle I fear - still not done" - so a brief update - and 
question - is this change (since 2015-10-17) really needed?

R-devel update (compared to R-3.2.2)

configure is now requiring bzlib.h - no idea what adding the file 
actually adds - but will do so.
I guess it is something someone added - when the real issue would be the 
library to link to!

configure:35647: checking bzlib.h presence
configure:35647: gcc -maix64 -E -I/opt/buildaix/include -I/opt/include  
conftest.c
configure:35647: $? = 1
configure: failed program was:
configure:35647: result: no
configure:35647: checking for bzlib.h
configure:35647: result: no
configure:35712: checking whether bzip2 support suffices
configure:35719: error: bzip2 library and headers are required
configure: exit 1

And after adding that:
configure:35689: 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 -lbz2 -lz -lrt -ldl -lm  
-liconv >&5
configure:35689: $? = 0
configure:35689: ./conftest
configure:35689: $? = 1
configure: program exited with status 1
configure: failed program was:
configure:35706: result: no
configure:35712: checking whether bzip2 support suffices
configure:35719: error: bzip2 library and headers are required
configure: exit 1
++++ ++++
root at x072:[/data/prj/cran/64/R-devel]lslpp -w | grep bz2.a
   /usr/opt/freeware/lib/libbz2.a              rpm.rte               File
root at x072:[/data/prj/cran/64/R-devel]find /usr /opt -name libbz2.a
/usr/lib/libbz2.a
/opt/freeware/lib/libbz2.a
root at x072:[/data/prj/cran/64/R-devel]find /usr /opt -name libbz2.a -ls
12472    1 lrwxrwxrwx  1 root      system          30 Oct 12 12:20 
/usr/lib/libbz2.a -> /usr/opt/freeware/lib/libbz2.a
  4119  193 -rwxr-xr-x  1 root      system      197216 Dec 20  2010 
/opt/freeware/lib/libbz2.a
root at x072:[/data/prj/cran/64/R-devel]find /usr /opt -name bzlib.h -ls
66420    7 -rw-r--r--  1 root      system        6245 Nov  3 10:15 
/opt/buildaix/include/bzlib.h

Seems a very specific bzip2 library is desired - 1.0.6 - not what the 
message says!

BZ2_version():1.0.5, 10-Dec-2007

/* end confdefs.h.  */
#include <stdio.h>

#ifdef HAVE_BZLIB_H
#include <bzlib.h>
#endif
int main() {
     char *ver = BZ2_bzlibVersion();
         fprintf(stderr,"BZ2_version():%s\n",ver); /* added by aixtools 
for debugging */
     exit(strcmp(ver, "1.0.6") < 0);
}

So, my question - is this REALLY needed (v1.0.6) as it may break many 
locations!

Updating bzip2 to pass configure...
Now get:
root at x072:[/data/prj/cran/64/R-devel]./xxx
BZ2_version():1.0.6, 6-Sept-2010

And a repeat for lzma it seems... Again, is this really necessary 
(versus convienent).
configure:35706: result: yes
configure:35712: checking whether bzip2 support suffices
configure:35715: result: no
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
++++ ++++

p.s. remember - this is something that has appeared since the R-devel of 
17-10-2015! Has R changed in some way to really need all these extra 
checks - versus - they were added for because they are used elsewhere?



More information about the R-devel mailing list