Mailinglist Archive: opensuse-factory (914 mails)

< Previous Next >
Re: [opensuse-factory] Shared library policy - multiple providers for a single API/ABI
On Dienstag, 6. Juni 2017 09:31:59 CEST Richard Biener wrote:
On Sat, 3 Jun 2017, Jan Engelhardt wrote:
On Saturday 2017-06-03 19:38, Stefan Bruens wrote:
But there is no specification for libraries available in different
variants, i.e. different implementations or optimizations, with
compatible ABI.>
You are correct in that it is not specified. One could say that we were
still experimenting with what works. One arm of that experiment was
Mesa-libGL1.>
openblas [...] three libraries [..] each one carries its own SONAME
(libopenblas_serial.so.0, libopenblas_pthreads.so.0,
libopenblas_openmp.so.0).>
Different SONAME => different package names. It's that simple.

Now, it is trivial to set the SONAME for all three implementations to
libopenblas.so.0, but unfortunately rpmlint insist on the package name to
be libopenblas0 in this case, with no possibility to have different
package names for the three variants.

The pattern is [vendor-][libblah1][-variant].rpm, stemming from the
"other"
arm of the experiment that is libatomic1-gcc6, libblasc2-openmp.

With the important part that each of the variants shall

Provide: libblah1 = %version
Conflict: libblah1

to explicitely disallow installing multiple variants at the same time
(you'll get file conflicts) plus make requiring them via sth other
than the SONAME auto generated provides possible.

A conflict is only required if the variants have the same paths. This can be
avoided by either having a filename different from the soname, or by creating
directories for each variant.

Note that in case of libopenblas_serial vs. libopenblas_pthreads vs.
libopenblas_openmp it's also a matter of how an application was built
thus using the same SONAME for this might not be what you want as
you do want the possibility to run a OpenMP app at the same time
as a serial one both using openblas.

Thats not exactly true - I *may* want different applications running at the
same time to use different variants, but more likely I want all applications
to use the same variant.

Currently, the variant is fixed at link time. If I want to switch, I have to
rebuild the whole stack.

For a real world example:
OpenCV links against openblas_pthreads on x86(_64) (and openblas_openmp else,
go figure). openblas claims to have support for switching the variants using
update-alternatives, but this has no effect for OpenCV and any of its users.
If I want to change the openblas variant, I have to rebuild:
- openblas
- opencv
- all of the packages depending on openblas/opencv

Kind regards,

Stefan

--
Stefan Brüns / Bergstraße 21 / 52062 Aachen
home: +49 241 53809034 mobile: +49 151 50412019
work: +49 2405 49936-424
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups