public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] why doesn't readline-6 install libreadline.so symlink?
@ 2009-09-26  4:31 Andrey Grozin
  2009-09-26  6:03 ` [gentoo-dev] " Jonathan Callen
  0 siblings, 1 reply; 6+ messages in thread
From: Andrey Grozin @ 2009-09-26  4:31 UTC (permalink / raw
  To: gentoo-dev

I'm using portage-2.2_pre*. After upgrading to sys-libs/readline-6.0, 
portage (naturally) kept /lib/libreadline.so.5 -> /lib/libreadline.so.5.2, 
because a lot of programs needed it. I did emerge @preserved-rebuild, and 
only one binary using libreadline.so.5.2 left: /usr/bin/gp, the 
interactive interpreter of sci-mathematics/pari. Re-emerging it does not 
help: headers from readline-6 are used, but the program links wirh 
libreadline.so.5.2. I thought something is wrong in the pari's configure. 
This package does not use autoconf, but a hand-written Configure script. 
It seems all right. Then I found that /lib/libreadline.so symlink still 
points to libreadline.so.5. This confuses the pari's Configure. I made it 
to point to libreadline.so.6 by hand, and re-emerged pari. OK, gp now 
links with libreadline.so.6.0. Why doesn't readline-6.0 ebuild install 
this symlink?

After this re-emerging of pari, portage said

!!! existing preserved libs:
>>> package: sys-libs/readline-6.0_p3
  *  - /lib/libreadline.so
  *      used by /usr/bin/M2 (sci-mathematics/Macaulay2-1.2-r3)
  *      used by /usr/bin/Singular-3-0-4 (sci-mathematics/singular-3.0.4.4)
  *      used by /usr/bin/asy (media-gfx/asymptote-1.86)
  *      used by 111 other files

I already re-emerged these packages (at least, 3 shown) as a part of 
emerging @preserved-rebuild after upgrading readline, and they were not in 
the @preserved-rebuild set before I changed the libreadline.so symlink. 
Does this mean that all of these packages used libreadline.so -> 
libreadline.so.5? This is not good. I'm going to emerge @preserved-rebuild 
again, to be sure that my system is in a self-consistent state.

It seems that keeping libreadline.so -> libreadline.so.5 after merging 
readline-6.0 and unmerging readline-5.2 is a bad idea.

Andrey



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [gentoo-dev] Re: why doesn't readline-6 install libreadline.so symlink?
  2009-09-26  4:31 [gentoo-dev] why doesn't readline-6 install libreadline.so symlink? Andrey Grozin
@ 2009-09-26  6:03 ` Jonathan Callen
  2009-09-26  6:25   ` Zac Medico
  2009-09-26 12:04   ` Mike Frysinger
  0 siblings, 2 replies; 6+ messages in thread
From: Jonathan Callen @ 2009-09-26  6:03 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrey Grozin wrote:
> I'm using portage-2.2_pre*. After upgrading to sys-libs/readline-6.0,
> portage (naturally) kept /lib/libreadline.so.5 ->
> /lib/libreadline.so.5.2, because a lot of programs needed it. I did
> emerge @preserved-rebuild, and only one binary using libreadline.so.5.2
> left: /usr/bin/gp, the interactive interpreter of sci-mathematics/pari.
> Re-emerging it does not help: headers from readline-6 are used, but the
> program links wirh libreadline.so.5.2. I thought something is wrong in
> the pari's configure. This package does not use autoconf, but a
> hand-written Configure script. It seems all right. Then I found that
> /lib/libreadline.so symlink still points to libreadline.so.5. This
> confuses the pari's Configure. I made it to point to libreadline.so.6 by
> hand, and re-emerged pari. OK, gp now links with libreadline.so.6.0. Why
> doesn't readline-6.0 ebuild install this symlink?
> 
> After this re-emerging of pari, portage said
> 
> !!! existing preserved libs:
>>>> package: sys-libs/readline-6.0_p3
>  *  - /lib/libreadline.so
>  *      used by /usr/bin/M2 (sci-mathematics/Macaulay2-1.2-r3)
>  *      used by /usr/bin/Singular-3-0-4 (sci-mathematics/singular-3.0.4.4)
>  *      used by /usr/bin/asy (media-gfx/asymptote-1.86)
>  *      used by 111 other files
> 
> I already re-emerged these packages (at least, 3 shown) as a part of
> emerging @preserved-rebuild after upgrading readline, and they were not
> in the @preserved-rebuild set before I changed the libreadline.so
> symlink. Does this mean that all of these packages used libreadline.so
> -> libreadline.so.5? This is not good. I'm going to emerge
> @preserved-rebuild again, to be sure that my system is in a
> self-consistent state.
> 
> It seems that keeping libreadline.so -> libreadline.so.5 after merging
> readline-6.0 and unmerging readline-5.2 is a bad idea.
> 
> Andrey
> 
> 

