ERROR: Slooooow dooooown... this page load was delayed.


bdwgc - A garbage collector for C and C++ ChangeLog

HOWTO


# bdwgc 8.2.4 (aka bdw-gc, BDW-GC, BDWGC, gc, ...)
# ===========
# The Boehm-Demers-Weiser Garbage Collector

# Prerequisites:
# pkg-config
# libatomic_ops (see below)

# Get the tarball
cd
test -f installed/gc-8.2.4.tar.gz &&
mv -f installed/gc-8.2.4.tar.gz .
test ! -f gc-8.2.4.tar.gz &&
wget https://www.hboehm.info/gc/gc_source/gc-8.2.4.tar.gz

# Verify tarball w/ sha256sum:
# (this came from my tarball, so it only proves that yours is the same)
echo "3d0d3cdbe077403d3106bb40f0cbb563413d6efdbb2a7e1cd6886595dec48f\
c2  gc-8.2.4.tar.gz" | sha256sum -c

# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
# Matching "gc-*" may catch "gc-somethinglese-1.2.3", so we use -regex
# instead of -name here
find -maxdepth 1 -type d -regex "^\.\/gc-[0-9]+\..*" -exec rm -r {} \;
tar xzvf ~/gc-8.2.4.tar.gz
cd gc-8.2.4
test $UID = 0 && chown -R root:root .

# Now get libatomic_ops and extract it
# See the info about it on the gc site for what version to use
test -L libatomic_ops && rm libatomic_ops
wget -nc https://www.hboehm.info/gc/gc_source/libatomic_ops-7.8.0.tar.gz &&
tar xzvf libatomic_ops-7.8.0.tar.gz &&
  ln -s libatomic_ops-7.8.0 libatomic_ops

# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --docdir=/usr/local/doc/gc-8.2.4 --libdir=/usr/local/lib64 \
--with-mandir=/usr/local/man

# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --docdir=/usr/local/doc/gc-8.2.4 --mandir=/usr/local/man

# Build it
make -j $(nproc)

# Become root to install it
su

# Clean up docs from old versions
find /usr/local/doc -maxdepth 1 -type d -regex "^\.\/gc-[0-9]+\..*" \
-exec rm -r {} \;

# Install it
make install
ldconfig

# If this outputs anything with date that is not today, and you're sure
# it's not in use by anything else, remove it.  If you have the disk
# space, and it is not causing any problems, leave it there.
ls -lR /usr/local/include/gc.h /usr/local/include/gc/ \
/usr/local/lib*/libcord.* /usr/local/lib*/libgc.* | less

# Become yourself again
exit

# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/gc-[0-9]\.*.tar.gz
mv gc-8.2.4.tar.gz installed/


# If you ever want to uninstall bdwgc, this should do it:
cd
su
test -d src/bdwgc-* && ( cd src/bdwgc-* ; make uninstall )
find /usr/local/doc -maxdepth 1 -type d -regex "^\.\/gc-[0-9]+\..*" \
-exec rm -r {} \;
test -d /usr/local/doc/dc && rm -r /usr/local/doc/dc
test -d /usr/local/include/gc && rm -r /usr/local/include/gc
rm -f /usr/local/lib*/libcord.* /usr/local/lib*/libgc.* \
/usr/local/lib*/pkgconfig/bdw-gc.pc /usr/local/include/gc.h
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "bdwgc-*" -exec rm -r {} \;
rm -f ~/installed/bdwgc-*.tar.*

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EST -0500)
HOWTO last updated: 2024-03-01 1:18pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]