GNU bug report logs - #15406
buggy library symlink install due to use of ldconfig

Previous Next

Package: libtool;

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

Date: Wed, 18 Sep 2013 11:29:02 UTC

Severity: normal

To reply to this bug, email your comments to 15406 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-libtool <at> gnu.org:
bug#15406; Package libtool. (Wed, 18 Sep 2013 11:29: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-libtool <at> gnu.org. (Wed, 18 Sep 2013 11:29:02 GMT) Full text and rfc822 format available.

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: buggy library symlink install due to use of ldconfig
Date: Wed, 18 Sep 2013 13:28:18 +0200
I've reported the following bug in the Debian BTS:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=723638

Some MPFR user found the following problem:

  https://sympa.inria.fr/sympa/arc/mpfr/2013-09/msg00018.html

which I can reproduce below.

When installing two different versions of MPFR in the same directory,
I get:

[...]
libtool: install: /usr/bin/install -c .libs/libmpfr.so.4.1.2 /home/vlefevre/tmpmpfr/lib/libmpfr.so.4.1.2
libtool: install: (cd /home/vlefevre/tmpmpfr/lib && { ln -s -f libmpfr.so.4.1.2 libmpfr.so.4 || { rm -f libmpfr.so.4 && ln -s libmpfr.so.4.1.2 libmpfr.so.4; }; })
libtool: install: (cd /home/vlefevre/tmpmpfr/lib && { ln -s -f libmpfr.so.4.1.2 libmpfr.so || { rm -f libmpfr.so && ln -s libmpfr.so.4.1.2 libmpfr.so; }; })
[...]

for the first one (MPFR 3.1.2), and:

[...]
libtool: install: /usr/bin/install -c .libs/libmpfr.so.4.1.0 /home/vlefevre/tmpmpfr/lib/libmpfr.so.4.1.0
libtool: install: (cd /home/vlefevre/tmpmpfr/lib && { ln -s -f libmpfr.so.4.1.0 libmpfr.so.4 || { rm -f libmpfr.so.4 && ln -s libmpfr.so.4.1.0 libmpfr.so.4; }; })
libtool: install: (cd /home/vlefevre/tmpmpfr/lib && { ln -s -f libmpfr.so.4.1.0 libmpfr.so || { rm -f libmpfr.so && ln -s libmpfr.so.4.1.0 libmpfr.so; }; })
[...]

for the second one (MPFR trunk r8680), which yields:

lrwxrwxrwx 1      16 2013-09-18 12:42:10 libmpfr.so -> libmpfr.so.4.1.0
lrwxrwxrwx 1      16 2013-09-18 12:42:10 libmpfr.so.4 -> libmpfr.so.4.1.2
-rwxr-xr-x 1 1913565 2013-09-18 12:42:10 libmpfr.so.4.1.0
-rwxr-xr-x 1 1821786 2013-09-18 12:41:21 libmpfr.so.4.1.2

libmpfr.so.4 doesn't have the correct target!

After looking at strace output, the change of libmpfr.so.4 to point
back to libmpfr.so.4.1.2 is done by ldconfig after the installation
of the symlinks:

libtool: finish: PATH="/home/vlefevre/eftests/bin:/home/vlefevre/bin:/home/vlefevre/x86_64/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/games:.:/sbin" ldconfig -n /home/vlefevre/tmpmpfr/lib

This is probably not what the user expects and leads to confusion.
Either ldconfig should no longer be executed or the "make install"
should fail with a clear error message if the installed library is
not the "most recent" one.

("most recent" is the term used by ldconfig, but in practice, the
highest-version library may not be the most recent due to development
versions, which may not have accurate versioning information yet.)

-- 
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 / AriC project (LIP, ENS-Lyon)




This bug report was last modified 10 years and 234 days ago.

Previous Next


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