Skip to content

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

6 messages · Brian Ripley, Kurt Hornik, Thomas J Vogels

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

            
Would that be 2001-07-27?  Not all of us live in countries that flout ISO
standards!
That is a generated file.  It coems from m4/libtool.m4.
(! That looks like a bash bug.  Your bash version is ?  sh is supposed ot
have no line length limits.)
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.
(slower and less portable if it is not needed.)

Your perl version is ?

  
    
#
ripley@stats.ox.ac.uk writes:
Oops.  Should have used the contents of the date stamp file...
...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?
Guilty as suspected.  My bash and perl is rather old...
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.
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.
Too embarassed to tell ;-)  Mea culpa, I'll bring up Perl issues in
the future only when I know I have a recent version...

  
    
#
Fixed now.  The file comes from libtool 1.4.  Unfortunately, we have to
patch it ourselves, as the libtool 1.4 `patch release' suddenly requires
autoconf 2.50 ...
Very strange.  Configure has

  *aix4.[2-9]*)
    EXPORTFILE="\$(top_builddir)/etc/R.exp"
    cpicflags=
    cxxpicflags=
    fpicflags=
    wl="-Wl,"
    main_ldflags="${wl}-bdynamic ${wl}-bE:${EXPORTFILE} ${wl}-bM:SRE"
    shlib_ldflags="${wl}-bM:SRE ${wl}-H512 ${wl}-T512 ${wl}-bnoentry \
      ${wl}-bexpall ${wl}-bI:\$(R_HOME)/etc/R.exp"
    SHLIB_LIBADD="\$(LIBM)"
    ;;

so unless I am missing something obvious all linker flages are protected
via `-Wl,' (which should also work if the C compiler is not gcc).

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Excerpt from Kurt's email this morning:
Sorry, should have been more explicit, I guess: the problem is with
PKG_LIBS (which is the only variable in that Makefile using linker
flags...)  Some digging shows that '-Wl,' (or '-Xlinker') is missing
in tkConfig.sh.  So if you have Tcl/Tk (8.3 in my case) installed and
used AIX's 'cc' compiler, you get in trouble with later using gcc
(e.g. for R).  Oddly, this didn't show when compiling, say, Tktable.

There is the question, why configure didn't "see" this coming.  What
would be nice is a warning to the effect that tkConfig.sh is broken
when R can't compile tcltk.c.  (Currently I get messages about libc.a
not found...)

Thanks,
  -tom
#
This is asking for a bit much, I think.  How would configure know for
sure that tkConfig.sh is broken?

On second thought: the comment in tkConfig.sh says

	# String to pass to linker to pick up the Tk library from its
	# installed directory.
	TK_LIB_SPEC='@TK_LIB_SPEC@'

so maybe this assumes to be called by ld directly ...

What happens if we omit TK_LIB_SPEC from TCLTK_LIBS?

-k


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> writes:
I promise to get more sleep soon... 'What would be nice is a warning
to the effect that the Tcl/Tk configuration failed, like:
checking how to compile and link tcl/tk.... failed
'  Asking about tkConfig.sh (or tclConfig.sh) is probably too muc as
threre are other factors that can cause the fail (config.site...).

What this would boil down to is trying to compile e.g. tkAppInit.c and
see whether compilation and linking works.  But even this may
be asking  fortoo much, this is just one architecture.  Things like these
will continue to happen with AIX as long as there are those '.exp'
files around...
hell breaks loose.  TK_LIB_SPEC contains '-bI/some/path/libtk8.3.exp'
which is needed badly when linking on AIX.

Thanks!
  -tom