New libdir handling (on Debian Unstable) (?)

The place to discuss linux version of MakeMKV
Post Reply
xmixahlx
Posts: 1
Joined: Wed Sep 27, 2023 5:07 am

New libdir handling (on Debian Unstable) (?)

Post by xmixahlx »

Howdy,

Enjoyed a fun dumpsterfire of new libdir handling after installing 1.17.5 on Debian Unstable.

makemkv-oss-1.17.4 was installed to /usr/lib/x86_64-linux-gnu, but makemkv-oss-1.17.5 was installed to /usr/lib. Yes! This caused errors at launch due to "missing" libs.

Took a while to realize this until:

$ ldd /usr/bin/makemkvcon
linux-vdso.so.1 (0x00007ffdd9c70000)
libmakemkv.so.1 => /lib/x86_64-linux-gnu/libmakemkv.so.1 (0x00007ff07baf0000)
libdriveio.so.0 => /lib/x86_64-linux-gnu/libdriveio.so.0 (0x00007ff07bae6000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff07bae1000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff07b8ff000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff07b8fa000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff07b8f3000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff07b69d000)
libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007ff07b216000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff07b1f7000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007ff07b1cc000)
libavcodec.so.59 => not found
libavutil.so.57 => not found
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff07b0eb000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff07b0c7000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff07bbae000)

Ahah. Old libavcodec 5.1.3 links after building with new 6.0 libs? Something be broke!

I whipped up a few uninstall scripts, uninstalled all the things, and installed 1.17.5 with --libdir=/usr/lib/x86_64-linux-gnu for posterity. Now all is right with the world.

Uninstall scripts: (Would be great if uninstall was provided in the Makefile)

$ cat makemkv-oss_uninstall.sh
#! /bin/sh

# Variables
PREFIX=/usr
BINDIR=$PREFIX/bin
LIBDIR=$PREFIX/lib
SHAREDIR=$PREFIX/share

rm $LIBDIR/libdriveio.so.0
rm $LIBDIR/libmakemkv.so.1
rm $LIBDIR/libmmbd.so.0
rm $BINDIR/makemkv
rm $BINDIR/mmccextr
rm $BINDIR/mmgplsrv
rm $SHAREDIR/applications/makemkv.desktop
rm $SHAREDIR/icons/hicolor/16x16/apps/makemkv.png
rm $SHAREDIR/icons/hicolor/22x22/apps/makemkv.png
rm $SHAREDIR/icons/hicolor/32x32/apps/makemkv.png
rm $SHAREDIR/icons/hicolor/64x64/apps/makemkv.png
rm $SHAREDIR/icons/hicolor/128x128/apps/makemkv.png
rm $SHAREDIR/icons/hicolor/256x256/apps/makemkv.png
exit

$ cat makemkv-bin_uninstall.sh
#! /bin/sh

# Variables
PREFIX=/usr
BINDIR=$PREFIX/bin
SHAREDIR=$PREFIX/share

rm -f $BINDIR/makemkvcon
rm -f $BINDIR/mmdtsdec
rm -f $SHAREDIR/MakeMKV/*
rm -f $BINDIR/sdftool
exit

Thanks for what you do, mike!
Post Reply