Last active
December 22, 2023 10:12
-
-
Save AnyKeyShik/ceb184611b379e0686a68f19cecceafe to your computer and use it in GitHub Desktop.
Install glibc debug symbols on Arch Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
##################################################### | |
# Install glibc with debug symbols on Arch Linux # | |
# # | |
# Make by AnyKeyShik Rarity (c) 2021 # | |
##################################################### | |
echo "Installing build dependencies" | |
# Install Dependencies | |
sudo pacman -S git svn gd lib32-gcc-libs patch make bison fakeroot devtools | |
echo "Checkout glibc sources from ArchLinux SVN" | |
# Checkout glibc source | |
svn checkout --depth=empty svn://svn.archlinux.org/packages && cd packages | |
svn update glibc && cd glibc/repos/core-x86_64 | |
echo "Get user locales" | |
# Add current locale to locale.gen.txt | |
grep -v "#" /etc/locale.gen >> locale.gen.txt | |
echo "Change build config to debug" | |
# Enable debug build in PKGBUILD | |
sed -i 's#!strip#debug#' PKGBUILD | |
echo "Build libc" | |
# Build glibc and glibc-debug packages | |
makepkg --skipchecksums --config /usr/share/devtools/makepkg-x86_64.conf | |
echo "Installing libc" | |
# Install glibc-debug | |
sudo pacman -U *.pkg.tar.zst | |
echo "Update makepkg.conf" | |
sudo sed '/^OPTIONS/ s/!debug/debug/g; /^OPTIONS/ s/strip/!strip/g' /etc/makepkg.conf | |
echo "Installation complete!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note the sed line to edit PKGBUILD doesn't work anymore, see https://wiki.archlinux.org/title/Debugging/Getting_traces#glibc and manually add
debug !strip