public inbox for gentoo-science@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-science] .la files harmful to BLAS/LAPACK structure
@ 2020-10-21 22:21 François Bissey
  2020-10-22  0:23 ` Aisha Tammy
  2020-10-22  6:28 ` François Bissey
  0 siblings, 2 replies; 4+ messages in thread
From: François Bissey @ 2020-10-21 22:21 UTC (permalink / raw
  To: gentoo-science

Hi all,

So on and off removal of la files generated by libtool is discussed.
science packages have now a strong incentive to remove them everywhere
they can.

It all started when I was examining the output of ldd -r on libgiac.so
in the sage-on-gentoo overlay and I noticed that my selected openblas
wasn’t the one being picked up. Netlib’s blas and lapack was picked up
instead. There was still an instance of openblas via gsl.

I had to ask myself why that was. The ldso selection works by putting
a path to implementation library before /usr/lib{,64} in /etc/ld.so.conf.
That way when library are resolved at runtime your blas/lapack implementation
is chosen first.

This mechanism can be thrown off if the library/executable has any RUNPATH
set as those are resolved first. And there it was, in libgiac.so I had
RUNPATH=//usr/lib64/ [yes with a double / not a mistake].
I inspected giac’s code for a couple of days trying to see where it was coming from.
In the end it wasn’t from anything in the code. The final clue was that
when linking, not only did I have -Wl,-rpath //usr/lib64 coming out of 
nowhere libnauty was linked as /usr/lib64/libnauty.so instead of -lnauty.

And indeed our new nauty ebuild, following debian’s lead, ship a library
and installs .la files. Removing those .la files resulted in libgiac.so
linking properly, the RUNPATH being removed and my choice of blas/lapack 
being respected.

So what packages still ship .la files that would be of concern to us as they
interfere with blas/lapack?

* All the suitesparse ebuilds - that are not explicitly multibuild (messes up glpk).
* All the coinor ebuilds - probably with the same exceptions for mutlibuild.
* dev-libs/igraph (0.7.1-r2 at least, concerning as it links to blas/lapack)
* libsemigroup [sage-on-gentoo]
* gap [sage-on-gentoo]
* sci-libs/iml (concerning since it links to cblas)
* sys-cluster/mpich
* dev-libs/libltdl
There are more installed here that look less dangerous but we never know,
we should pursue elimination across the tree.

Anything using libtool to build and depending on any of these, will inherit 
//usr/lib{,64}/ as a RUNPATH.

François

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

end of thread, other threads:[~2020-10-22  6:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-21 22:21 [gentoo-science] .la files harmful to BLAS/LAPACK structure François Bissey
2020-10-22  0:23 ` Aisha Tammy
2020-10-22  0:43   ` François Bissey
2020-10-22  6:28 ` François Bissey

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