LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-11-2023, 02:36 AM   #1
zuriel
Member
 
Registered: Aug 2012
Distribution: Slackware
Posts: 60

Rep: Reputation: 50
Multilib GStreamer has the 32-bit version using 64-bit binaries, causing breakage


I've had issues with 32-bit GStreamer on an x64 system for a while, and I've just gotten around to properly digging in to it. 32-bit GStreamer just fails to load most of its plugins sometimes.

The short version is, GStreamer binaries like gst-inspect-1.0 run /usr/libexec/gst-plugin-scanner to do the work of attempting to load plugins, and on a Slackware multilib system gst-plugin-scanner is a 64-bit binary.

So if you update 32-bit GStreamer (or just delete the ~/.cache/gstreamer-1.0/registry.i686.bin plugin cache) and then run /usr/bin/32/gst-inspect-1.0, it runs the 64-bit /usr/libexec/gst-plugin-scanner which fails to load all of the 32-bit libraries and blacklists them.

You can work around the issue by deleting the cache and running "/usr/bin/32/gst-inspect-1.0 --gst-disable-registry-fork" or by removing gst-plugin-scanner entirely to prevent the use of gst-plugin-scanner and create a good cache. This works, but you have to remember to do it every time you update GStreamer.

As for *fixing* the issue, we can add a suffix to --libexecdir in the gstreamer.SlackBuild and add an exception to convertpkg-compat32. That puts the troublesome files in /usr/libexec/{64,32}/gstreamer-1.0/ and prevents 64-bit and 32-bit versions from finding each other's files.

I'm not sure if there's a *better* solution, like asking GStreamer to change something on their end and not put binaries in libexec, but this is what I've got.

Code:
--- gstreamer.SlackBuild.ori    2021-03-17 04:21:16.000000000 +1100
+++ gstreamer.SlackBuild        2023-02-11 18:34:05.689290800 +1100
@@ -51,18 +51,23 @@
 if [ "$ARCH" = "i586" ]; then
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
   LIBDIRSUFFIX=""
+  LIBEXECSUFFIX="32"
 elif [ "$ARCH" = "i686" ]; then
   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
   LIBDIRSUFFIX=""
+  LIBEXECSUFFIX="32"
 elif [ "$ARCH" = "s390" ]; then
   SLKCFLAGS="-O2"
   LIBDIRSUFFIX=""
+  LIBEXECSUFFIX=""
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
+  LIBEXECSUFFIX="64"
 else
   SLKCFLAGS="-O2"
   LIBDIRSUFFIX=""
+  LIBEXECSUFFIX=""
 fi
 
 TMP=${TMP:-/tmp}
@@ -90,7 +95,7 @@
 meson setup \
   --prefix=/usr \
   --libdir=lib${LIBDIRSUFFIX} \
-  --libexecdir=/usr/libexec \
+  --libexecdir=/usr/libexec/${LIBEXECSUFFIX} \
   --bindir=/usr/bin \
   --sbindir=/usr/sbin \
   --includedir=/usr/include \
Code:
--- /usr/sbin/convertpkg-compat32.ori   2023-02-11 18:39:17.903099682 +1100
+++ /usr/sbin/convertpkg-compat32       2023-02-11 18:41:53.484107208 +1100
@@ -191,6 +191,7 @@
 case "$PKGNAM" in 
   "mesa") cp -a --parents usr/share/vulkan/icd.d KEEP/ ;;
   "libunwind") cp -a --parents usr/include/libunwind-x86.h KEEP/ ;;
+  "gstreamer") cp -a --parents usr/libexec/32/ KEEP/ ;;
 esac
 
 # Remove stuff we only want from the 64-bit package:
 
Old 02-11-2023, 03:03 AM   #2
zuriel
Member
 
Registered: Aug 2012
Distribution: Slackware
Posts: 60

Original Poster
Rep: Reputation: 50
I've found a discussion at https://bugzilla.redhat.com/show_bug.cgi?id=1472160 where someone suggested pointing libexecdir to the same place as the libraries to make it multilib-safe. I don't think they ever actually did this, though.

Ideally they'd go the same place as the binaries, but that would lead to 32-bit GStreamer running 64-bit /usr/bin/gst-plugin-scanner instead of /usr/bin/32/gst-plugin-scanner on a multilib system and breaking the same way it does now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Chrome binaries always work on older systems but Firefox binaries do not - what is the magic? Jason_25 Linux - Software 1 10-28-2019 11:23 AM
Slackware64 14.2 multilib - 32-bit gstreamer problem jmacloue Slackware 0 03-20-2019 10:44 PM
gstreamer package in current puts gstconfig.h in /usr/lib64/gstreamer-1.0/include akschu Slackware 5 11-26-2015 01:46 AM
[SOLVED] Install the 32 bit version and the 64 bit version, on multilib system. Knightron Slackware 12 12-02-2013 09:23 PM
[SOLVED] gstreamer-plugins-base conflicts with gstreamer-plugins-good Raveolution Linux - Software 14 11-17-2009 12:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration