1 |
Hi all, |
2 |
|
3 |
* if you don't want the explanation, skip to ********* |
4 |
|
5 |
I believe I have finally found a solution to the problems that plague berkeley |
6 |
db. While slotting has worked for a long time now, there were serious |
7 |
problems caused by the fact that db is often used within libraries. Some of |
8 |
these libraries namely use different db versions, but end up in the same |
9 |
executable. As a result a symbol collision occurs, and the wrong code is |
10 |
used. Corrupting the databases. |
11 |
|
12 |
To this end db-4.{0,1,2}.x use the --with-uniquename hack. This hack appends |
13 |
some magic string after all symbols and as such makes them unique. This has |
14 |
various drawbacks, including the fact that many configure scripts do not |
15 |
expect this. db-4.3 and db-4.4 do not support this hack any longer. It for |
16 |
example also conflicts with dbxml (also from sleepycat aka oracle). |
17 |
|
18 |
To solve this I've delved into the ld manual pages, performed some tests and |
19 |
found that the linker also has a similar uniquename trick, but performs it |
20 |
much better. It is called symbol versioning, and as long as things go right, |
21 |
it should be completely transparent. If things go wrong, it will signal it |
22 |
instead of using the wrong implementations. Symbol versioning can be done by |
23 |
way of a linking script, but for our purposes much easier, there is a command |
24 |
line option. This option "--default-symver" will use the soname as the |
25 |
version of all unversioned symbols (those that have no other version |
26 |
assigned). This option should be safe to use with almost all libraries, and |
27 |
might be a solution to some problems with libraries being linked twice |
28 |
(libstdc++ anyone). |
29 |
|
30 |
********* |
31 |
|
32 |
Ok, after the explanation, I would like people to test the change. To this I |
33 |
would ask people who do not shy away from more or less serious recompiles to |
34 |
unmask db and merge either db-4.3.29 or db-4.4.20. Both ebuilds should be |
35 |
stable except for upgrade issues. The new changes should fix that. |
36 |
|
37 |
If you want to test upgrade issues specifically, be aware that they only occur |
38 |
when going from db-4.3 to db-4.4 as db-4.2 still uses the uniquename hack. |
39 |
|
40 |
Thanks, |
41 |
Paul |
42 |
|
43 |
ps. Openldap people, the sooner you test, the sooner you get a new db |
44 |
version :-P |
45 |
|
46 |
-- |
47 |
Paul de Vrieze |
48 |
Gentoo Developer |
49 |
Mail: pauldv@g.o |
50 |
Homepage: http://www.devrieze.net |