Linux HOWTOs

About | Home | Search

HOWTO: libsigsegv
Description: Library for handling page faults in user mode
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything

# GNU libsigsegv 2.6
# ==================
test -f installed/libsigsegv-2.6.tar.gz &&
 mv installed/libsigsegv-2.6.tar.gz .
test ! -f libsigsegv-2.6.tar.gz &&

# Verify tarball w/ md5sum:
# (this came from my gpg-verified tarball)
echo "7e24993730649d13c6eabc28bd24de35  libsigsegv-2.6.tar.gz" | md5sum -c

# Verify tarball w/ sha1sum:
# (this also came from my gpg-verified tarball)
echo "15ca1dd9574012b8c4c4d2bf6ba945546114b0b5  libsigsegv-2.6.tar.gz" \
 | sha1sum -c

# Verify tarball w/ gpg:
( gpg --list-keys 09718317 > /dev/null 2>&1 || gpg --recv-keys 09718317 ) &&
 wget -nc &&
  gpg --verify libsigsegv-2.6.tar.gz.sig && rm libsigsegv-2.6.tar.gz.sig

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type f -name "libsigsegv-*" -exec rm -r {} \;
tar xzvf ~/libsigsegv-2.6.tar.gz
cd libsigsegv-2.6
test $UID = 0 && chown -R root:root .

## Configure, build, and test it
# If you want to build it as a shared library add --enable-shared to
# the configure line
make check

# Become root to install it

## Install it
# If you added --enable-shared above, run 'ldconfig' after 'make install'
# and check /usr/local/lib for old versions of* if this
# is an upgrade.
make install

# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+w .

# Become yourself again

mkdir -p -m 0700 installed
rm -f installed/libsigsegv-*.tar.*
mv libsigsegv-2.6.tar.gz installed/

# If you ever want to uninstall libsigsegv, this should do it:
test -d src/libsigsegv-* && ( cd src/libsigsegv-* ; make uninstall )
rm -f /usr/local/include/sigsegv.h
( cd /usr/local/lib ; rm -f libsigsegv.a* )
find ~/src -maxdepth 1 -type d -name "libsigsegv-*" -exec rm -r {} \;
rm -f ~/installed/libsigsegv-*.tar.*

Back to the list

Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>