libjpeg-turbo - JPEG image codec that uses SIMD instructions to accelerate ChangeLog

HOWTO


# libjpeg-turbo 3.0.1
# ===================
# Slackware 14.2: libjpeg-turbo 1.5.0
# Slackware 15.0: libjpeg-turbo 2.1.2

# Prerequisites:
# pkg-config
# CMake >= 2.8.12
# NASM >= 2.10 or JDK or OpenJDK >= 1.5 (if you want the Java wrapper)

# GitHub 3.0.1 release page
# libjpeg-turbo-announce 3.0.1 announcement
# SourceForge 3.0.1 files

# Get it
cd
test -f installed/libjpeg-turbo-3.0.1.tar.gz &&
mv installed/libjpeg-turbo-3.0.1.tar.gz .
test ! -f libjpeg-turbo-3.0.1.tar.gz &&
wget https://downloads.sf.net/libjpeg-turbo/libjpeg-turbo-3.0.1.tar.gz

# Verify tarball w/ sha256sum:
# (from my gpg-verified tarball)
echo "22429507714ae147b3acacd299e82099fce5d9f456882fc28e252e4579ba2a\
75  libjpeg-turbo-3.0.1.tar.gz" | sha256sum -c

# Verify tarball w/ gpg:
# https://www.libjpeg-turbo.org/key/LJT-GPG-KEY
# https://sourceforge.net/projects/libjpeg-turbo/files/LJT-GPG-KEY
( gpg --list-keys 7EC2DBB6F4DBF434 > /dev/null 2>&1 ||
  gpg --keyserver keyserver.ubuntu.com --recv-keys 7EC2DBB6F4DBF434 ) &&
wget -nc https://downloads.sf.net/libjpeg-turbo/libjpeg-turbo-3.0.1.tar.gz.sig
  gpg --verify libjpeg-turbo-3.0.1.tar.gz.sig &&
   rm libjpeg-turbo-3.0.1.tar.gz.sig

# Extract the tarball
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "libjpeg-turbo-*" -exec rm -r {} \;
tar xzvf ~/libjpeg-turbo-3.0.1.tar.gz
cd libjpeg-turbo-3.0.1
test $UID = 0 && chown -R root:root .

# Read at least ./README.md and ./BUILDING.md

# Create a build directory
mkdir -p build
cd build

# If you've run CMake before, clean up
test -f Makefile && make clean
test -f CMakeCache.txt && rm CMakeCache.txt

# List all CMake configuration options
cmake -LH .. | less

# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
cmake -DENABLE_STATIC=0 \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_INSTALL_DOCDIR=/usr/doc/libjpeg-turbo \
  -DCMAKE_INSTALL_LIBDIR=/usr/lib64 \
  -DCMAKE_INSTALL_MANDIR=/usr/man ..

# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
cmake -DENABLE_STATIC=0 \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo \
  -DCMAKE_INSTALL_MANDIR=/usr/man ..

# Build it
make

# Test the build
make test

# Become root to install it
su

# Before installing it, look at what you have in /usr/lib*/libjpeg.*
# Note different dates, that may indicate what came from what...
# (Slackware package or soure, libjpeg vs libjpeg-turbo)
# If you have libjpeg (non-turbo) installed now, these would be from it:
# /usr/lib64/libjpeg.a
# /usr/lib64/libjpeg.la
# /usr/lib64/libjpeg.so (symlink)
# /usr/lib64/libjpeg.so.9 (symlink)
# /usr/lib64/libjpeg.so.9.3.0
#
# libjpeg-turbo will install it's own libjpeg and also libturbojpeg and
# unlike .so.8 or .so.9, the libjpeg from -turbo will be .so.62
#
# Try 'lsof /usr/lib*/libjpeg.*' to see if it lists anything running now
# that is using an old version shared library

# Remove the Slackware libjpeg and libjpeg-turbo packages, if there any
# To be extra safe, copy /usr/lib*/libjpeg.* somewhere else firse in
# case you have to put them back
test -x /sbin/removepkg && /sbin/removepkg libjpeg libjpeg-turbo

# If you used -DENABLE_STATIC=0 this time and are upgrading
rm -f /usr/lib*/libjpeg.a /usr/lib*/libturbojpeg.a

# Install it
make install
ldconfig

# Become your non-root user again
exit

# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/libjpeg-turbo-*.tar.gz
mv -f libjpeg-turbo-3.0.1.tar.gz installed/


# If you ever want to uninstall libjpeg-turbo (and libjpeg), this should
# do it.  'make uninstall' as root in the source directory may be enough,
# the rest is to cover anything else that is missed.
cd
su
test -d src/libjpeg-turbo-* && ( cd src/libjpeg-turbo-* ; make uninstall )
( cd /usr/bin
  rm -f cjpeg djpeg jpegtran rdjpgcom tjbench wrjpgcom )
test -d /usr/doc/libjpeg-turbo && rm -r /usr/doc/libjpeg-turbo
( cd /usr/include
  rm -f jconfig.h jerror.h jmorecfg.h jpeglib.h turbojpeg.h )
( cd /usr/lib
  rm -f libjpeg.* libturbojpeg.* pkgconfig/libjpeg.pc \
   pkgconfig/libturbojpeg.pc )
test -d /usr/lib64 &&
( cd /usr/lib64
   rm -f libjpeg.* libturbojpeg.* pkgconfig/libjpeg.pc \
    pkgconfig/libturbojpeg.pc )
( cd /usr/man/man1
  rm -f cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1 )
test -d /usr/share/doc/libjpeg-turbo && rm -r /usr/share/doc/libjpeg-turbo
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libjpeg-turbo-*" -exec rm -r {} \;
rm -f ~/installed/libjpeg-turbo-*.tar.*

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EST -0500)
HOWTO last updated: 2023-10-16 6:53pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]