Building ports in debug mode
Lately, Amarok’s Ipod handling has been acting up — Amarok crashes immediately when trying to add music to the Ipod.
So, I wanted to do some debugging using the gnu debugger (gdb) to figure out what’s wrong, but I forgot to build Amarok with the debugging symbols.
There’s more than one way to do it. I can set options in /etc/make.conf (which sets build options globally), or I can set the debug option at build time for just Amarok. I decided to do the 2nd one, since everything else is working.
To set build options on a port, you use the -D flag, and specify the variable, so in my case it’s the DEBUG flag.
So:
cd /usr/ports/audio/amarok
make install -D DEBUG
[wait for the compiler to do its thing]
then I’ll run
gdb amarok
)run
and we’ll see what’s up. If you wanted to run debugging for all your port builds, apparently you can set the variable
DEBUG_FLAGS=-g
in /etc/make.conf
