On 2026-02-22 14:39, Ole Streicher wrote:
Hi,
I have a package (wsclean) the works only with the orignal,
non-threaded
version of blar. (from liblapack). I could not find out how I
can force-link to this one. When I just link with -lblas, the differen
openblas variants (from openblas-openmp or openblas-pthread) are
installed as preferred alternative, causing wsclean to not work.
How can I force to use the one from lapack, independently of the
potentially other installed blas libraries? The build system for the
A brute-force method could be to use Depends: liblas-dev without the
alternatives
(i.e. not Depends: libblas-dev | libblas.so) to strictly build with the
generic (netlib) BLAS.
However this is not really what you want (you want unthreaded openblas,
for instance),
and wouldn't really work anyway since building against generic
liblas-dev generates a alternative binary dependency
(Depends: libblas3 | libblas.so.3), via libblas3.shlibs
(/var/lib/dpkg/info/libblas3\:amd64.shlibs)
I think you could control what dh_shlibs generates by providing your own
shlibs file with wsclean/debian to override what libblas3.shlibs
generates. Something like
libblas 3 libblas3 | libopenblas0-serial | libblis4-serial
i.e. avoiding the libblas.so.3 virtual package and the threaded
variants.
(you'd have to manually add any serial implementations wsclean can use)
That's not completely foolproof since the serial BLAS packages can be
co-installed alongside the threaded ones. Alternatives links select the
"preferred" implementation. And that preference can be changed by the
system admin.
I think you'd have to Conflicts: with each individual threaded package
to prevent that. Arguably simpler to just document that wsclean is not
compatible with threaded BLAS.
It feels a bit strange to me for wsclean to be strictly incompatible
with threaded BLAS, and to have to control the BLAS implementation so
carefully. If there's no way to make wsclean more flexible, then maybe a
better approach is for wsclean to internally enforce the environment
variable OMP_NUM_THREADS=1 ? That should keep any BLAS implementation
down to a single thread.
Drew