Almost succesfull build on AIX

Thomas Vogels Thomas Vogels <>
Wed, 07 Jul 1999 16:39:44 -0400

"Kurt" == Kurt Hornik <> writes:

>> Here's the problem:
>>> 1/0
>> [1]INF
>>> is.finite(1/0)
>> [1] TRUE

Much to my surprise, a 'printf ("%g", 1/.0)' prints INF in a C
program.  Should this not result in a floating point exception?

>> R was built using the flags included below, gcc version is 2.7.2. Does
>> anybody with experience on AIX know what's going on (the all uppercase
>> INF looks somewhat suspicious).

Because it's a return value, not the R string "Inf".  Wild guess,
lemme think about it.

Kurt> If I may add.  Building for me only works with LDCMD and SHLIBLD as
Kurt> f77
Kurt> or
Kurt> cc with `-lc -lm' added to DLLFLAGS and SHLIBLDFLAGS

Yes, there is still something wrong with the DLLFLAGS.  (Which also
shows up when you try to link local libraries (like a private copy of
the readline lib).)   I've played a little more with the way R.exp is
generated.  Let me try it on 64.2 and 65.

Kurt> It did not work with
Kurt> ld (gives an exec format error in the main binary)

My experience is that if I compile the main function with gcc then I
have to link with gcc, otherwise it can't find .__main.  Which leads

Kurt> gcc (cannot find libgcc.a???)
Yep and hmm.  Arne found that you can say "gcc --print-libgcc-file-name" and
then gcc actually does that.  You can add the result of the command on
the link line.  (If however gcc never finds libgcc.a then you're in
deep trouble.  Check wether you can find gcc's spec file.)

Kurt> I am not sure up to what extend this is a problem with AIX in general or
Kurt> the specific system Fritz and I have access to, which in particular has
Kurt> gcc built 3 years ago for AIX 3.something.

Probably something with AIX in general.

BTW, do you not get compiler errors about blkcnt not being defined
when you compile with gcc?  So far, I had to patch most programs
because there is a bug with the standard include files.


-- (Tom Vogels)   Tel: (412) 268-6638   FAX: -3204

r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: