nayab
June 29, 2019, 5:30am
1
A game on my laptop needed libjpeg.so.8
. I have searched for libjpeg using swupd.
nayab@TheBox: ~ $ swupd search libjpeg
Bundle with the best search result:
devpkg-libjpeg-turbo - All content for pkgconfig file libjpeg-turbo.pc. (installed)
This bundle can be installed with:
swupd bundle-add devpkg-libjpeg-turbo
Alternative bundle options are
games - Play games in Clear Linux OS. (installed)
lib-imageformat - Helpers for reading images. (40MB) (installed)
R-extras-dev - All packages required to build the R-extras bundle. (3440MB)
I did install all the bundle inlcuding devpkg-libjpeg-turbo
. But unable to load the game.
nayab@TheBox: ~ $ ./GOG\ Games/Beneath\ A\ Steel\ Sky/start.sh
Running Beneath A Steel Sky
Starting ScummVM
/home/nayab/GOG Games/Beneath A Steel Sky/scummvm/scummvm_x86_64: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory
Done.
What’s the bundle I need to install for libjpeg.so.8
?
Thanks.
The version of libjpeg in those bundles is newer than the game is looking for. This is the newest version currently bundled:
Bundle games [installed] (2832 MB on system)
/usr/lib32/libjpeg.so.62.3.0
/usr/lib32/libjpeg.so.62
The older version is in a package called libjpeg-turbo-soname8
. Unfortunately, that package is not currently included as part of any bundle. I’ll propose getting it added to the games bundle.
#
# This file is auto-generated. DO NOT EDIT
# Generated by: autospec.py
#
# Source0 file verified with key 0x85C7044E033FDE16 (information@libjpeg-turbo.org)
#
Name : libjpeg-turbo-soname8
Version : 1.5.3
Release : 47
URL : https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-1.5.3.tar.gz
Source0 : https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-1.5.3.tar.gz
Source1 : https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-1.5.3.tar.gz.sig
Summary : A SIMD-accelerated JPEG codec that provides the TurboJPEG API
Group : Development/Tools
License : BSD-3-Clause IJG
Requires: libjpeg-turbo-soname8-lib = %{version}-%{release}
Requires: libjpeg-turbo-soname8-license = %{version}-%{release}
BuildRequires : buildreq-cmake
BuildRequires : gcc-dev32
BuildRequires : gcc-libgcc32
BuildRequires : gcc-libstdc++32
BuildRequires : glibc-dev32
BuildRequires : glibc-libc32
BuildRequires : nasm
BuildRequires : yasm
Patch1: cve-2017-15232.patch
Patch2: CVE-2018-14498.patch
Patch3: CVE-2019-2201.patch
%description
TurboJPEG Java Wrapper
======================
The TurboJPEG shared library can optionally be built with a Java Native
Interface wrapper, which allows the library to be loaded and used directly from
Java applications. The Java front end for this is defined in several classes
located under org/libjpegturbo/turbojpeg. The source code for these Java
classes is licensed under a BSD-style license, so the files can be incorporated
directly into both open source and proprietary projects without restriction. A
Java archive (JAR) file containing these classes is also shipped with the
"official" distribution packages of libjpeg-turbo.
%package lib
Summary: lib components for the libjpeg-turbo-soname8 package.
Group: Libraries
Requires: libjpeg-turbo-soname8-license = %{version}-%{release}
%description lib
lib components for the libjpeg-turbo-soname8 package.
%package lib32
Summary: lib32 components for the libjpeg-turbo-soname8 package.
Group: Default
Requires: libjpeg-turbo-soname8-license = %{version}-%{release}
%description lib32
lib32 components for the libjpeg-turbo-soname8 package.
%package license
Summary: license components for the libjpeg-turbo-soname8 package.
Group: Default
%description license
license components for the libjpeg-turbo-soname8 package.
%prep
%setup -q -n libjpeg-turbo-1.5.3
cd %{_builddir}/libjpeg-turbo-1.5.3
%patch1 -p1
%patch2 -p1
%patch3 -p1
pushd ..
cp -a libjpeg-turbo-1.5.3 build32
popd
pushd ..
cp -a libjpeg-turbo-1.5.3 buildavx2
popd
%build
export http_proxy=http://127.0.0.1:9/
export https_proxy=http://127.0.0.1:9/
export no_proxy=localhost,127.0.0.1,0.0.0.0
export LANG=C.UTF-8
export SOURCE_DATE_EPOCH=1573589789
export GCC_IGNORE_WERROR=1
export AR=gcc-ar
export RANLIB=gcc-ranlib
export NM=gcc-nm
export CFLAGS="$CFLAGS -O3 -falign-functions=32 -ffat-lto-objects -flto=4 -fno-math-errno -fno-semantic-interposition -fno-trapping-math -fstack-protector-strong -mzero-caller-saved-regs=used "
export FCFLAGS="$CFLAGS -O3 -falign-functions=32 -ffat-lto-objects -flto=4 -fno-math-errno -fno-semantic-interposition -fno-trapping-math -fstack-protector-strong -mzero-caller-saved-regs=used "
export FFLAGS="$CFLAGS -O3 -falign-functions=32 -ffat-lto-objects -flto=4 -fno-math-errno -fno-semantic-interposition -fno-trapping-math -fstack-protector-strong -mzero-caller-saved-regs=used "
export CXXFLAGS="$CXXFLAGS -O3 -falign-functions=32 -ffat-lto-objects -flto=4 -fno-math-errno -fno-semantic-interposition -fno-trapping-math -fstack-protector-strong -mzero-caller-saved-regs=used "
export CFLAGS_GENERATE="$CFLAGS -fprofile-generate -fprofile-dir=/var/tmp/pgo -fprofile-update=atomic "
export FCFLAGS_GENERATE="$FCFLAGS -fprofile-generate -fprofile-dir=/var/tmp/pgo -fprofile-update=atomic "
export FFLAGS_GENERATE="$FFLAGS -fprofile-generate -fprofile-dir=/var/tmp/pgo -fprofile-update=atomic "
export CXXFLAGS_GENERATE="$CXXFLAGS -fprofile-generate -fprofile-dir=/var/tmp/pgo -fprofile-update=atomic "
export LDFLAGS_GENERATE="$LDFLAGS -fprofile-generate -fprofile-dir=/var/tmp/pgo -fprofile-update=atomic "
export CFLAGS_USE="$CFLAGS -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction "
export FCFLAGS_USE="$FCFLAGS -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction "
export FFLAGS_USE="$FFLAGS -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction "
export CXXFLAGS_USE="$CXXFLAGS -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction "
export LDFLAGS_USE="$LDFLAGS -fprofile-use -fprofile-dir=/var/tmp/pgo -fprofile-correction "
CFLAGS="${CFLAGS_GENERATE}" CXXFLAGS="${CXXFLAGS_GENERATE}" FFLAGS="${FFLAGS_GENERATE}" FCFLAGS="${FCFLAGS_GENERATE}" LDFLAGS="${LDFLAGS_GENERATE}" %configure --disable-static --with-jpeg8
make %{?_smp_mflags}
./tjbench testimages/testimgint.jpg
make clean
CFLAGS="${CFLAGS_USE}" CXXFLAGS="${CXXFLAGS_USE}" FFLAGS="${FFLAGS_USE}" FCFLAGS="${FCFLAGS_USE}" LDFLAGS="${LDFLAGS_USE}" %configure --disable-static --with-jpeg8
make %{?_smp_mflags}
pushd ../build32/
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
export ASFLAGS="${ASFLAGS}${ASFLAGS:+ }--32"
export CFLAGS="${CFLAGS}${CFLAGS:+ }-m32 -mstackrealign"
export CXXFLAGS="${CXXFLAGS}${CXXFLAGS:+ }-m32 -mstackrealign"
export LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-m32 -mstackrealign"
%configure --disable-static --with-jpeg8 --libdir=/usr/lib32 --build=i686-generic-linux-gnu --host=i686-generic-linux-gnu --target=i686-clr-linux-gnu
make %{?_smp_mflags}
popd
unset PKG_CONFIG_PATH
pushd ../buildavx2/
export CFLAGS="$CFLAGS -m64 -march=haswell"
export CXXFLAGS="$CXXFLAGS -m64 -march=haswell"
export LDFLAGS="$LDFLAGS -m64 -march=haswell"
%configure --disable-static --with-jpeg8
make %{?_smp_mflags}
popd
%check
export LANG=C.UTF-8
export http_proxy=http://127.0.0.1:9/
export https_proxy=http://127.0.0.1:9/
export no_proxy=localhost,127.0.0.1,0.0.0.0
make VERBOSE=1 V=1 %{?_smp_mflags} check
cd ../build32;
make VERBOSE=1 V=1 %{?_smp_mflags} check || :
cd ../buildavx2;
make VERBOSE=1 V=1 %{?_smp_mflags} check || :
%install
export SOURCE_DATE_EPOCH=1573589789
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/share/package-licenses/libjpeg-turbo-soname8
cp %{_builddir}/libjpeg-turbo-1.5.3/LICENSE.md %{buildroot}/usr/share/package-licenses/libjpeg-turbo-soname8/7b111516fb0f6aa2063908e9098aa5727200abf3
cp %{_builddir}/libjpeg-turbo-1.5.3/release/License.rtf %{buildroot}/usr/share/package-licenses/libjpeg-turbo-soname8/f0b17b88210d4efef996d99421683315b8ded689
pushd ../build32/
%make_install32
if [ -d %{buildroot}/usr/lib32/pkgconfig ]
then
pushd %{buildroot}/usr/lib32/pkgconfig
for i in *.pc ; do ln -s $i 32$i ; done
popd
fi
popd
pushd ../buildavx2/
%make_install_avx2
popd
%make_install
## Remove excluded files
rm -f %{buildroot}/usr/lib64/haswell/pkgconfig/libjpeg.pc
rm -f %{buildroot}/usr/lib64/haswell/pkgconfig/libturbojpeg.pc
rm -f %{buildroot}/usr/bin/cjpeg
rm -f %{buildroot}/usr/bin/djpeg
rm -f %{buildroot}/usr/bin/haswell/cjpeg
rm -f %{buildroot}/usr/bin/haswell/djpeg
rm -f %{buildroot}/usr/bin/haswell/jpegtran
rm -f %{buildroot}/usr/bin/haswell/rdjpgcom
rm -f %{buildroot}/usr/bin/haswell/tjbench
rm -f %{buildroot}/usr/bin/haswell/wrjpgcom
rm -f %{buildroot}/usr/bin/jpegtran
rm -f %{buildroot}/usr/bin/rdjpgcom
rm -f %{buildroot}/usr/bin/tjbench
rm -f %{buildroot}/usr/bin/wrjpgcom
rm -f %{buildroot}/usr/share/doc/libjpeg-turbo/LICENSE.md
rm -f %{buildroot}/usr/share/doc/libjpeg-turbo/README.ijg
rm -f %{buildroot}/usr/share/doc/libjpeg-turbo/README.md
rm -f %{buildroot}/usr/share/doc/libjpeg-turbo/example.c
rm -f %{buildroot}/usr/share/doc/libjpeg-turbo/libjpeg.txt
rm -f %{buildroot}/usr/share/doc/libjpeg-turbo/structure.txt
rm -f %{buildroot}/usr/share/doc/libjpeg-turbo/usage.txt
rm -f %{buildroot}/usr/share/doc/libjpeg-turbo/wizard.txt
rm -f %{buildroot}/usr/include/jconfig.h
rm -f %{buildroot}/usr/include/jerror.h
rm -f %{buildroot}/usr/include/jmorecfg.h
rm -f %{buildroot}/usr/include/jpeglib.h
rm -f %{buildroot}/usr/include/turbojpeg.h
rm -f %{buildroot}/usr/lib64/haswell/libjpeg.so
rm -f %{buildroot}/usr/lib64/haswell/libturbojpeg.so
rm -f %{buildroot}/usr/lib64/libjpeg.so
rm -f %{buildroot}/usr/lib64/libturbojpeg.so
rm -f %{buildroot}/usr/lib64/pkgconfig/libjpeg.pc
rm -f %{buildroot}/usr/lib64/pkgconfig/libturbojpeg.pc
rm -f %{buildroot}/usr/lib32/libjpeg.so
rm -f %{buildroot}/usr/lib32/libturbojpeg.so
rm -f %{buildroot}/usr/lib32/pkgconfig/32libjpeg.pc
rm -f %{buildroot}/usr/lib32/pkgconfig/32libturbojpeg.pc
rm -f %{buildroot}/usr/lib32/pkgconfig/libjpeg.pc
rm -f %{buildroot}/usr/lib32/pkgconfig/libturbojpeg.pc
rm -f %{buildroot}/usr/share/man/man1/cjpeg.1
rm -f %{buildroot}/usr/share/man/man1/djpeg.1
rm -f %{buildroot}/usr/share/man/man1/jpegtran.1
rm -f %{buildroot}/usr/share/man/man1/rdjpgcom.1
rm -f %{buildroot}/usr/share/man/man1/wrjpgcom.1
rm -f %{buildroot}/usr/lib32/libturbojpeg.so.0
rm -f %{buildroot}/usr/lib32/libturbojpeg.so.0.1.0
rm -f %{buildroot}/usr/lib64/libturbojpeg.so.0
rm -f %{buildroot}/usr/lib64/libturbojpeg.so.0.1.0
rm -f %{buildroot}/usr/lib64/haswell/libturbojpeg.so.0
rm -f %{buildroot}/usr/lib64/haswell/libturbojpeg.so.0.1.0
## install_append content
rm -rf %{buildroot}/usr/lib32/libturbojpeg.so.0*
rm -rf %{buildroot}/usr/lib64/libturbojpeg.so.0*
## install_append end
%files
%defattr(-,root,root,-)
%files lib
%defattr(-,root,root,-)
/usr/lib64/haswell/libjpeg.so.8
/usr/lib64/haswell/libjpeg.so.8.1.2
/usr/lib64/libjpeg.so.8
/usr/lib64/libjpeg.so.8.1.2
%files lib32
%defattr(-,root,root,-)
/usr/lib32/libjpeg.so.8
/usr/lib32/libjpeg.so.8.1.2
%files license
%defattr(0644,root,root,0755)
/usr/share/package-licenses/libjpeg-turbo-soname8/7b111516fb0f6aa2063908e9098aa5727200abf3
/usr/share/package-licenses/libjpeg-turbo-soname8/f0b17b88210d4efef996d99421683315b8ded689
This file has been truncated. show original
If you want a quick and dirty solution to get your game on, you can manually install it:
wget https://download.clearlinux.org/current/x86_64/os/Packages/libjpeg-turbo-soname8-lib32-1.5.3-42.x86_64.rpm
rpm2cpio libjpeg-turbo-soname8-lib32-1.5.3-42.x86_64.rpm | sudo cpio -ivdm --directory=/
sudo ldconfig
While this works, keep in mind it can be removed with future CL updates.
EDIT: Looking up that game, it looks like there are a couple other dependencies that will give you trouble since CL doesn’t package them. libmpeg2 and unionfs-fuse . You can, of course, compile those and install locally.
1 Like