1 |
Hi all, |
2 |
|
3 |
So on and off removal of la files generated by libtool is discussed. |
4 |
science packages have now a strong incentive to remove them everywhere |
5 |
they can. |
6 |
|
7 |
It all started when I was examining the output of ldd -r on libgiac.so |
8 |
in the sage-on-gentoo overlay and I noticed that my selected openblas |
9 |
wasn’t the one being picked up. Netlib’s blas and lapack was picked up |
10 |
instead. There was still an instance of openblas via gsl. |
11 |
|
12 |
I had to ask myself why that was. The ldso selection works by putting |
13 |
a path to implementation library before /usr/lib{,64} in /etc/ld.so.conf. |
14 |
That way when library are resolved at runtime your blas/lapack implementation |
15 |
is chosen first. |
16 |
|
17 |
This mechanism can be thrown off if the library/executable has any RUNPATH |
18 |
set as those are resolved first. And there it was, in libgiac.so I had |
19 |
RUNPATH=//usr/lib64/ [yes with a double / not a mistake]. |
20 |
I inspected giac’s code for a couple of days trying to see where it was coming from. |
21 |
In the end it wasn’t from anything in the code. The final clue was that |
22 |
when linking, not only did I have -Wl,-rpath //usr/lib64 coming out of |
23 |
nowhere libnauty was linked as /usr/lib64/libnauty.so instead of -lnauty. |
24 |
|
25 |
And indeed our new nauty ebuild, following debian’s lead, ship a library |
26 |
and installs .la files. Removing those .la files resulted in libgiac.so |
27 |
linking properly, the RUNPATH being removed and my choice of blas/lapack |
28 |
being respected. |
29 |
|
30 |
So what packages still ship .la files that would be of concern to us as they |
31 |
interfere with blas/lapack? |
32 |
|
33 |
* All the suitesparse ebuilds - that are not explicitly multibuild (messes up glpk). |
34 |
* All the coinor ebuilds - probably with the same exceptions for mutlibuild. |
35 |
* dev-libs/igraph (0.7.1-r2 at least, concerning as it links to blas/lapack) |
36 |
* libsemigroup [sage-on-gentoo] |
37 |
* gap [sage-on-gentoo] |
38 |
* sci-libs/iml (concerning since it links to cblas) |
39 |
* sys-cluster/mpich |
40 |
* dev-libs/libltdl |
41 |
There are more installed here that look less dangerous but we never know, |
42 |
we should pursue elimination across the tree. |
43 |
|
44 |
Anything using libtool to build and depending on any of these, will inherit |
45 |
//usr/lib{,64}/ as a RUNPATH. |
46 |
|
47 |
François |