void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.6k stars 2.16k forks source link

xbps-src: shlib-provides for real -32bit subpackages broken #45927

Open Duncaen opened 1 year ago

Duncaen commented 1 year ago

Since #45504 the nvidia package is broken, the nvidia package is special in that it builds -32bit packages as part of the x86_64 package and not the usual -32bit multilib method using i686.

What happens is that two packages will provide the same shlib, once the 64bit and once for 32bit. Resulting in the shlib-requires on that version breaking because it finds two the soname in two files.

=> nvidia-535.98_1: running pre-pkg hook: 04-generate-runtime-deps ...
   SONAME: libpthread.so.0 <-> glibc>=2.36_1
   SONAME: librt.so.1 <-> glibc>=2.36_1
   SONAME: libdl.so.2 <-> glibc>=2.36_1
   SONAME: libc.so.6 <-> glibc>=2.36_1
   SONAME: libm.so.6 <-> glibc>=2.36_1
   SONAME: libX11.so.6 <-> libX11>=1.2_1
   SONAME: libXext.so.6 <-> libXext>=1.0.5_1
   SONAME: libnvidia-ml.so.1 <-> nvidia-libs-32bit.soname
nvidia-libs-535.98_1
   SONAME: libgcc_s.so.1 <-> libgcc>=4.4.0_1
   SONAME: ld-linux-x86-64.so.2 <-> glibc>=2.36_1

I have a workaround for it, but the pattern matching is really dirty and I think there is probably a better solution. https://gist.github.com/Duncaen/dbc27bead074d4629b1802c8b2fd910c

I'm also not sure if it it could happen that a soname appears in multiple subpackages for other reasons, might be worth to detect and that and error out instead.

sgn commented 1 year ago

Hm, I think the glob would work. Other packages maybe broken if they're built multiple time for multiple configuration. But in those cases, they're usually put everything in the same package.