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

Thomas Vogels Thomas Vogels <tov@ece.cmu.edu>
29 Jul 2001 16:10:47 -0400


ripley@stats.ox.ac.uk writes:

> 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
> standards!

Oops.  Should have used the contents of the date stamp file...

> > 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.

...which means I should have said...
 Line 1473 in m4/libtool.m4 contains the unterminated string.

Hmm, should the name of the file suggest to me that it's part of some
other package, like 'libtool', and I should file a bug report with
it's maintainer?

> > 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.)

Guilty as suspected.  My bash and perl is rather old...  

> > 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.

I'm not and I won't.  I'll live with my old perl since I don't want to
download and compile perl and bash...  I have a work around and if the
installation fails for somebody else they might have a hack available
when they search the r-bugs/r-devel archive.  Should I encounter the
problem again with a current installation (on a different system),
I'll let you know, otherwise I'll shut up.


> > 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.)

True (especially the portability argument) if globbing is handled in
C in Perl nowadays.  I'd challenge the "slower" if Perl had to use the
shell since the shell would sort the file list which readdir won't.
 
> Your perl version is ?

Too embarassed to tell ;-)  Mea culpa, I'll bring up Perl issues in
the future only when I know I have a recent version...


> > 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-- 
mailto:tov@ece.cmu.edu (Tom Vogels)   Tel: (412) 268-6638   FAX: -3204
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._