[Rd] Compiling R (1.3.0) on AIX (4.3) fails (PR#1034)

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Sun, 29 Jul 2001 21:17:55 +0200 (MET DST)

On Sun, 29 Jul 2001 vogels@cmu.edu wrote:

> Hi,
> This email reports bugs in acinclude.m4, src/library/tcltk/src/Makefile,
> and share/perl/Rd2contents.pl.  It is based on R-patched.tgz from 07/27/2001
> (R 1.3.0) and comes from trying to compile R on AIX 4.3.

Would that be 2001-07-27?  Not all of us live in countries that flout ISO

> 1) acinclude.m4:  A string on line 3096 starts with a single quote: ' but
> is terminated with a double quote: ".  (This leads to the weird error
> message that configure can't execute 'shared' on line 4060.)
>      The fix is simply to use single quotes both times:
> allow_undefined_flag='${wl}-berok'

That is a generated file.  It coems from m4/libtool.m4.

> 2) after configure (with CC=gcc but using AIX's linker /usr/bin/ld), the
> Makefile in src/library/tcltk/src doesn't protect the linker flags -bI
> with -Xlinker! (-Xlinker is required when using gcc so that the linker flags
> are passed on to ld correctly.  Which I know that you know...)
>   The fix is to add -Xlinker before every -bI. Sorry, haven't looked into
> patching configure yet...
> 3) Rd2contents.pl:  this perl script fails in the base library!  There are
> too many files in the man directory and perl reports 'glob failed'.  When I
> try 'ls man/*.Rd'  bash also reports that the argument list is too long.  I

(! That looks like a bash bug.  Your bash version is ?  sh is supposed ot
have no line length limits.)

> don't know whether this limitation comes from AIX, bash or perl and why it
> doesn't happen with, say, Linux.

Do you have a current perl?  Globbing was changed in 5.6.0 to be handled
in C code, as I recall.  It does not happen on Solaris, Linux or Windows,
and I suspect a perl upgrade might fix it.  Try 5.6.1, if you are not
already using it.

> The fix is to replace the simple while loop (line 6):
>   while(<$ARGV[0]/man/*.Rd>){ &do_one; }
> with a loop over the contents of the directory using readdir:
> if (opendir RD, "$ARGV[0]/man") {
>     my $f;
>     while (defined ($f = readdir RD)) {
>      $_ = "$ARGV[0]/man/$f", &do_one if $f =~ m,.Rd$,;
>     }
>     closedir RD;
> }

(slower and less portable if it is not needed.)

Your perl version is ?

> A) tkConfig.sh contains a line like this:
>    TK_XINCLUDES='# no special path needed'
> This has nothing to do with R proper but this bug which is either in AIX or
> the local installation of X shows up during the compilation of R.  Anyhow,
> this line is plain stupid since when passed on to the compiler _comments
> out_ the rest of the line!  (Think about:
>   gcc fine_program.c #no special path needed -lX11 -Xm
> )  The fix is to use "TK_XINCLUDES=''" in tkConfig.sh
> Again, I know this is not a problem with R but I'm adding it here for people
> to find if they use the mailing list archive.
> After these changes R compiles (producing warnings about duplicate
> symbols...) and installs.  'make check' fails in mva--report to follow.
> Regards,
>   -tom
> --
> Email: vogels@cmu.edu
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch