Linux — Building and Debugging GTK

Sometimes installing the debug packages for gtk and glib isn‘t quite enough. (For instance, if the artifacts from -O2 are driving you bonkers in gdb, you might want to rebuild with -O0.) Here’s how to build from source and use your local version without installing it.

This should take about an hour. If it gets stuck waiting for a zombie, you may have to kill its closest parent (the makefile uses subshells, and bash seems to get confused). When I did this, it continued successfully.

At the very end, it will prompt you for the passphrase for your gpg key.

By default, this just grabs and unpacks prebuilt libraries; see ia32-libs-2.7ubuntu6/fetch-and-build which documents a BUILD variable which would force actual building. This would take way longer, since it builds dozens of libraries. I haven't tried it yet.