GNU bug report logs - #9728
Incorrect -L flags order for HP-UX

Previous Next

Package: libtool;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Tue, 11 Oct 2011 14:00:02 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vincent Lefevre <vincent <at> vinc17.net>
To: bug-libtool <at> gnu.org
Subject: Incorrect -L flags order for HP-UX
Date: Tue, 11 Oct 2011 15:58:30 +0200
With libtool 2.4 and automake 1.11.1, we have the following problem
for MPFR 3.1.0. We have received a bug report saying that when the
tests are run on a HP-UX machine, the following command is run:

libtool: link: gcc -O2 -s -o tversion tversion.o  -L/opt/gnu/lib ./.libs/libfrtests.a -lm -L../src/.libs -lmpfr -lgmp -Wl,+b -Wl,/xxx/gnu/mpfr-3.1.0/objdir/src/.libs:/opt/gnu/lib

The problem is that -L../src/.libs comes after -L/opt/gnu/lib, so that
linking is done against the MPFR version installed in /opt/gnu/lib
instead of the one from ../src/.libs, which has just been compiled.

-L/opt/gnu/lib comes from LDFLAGS (set up by the configure script);
it is needed to find some other library (GMP). -L../src/.libs is
added to find the MPFR library to be tested (it is necessary under
HP-UX). It seems to be added to $LIBS, where in tests/Makefile.in,
one gets:

LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@

tversion$(EXEEXT): $(tversion_OBJECTS) $(tversion_DEPENDENCIES)
        @rm -f tversion$(EXEEXT)
        $(LINK) $(tversion_OBJECTS) $(tversion_LDADD) $(LIBS)

Note: the problem cannot be reproduced under Linux, as
../src/.libs/libmpfr.so is used instead of -L... -lmpfr.

Thread of the bug report:
  http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00042.html

-- 
Vincent Lefèvre <vincent <at> vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)




This bug report was last modified 13 years and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.