From Kurt.Hornik@ci.tuwien.ac.at  Mon Jul 12 10:08:02 1999
From: Kurt.Hornik@ci.tuwien.ac.at (Kurt Hornik)
Date: Mon, 12 Jul 1999 11:08:02 +0200 (CEST)
Subject: Almost succesfull build on AIX
In-Reply-To: <199907100153.VAA16542@infiniti.ece.cmu.edu>
References: <14214.4505.64293.902996@aragorn.ci.tuwien.ac.at>
 <199907100153.VAA16542@infiniti.ece.cmu.edu>
Message-ID: <14217.45170.691017.489081@aragorn.ci.tuwien.ac.at>

>>>>> Thomas Vogels writes:

> These are some notes about compilation of R-devel (1999-July-08):

> -- Sorry, I forgot to pass this on: You (Kurt) should try to link with
> ld not with gcc.  (This will cover up that I have no clue why -L<path>
> wouldn't pick up libgcc.a.)  So the DLLFLAGS should contain -L<path>
> -lgcc where path is taken from "gcc --print-libgcc-file-name"

When I use ld for linking the main, I get

  Could not load program /tmp/fl/build/bin/R.X11 
  Error was: Exec format error

The problem seems to be __start

(ld): resolve
ld: 0711-327 WARNING: Entry point not found: __start
ld: 0711-228 WARNING: Duplicate symbols were found while resolving symbols.
        The following duplicates were found:
 Symbol                    Source-File(Object) OR Import-File{Shared-object}
 ------------------------- -------------------------------------------------
 errno                     {/usr/lib/libc.a[shr.o]}
    ** Duplicate **        main.c(main.o)
 gc_inhibit_torture        memory.c(memory.o)
    ** Duplicate **        main.c(main.o)
RESOLVE: 7982 of 18361 symbols were kept.
RESOLVE: The return code is 4.
(ld): addgl /usr/lib/glink.o
ADDGL: Glink code added for 171 symbols.
(ld): er full
ER: There are no unresolved symbols.
(ld): mismatch
MISMATCH: No type mismatches exist.

I can fix this by linking with

	/usr/lib/crt0_r.o -lpthreads

but is this the right thing to do?

-k

PS.  Also, I get

e8725245@fbma:/usr/lib$ strings libxlf90.a | grep start
__start
__start

but

e8725245@fbma:/usr/lib$ nm libxlf90.a  | grep start
nm: libxlf90.a[_xlf_aix42sys.imp]: 0654-203 Specify an XCOFF object module.

What is this?
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


Almost succesfull build on AIX
Kurt Hornik