On 16/02/2013 08:36, Frank Schwidom wrote:
Hi,
I have an conflict wth 2 Versions of Readline:
(sys-libs/readline-5.2_p12-r1::gentoo, installed) pulled in by
=sys-libs/readline-5* required by (dev-lang/ghc-6.8.2::gentoo, installed)
(sys-libs/readline-6.2_p1::gentoo, ebuild scheduled for merge) pulled
in by =sys-libs/readline-6.2_p1
Is ts possible to install both libraries in the same time?
Yes. Portage can support different versions side-by-side if the ebuild
makes use of the SLOT variable. For instance, I have
sys-libs/readline-6.2_p1 installed and attempting to install readline-5*
yields:
Calculating dependencies... done!
[ebuild NS ] sys-libs/readline-5.2_p14:5 [6.2_p1:0] 2,024 kB
Note that this isn't a downgrade in so far as 6.2_p1 won't be removed.
It's a new, slotted instance of the package. No problem there.
It seems, that the lib-system is prepared for such situations,
because this links allows to define defaults for different
version stages.
lrwxrwxrwx 1 root root 16 15. Jul 2010 libreadline.so -> libreadline.so.5
lrwxrwxrwx 1 root root 18 15. Jul 2010 libreadline.so.5 ->
libreadline.so.5.2
-r-xr-xr-x 1 root root 201668 6. Dez 2008 libreadline.so.5.2
Here could exist an further lib.
The question ist, how knows an program, to use which lib.
The required libraries are defined in the NEEDED fields in the ELF
binary's dynamic segment section. You may use tools such as ldd to
inspect the dependencies.
Can i compile an new program, which uses an explicit new lib, and
keep the default-definition of the readline libs untouched?
In many cases, yes. Another approach is to export LD_LIBRARY_PATH when
running an application so that it finds a particular library in a
particular directory. However ...
Have I any chance to solve this problem without loosing one lib?
You are overdue an emerge --sync. Do that before contemplating jumping
through hoops.
Cheers,
--Kerin