autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wrong libraries found by autoconf on AIX/xlf


From: Juha Jäykkä
Subject: wrong libraries found by autoconf on AIX/xlf
Date: Tue, 15 Jun 2004 16:16:29 +0300

When trying to use mixed-source (C and F77) code and using autoconf's
facilities AC_F77_WRAPPERS, AC_F77_DUMMY_MAIN et alii on AIX and its xlf
compiler, the following happens.

Autoconf finds the verbose linking flag (-v), which produces the output
required to determine the libraries to use in linking. This output is
incorrectly parsed. What xlf outputs, is (more or less):

exec:/bin/ld(ld,-o,conftest,-b32,-b32,-bh:4,-bpT:0x10000000,-bpD:0x200000
00,/tmp/juolja/ipaBmZf7d.o,/lib/crt0.o,-lm,-lxlf90,-lxlopt,-lxlf,-lxlomp_
ser,-lc)

Now, this is parsed to mean:

"-link -lm -lxlf90 -lxlopt -lxlf -lxlomp_ser -lc)"

Later, when making the source, make fails, when the shell chokes on a
stray ")" on compilation line. Autoconf tries to make sure, libc is
excluded, but now it fails since it is immediately succeeded by a
parenthesis. A simple fix would be to check for "-lc\)" where there now
exist only checks for "-lang* | -lcrt[01].o | -lcrtbegin.o | -lc | -lgcc |
-libmil | -LANG:=*)".

Also, it seems -link is a parameter for the ld, telling it to actually
link the objects, not an attempt to link a library called libink, but I am
not quite sure about this.

Please confirm, what is the situation and whether it will be fixed soon (I
wrote a workaround in my configure.ac).

-- 
                 -----------------------------------------------
                | Juha Jäykkä, address@hidden                   |
                | Laboratory of Theoretical Physics             |
                | Department of Physics, University of Turku    |
                | home: http://www.utu.fi/~juolja/              |
                 -----------------------------------------------

Attachment: pgpb9oxo87omU.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]