R 0.65 and AIX: if it quacks like a duck...

Thomas Vogels Thomas Vogels <tov@ece.cmu.edu>
Mon, 19 Jul 1999 22:04:54 -0400


Hi,

  this relates to R-devel of 1999/July/18.  I will outline what I had
to change to get R to compile with cc then with gcc.  Note that R
compiled with cc works, R compiled with gcc is broken.

--> Compile with cc:

1) Edit src/main/saveload.c: disable the undefine! With the #undef
_XOPEN_SOURCE_EXTENDED the compilation dies an untimely death.
(And the header files are not as badly broken for cc!)

2) Edit src/appl/sock.c: dto.

3) Edit src/unix/system.c: need a "break;" after default: in line 752
(yes, won't compile without)

4) Edit src/main/builtin.c: line 318 should read "#endif /* NOT_used */"
 (get rids of the warning)

5) CC=cc ../configure

Note this is broken for the dependency check (ld barfs the error
message to stdout instead of the log file?)
checking whether cc accepts -M for generating dependencies... ld:
0711-317 ERROR
: Undefined symbol: .main
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
no

Note 2 that configure leaves a file called "-fp-no-toc" behind.  Oops.

6) make && make check and everything looks ok.


--> Compile with gcc:

1) 2) 3) 4) like above

Additionally edit *sock.c:

5b) In appl/Rsock.c and appl/sock.c added `#include "Rconfig.h"'
(This doesn't hurt the cc compilation.)

6b) CC=gcc ../configure

Surprises:  this finds libcurses and libz.  I don't know where,
though.  So I manually remove -lreadline -lz -lcurses from the LIBS
line in Makeconf.  Note that I add my private readline with the help
of CPPFLAGS and LIBS in config.site (thanks, Kurt).

7b) edit Rconfig.h:
#ifdef __GNUC__
typedef long blkcnt_t;
#endif

Yes, I NEED this for gcc 2.8.1.  This is a gcc bug, because
gcc -I/usr/include will compile.  What I've learned is that it is
essential to verify which include files the compiler finds, these are
not always the ones in /usr/include!  Maybe configure can pick this up?

This gets you to a point where things will compile.  What remains is
the NaN and Inf problem.  I've tried to disable the finite function by
overriding the configure result (a la finite=no).  But then R core
dumps.  And uh, those ugly tick marks...

I'm afraid this all doesn't make too much sense, it's a mess.

Lemme know, if there is something you want me to try.  
-tom

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