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