I'm not completely sure, but I think it doesn't install that symlink
because it (correctly) installs a /usr/lib/libreadline.so ldscript, that
tells the linker to link against /lib/libreadline.so.6, so long as the
linker looks at /usr/lib before /lib, which is usually the case, unless
"-L/lib" is passed to ld (by way of gcc). If you remove
/lib/libreadine.so, then everything will Just Work, and portage will
forget that that file ever existed as soon as you merge a package (any
package). I'm not sure what the correct behavior of
FEATURES="preserve-libs" should actually be in this case, but I think
portage may need to look a little closer at the SONAME, and only
preserve that file (like the old preserve_old_lib) or preserve only that
symlink and what it links to, not everything that points at that.

- --
Jonathan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkq9rroACgkQOypDUo0oQOrUjgCdEoFum1tqM1f/g2BiGl7QKMc5
Ti0AoIeTDN6exLzTuR9hjRHe0UzKh41h
=rwgK
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] Re: why doesn't readline-6 install libreadline.so symlink?
  2009-09-26  6:03 ` [gentoo-dev] " Jonathan Callen
@ 2009-09-26  6:25   ` Zac Medico
  2009-09-26 12:04   ` Mike Frysinger
  1 sibling, 0 replies; 6+ messages in thread
From: Zac Medico @ 2009-09-26  6:25 UTC (permalink / raw
  To: gentoo-dev

Jonathan Callen wrote:
> I'm not completely sure, but I think it doesn't install that symlink
> because it (correctly) installs a /usr/lib/libreadline.so ldscript, that
> tells the linker to link against /lib/libreadline.so.6, so long as the
> linker looks at /usr/lib before /lib, which is usually the case, unless
> "-L/lib" is passed to ld (by way of gcc).

It seems to be the same issue as this bug:

 http://bugs.gentoo.org/show_bug.cgi?id=284844

-- 
Thanks,
Zac



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] Re: why doesn't readline-6 install libreadline.so symlink?
  2009-09-26  6:03 ` [gentoo-dev] " Jonathan Callen
  2009-09-26  6:25   ` Zac Medico
@ 2009-09-26 12:04   ` Mike Frysinger
  1 sibling, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2009-09-26 12:04 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 473 bytes --]

On Saturday 26 September 2009 02:03:38 Jonathan Callen wrote:
> I'm not completely sure, but I think it doesn't install that symlink
> because it (correctly) installs a /usr/lib/libreadline.so ldscript, that
> tells the linker to link against /lib/libreadline.so.6

correct

> so long as the linker looks at /usr/lib before /lib, which is usually the
> case, unless "-L/lib" is passed to ld (by way of gcc)

incorrect -- link order doesnt matter here with readline-6
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] Re: why doesn't readline-6 install libreadline.so symlink?
@ 2009-09-26 14:48 Andrey Grozin
  2009-09-26 20:42 ` Mike Frysinger
  0 siblings, 1 reply; 6+ messages in thread
From: Andrey Grozin @ 2009-09-26 14:48 UTC (permalink / raw
  To: gentoo-dev

On Sat, 26 Sep 2009, Mike Frysinger wrote:
>> so long as the linker looks at /usr/lib before /lib, which is usually the
>> case, unless "-L/lib" is passed to ld (by way of gcc)
> incorrect -- link order doesnt matter here with readline-6
Here's a specific example: sci-mathematics/pari-2.3.4-r1. It has a 
hand-written Configure script (not configure). It searches for 
libreadline.so in a list of directories, and sees that it points to 
libreadline.so.5 (this is after libreadline-5 has been unmerged). So, it 
adds -l libreadline.so.5 to the linking flags. Clearly, this is not the 
desired behaviour. What can be done to avoid it?

Andrey



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] Re: why doesn't readline-6 install libreadline.so symlink?
  2009-09-26 14:48 Andrey Grozin
@ 2009-09-26 20:42 ` Mike Frysinger
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2009-09-26 20:42 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 842 bytes --]

On Saturday 26 September 2009 10:48:53 Andrey Grozin wrote:
> On Sat, 26 Sep 2009, Mike Frysinger wrote:
> >> so long as the linker looks at /usr/lib before /lib, which is usually
> >> the case, unless "-L/lib" is passed to ld (by way of gcc)
> >
> > incorrect -- link order doesnt matter here with readline-6
> 
> Here's a specific example: sci-mathematics/pari-2.3.4-r1. It has a
> hand-written Configure script (not configure). It searches for
> libreadline.so in a list of directories, and sees that it points to
> libreadline.so.5 (this is after libreadline-5 has been unmerged). So, it
> adds -l libreadline.so.5 to the linking flags. Clearly, this is not the
> desired behaviour. What can be done to avoid it?

the configure script is broken and it should be fixed.  linking directly 
against a SONAME is wrong.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-09-26 20:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-26  4:31 [gentoo-dev] why doesn't readline-6 install libreadline.so symlink? Andrey Grozin
2009-09-26  6:03 ` [gentoo-dev] " Jonathan Callen
2009-09-26  6:25   ` Zac Medico
2009-09-26 12:04   ` Mike Frysinger
  -- strict thread matches above, loose matches on Subject: below --
2009-09-26 14:48 Andrey Grozin
2009-09-26 20:42 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox