You are not logged in.
Ever since Use devtools x86_64.conf as /etc/makepkg.conf was merged, most of my AUR packages now generate, and offer to install, a correlated debug symbol package. I do not want to install these packages, so I'm looking for help with this debug option.
I have tried reverting the change to the OPTIONS line in the two file locations indicated by the man page for user config of makepkg.conf:
~/.config/pacman/makepkg.conf
~/.makepkg.conf
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto)
I also tried changing the relevant line in /etc/makepkg.conf by commenting out the default and adding a line with my options, like so:
#OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge debug lto)
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto)
An example AUR package is epson-inkjet-printer-escpr. Its PKGBUILD contains no options=() array, so it's not overriding my config, yet when I run `makepkg -Ccisf` it generates a new package "epson-inkjet-printer-escpr-debug" as if the debug and strip options are both enabled when only strip is enabled. I consulted the #archlinux-pacman IRC channel and was met with confusion, so any help I can get here would be greatly appreciated!
Last edited by Zosoled (2024-02-16 06:15:26)
Offline
add "set -x" to the head of /usr/bin/makepkg and run "makepkg -eo > /tmp/makepkg.log 2>&1", then inspect /tmp/makepkg.log for what's going on.
Then remove the "set -x" again.
Offline
Here is the log output: https://0x0.st/HdhA.txt
For what should I be searching? From what I can tell, OPTIONS has indeed disabled debug throughout, but I do not know enough to know for sure.
Offline
This happens on a clean build, with nothing starting in the dir? That log does not show that package being created.
Edit: Oh, you were using the -o option, so nothing got created. It would probably be a pretty huge log with everything.
Last edited by Scimmia (2024-02-15 02:11:25)
Offline
Yeah, unfortunately the configs are properly sourced, '!debug' is read and quoted.
Wipe the AUR path, remove the "set -x" again, fetch and rebuild the package again - does it still build the debug package?
If so wrap the create_debug_package() function w/ set -/+x
create_debug_package() {
# check if a debug package was requested
set -x
…
set +x # skip tracing the actual creation
create_package
}
and build the package again w/ that
Offline
OK cleaning completely seems to have worked.
$ sudo pacman -Runsc epson-inkjet-printer-escpr
$ rm -rf epson-inkjet-printer-escpr
$ git clone https://aur.archlinux.org/epson-inkjet-printer-escpr.git
$ cd epson-inkjet-printer-escpr
$ makepkg -Ccis
No debug package generated.
Offline
For building packages using PKGBUILD from AUR (or created myself), I use following command which prevents makepkg to create and install debug package.
No need to modify any config file:
makepkg -si OPTIONS=-debug
The minus (-) sign at start of "debug" means "do NOT create and install debug package
This is very simple and easy
EDIT:
Above solution does not build a debug package, but includes the debug symbol in the main package itself..
Another solution, which does NOT build debug package, as well as does NOT includes the debug symbol in the main package itself is given below:
Edit file PKGBUILD and add following line:
options=('!debug')
Then issue command:
makepkg -si
.
Last edited by abcd567 (2025-02-10 03:51:18)
Offline