Almost succesfull build on AIX

Kurt Hornik
Fri, 9 Jul 1999 17:13:29 +0200 (CEST)

>>>>> Thomas Vogels writes:

> (If you don't care about R on AIX, happily ignore this email...)

> First about Martin's question (concerning /usr/bin/make):
>   I took a quick look at the Makefile.  The problem is with the
> Makedeps target.  Replacing $< with $? solves the problem.  Shouldn't
> but does.  Will this break on other platforms?  Shouldn't but may.

Actually, replacing it by an explicit `Makefile' is much better.  Sorry
for that.  I keep forgetting that $< does strange things with some make
programs ... fixed now.

> "Kurt" == Kurt Hornik <> writes:

>>> 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> Please, NOT with 0.64.2.  All my configure/make changes are in 0.65!

> I know, but I also need a stable version.

:-)  (Actually, I think devel is more stable than release.  The major
difference is that configure/make changes are all in devel as they
typically are NOT bug fixes at all, so they must be in devel ...

Kurt> gcc (cannot find libgcc.a???)

> If gcc cannot find libgcc.a for any other compilation, I'd get worried
> in your place.  I might even get scared.
> For R.binary linking it's simple and necessary to search for
> libgcc.a and put it in the DLLFLAGS.  If you want to link with ld
> instead of cc/f77, you have to add default libs, like -lxlf90 -lxlf
> -lc -lm.  Which ones exactly, you can find out by calling ld with the
> nobind option.  Most instructive since this will result in the binder
> commands being printed.

How does this work exactly?

Kurt> The specs file is fine.  My question is, is that a known gcc problem on
Kurt> AIX or is that due to the rather outdated version of gcc we have?  If it
Kurt> is a general problem, I can easily add to DLLFLAGS.

> See above.  But we may not be talking about the same.  When is
> libgcc.a not found?

Here's what happens:

e8725245@fbma:/tmp/fl/build/src/main$ gmake LDCMD=gcc
gmake[1]: Entering directory `/tmp/fl/build/src/main'
gmake[1]: `Makedeps' is up to date.
gmake[1]: Leaving directory `/tmp/fl/build/src/main'
gmake[1]: Entering directory `/tmp/fl/build/src/main'
gcc -bdynamic -bE:../../etc/R.exp -bM:SRE -lc -lm -o ../../bin/R.X11 arithmetic.o array.o attrib.o bind.o builtin.o character.o coerce.o colors.o complex.o context.o cov.o cum.o debug.o deparse.o deriv.o devices.o dotcode.o dstruct.o duplicate.o envir.o errors.o eval.o format.o fourier.o gram.o gram-ex.o graphics.o iosupport.o list.o logic.o main.o match.o memory.o model.o names.o objects.o optimize.o options.o par.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o random.o relop.o saveload.o scan.o seq.o sort.o source.o split.o subassign.o subscript.o subset.o summary.o unique.o util.o version.o ../unix/libunix.a ../appl/libappl.a ../nmath/libmath.a  -lX11  -lblas  -L/usr/local/lib -lxlf90 -lxlf -lm  -ldl -ltermcap -lm 
ld: 0706-005 Cannot find or open file: libgcc.a
        ld:open(): No such file or directory
ld: 0706-005 Cannot find or open file: libgcc.a
        ld:open(): No such file or directory
gmake[1]: *** [../../bin/R.X11] Error 1
gmake[1]: Leaving directory `/tmp/fl/build/src/main'
gmake: *** [R] Error 2

???  and interestingly, adding
-L/usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/2.7.2/ does not help.

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

> Hmm, I have gcc 2.8.1 (for AIX 4.1) which barfs at sys/stat.h and
> friends. Somehow somebody forgot sometime about "typedef long
> blk_cnt".  Or something close to this effect.

> About DLLFLAGS, SHLIBLD etc:  Currently you'll probably need to know
> the libraries (-lm -lxlf ...) when linking a shared lib since the
> fortran library code is currently not exported via ldAIX4.  Is this
> "bad"?  Is it worth spending time to get this right, i.e. R.binary
> exports all symbols that are actually linked in?  Or can we live with
> the baggage of extra libs in SHLIBFLAGS and a little bit bigger shared
> libs?

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