GNU bug report logs -
#18662
Local -L flags for "make check" appear too late under HP-UX
Previous Next
To reply to this bug, email your comments to 18662 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-automake <at> gnu.org
:
bug#18662
; Package
automake
.
(Wed, 08 Oct 2014 11:34:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Vincent Lefevre <vincent <at> vinc17.net>
:
New bug report received and forwarded. Copy sent to
bug-automake <at> gnu.org
.
(Wed, 08 Oct 2014 11:34:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I reported the following bug
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9728
against libtool a few years ago, but it was said that the bug was in
autoconf or automake (then, I suspect automake). I don't know whether
something has been done on the automake side; I don't have access to
HP-UX machines any longer.
The problem is the following.
To be able to build the MPFR library, the user may need to add some
search path when invoking configure, in order to find the GMP library
(on which MPFR depends). This is done via LDFLAGS, either explicitly
or by the configure script if the user has provided a --with-gmp=DIR
option. The setting of LDFLAGS for such a purpose is standard and
documented in the Automake manual (AM_LDFLAGS could be used too, with
the same effect).
Then, for "make check", the path to the MPFR library that has just
been built or the library filename itself must be added to the link
command by the autotools (automake?). Under GNU/Linux, the filename
../src/.libs/libmpfr.so is used, and there are no problems. But under
HP-UX, it is the path that is added (here, the -L../src/.libs flag),
and this is done in LIBS, which appears at the end of the command,
and in particular *after* $(LDFLAGS):
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)
which gives for instance:
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
(see the -L/opt/gnu/lib before -L../src/.libs).
This means that search paths added via AM_LDFLAGS and/or LDFLAGS have
the precedence over the local search path, and if an old version of
the library is installed in some LDFLAGS search path (which happens),
it will be used for "make check" instead of the library that has just
been built.
--
Vincent Lefèvre <vincent <at> vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
This bug report was last modified 10 years and 252 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.