From Thomas Vogels <tov@ece.cmu.edu>  Thu Jun 10 20:56:16 1999
From: Thomas Vogels <tov@ece.cmu.edu> (Thomas Vogels)
Date: Thu, 10 Jun 1999 15:56:16 -0400
Subject: dynload for R on AIX (>= 4.2)
In-Reply-To: Your message of "Thu, 10 Jun 1999 16:02:31 EDT."
 <Pine.A41.4.02.9906101559040.12136-100000@cauchy.mathematik.uni-essen.de>
Message-ID: <199906101956.PAA23332@infiniti.ece.cmu.edu>


"Arne" == Arne Kovac <kovac@cauchy.mathematik.uni-essen.de> writes:

Arne> I think you can skip creating the text file by changing the command line
Arne> options to
Arne> 
Arne> $(F77) -o module.so -bM:SRE -bexpall -bnoentry $(OBJECTS) $(LIBDIR)
Arne> $(LIBS)

Uh, works, kind of... 

| build/src/library/eda/src $ f77 -o eda.so -bM:SRE -bexpall -bnoentry line.o smooth.o 
| ld: 0711-317 ERROR: Undefined symbol: .rsort
| ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
| information.

The problem is that rsort is defined in sort.c.  So I put all the R
files in src/main into a library:

| build/src/main $ ar cr libR.a *.o

And run the linker again:

| build/src/library/eda/src $ f77 -o eda.so -bM:SRE -bexpall -bnoentry
| line.o smooth.o -L../../../main -lR  -L../../../unix -lunix
| -L../../../appl -lappl -L../../../nmath -lmath -lX11 -ldl -lblas

No error messages this time, but eda.so is big: 3020844 bytes.

Something ain't right here.  There should be a way of telling the
linker to not include the libs.  It should verify that all functions that
are referenced will be defined at runtime.  Comments?

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


dynload for R on AIX (>= 4.2)
Thomas Vogels