So me and compiling, me and compiling. I enjoy the challenge but sometimes we don't get along. Currently I have been plagued by a annoying, yet non nasty glib bug. So I am sitting here waiting for a new version to come to the repositories, waiting, waiting, waiting. Seven days later I decide after talking with Kaede a bit it's time to take things into my own hands!
It's time to pull down that source package and apply that upstream patch myself! So I pull my source down and apply the patch:
dpkg-buildpackage -us -uc -b
Nope! Install build dependencies, run again, oh my god this is taking forever how do I do make -j 9 with dpkg-buildpackage. I put up with it and keep letting it run:
make: *** [check-recursive] Error 1
Noooooo, why? Can't find anything, but I decide to be stubborn and persist. That compile took foorreeevver. Spend 20 minutes looking at the dpkg-buildpackage page, start looking for ways to set an environment variable so I can specify jobs for it. Research more ask everyone I know, look back at the man page. Oh god I am idiot it supports -j just like make. This is the part where I scream into my pillow. So again we go:
dpkg-buildpackage -us -uc -b -j9
Recalling these errors from memory now cause they are long gone in scroll back. "Cannot find suitable locale, test failed". OMG why! Run the command again, suddenly it works! On goes the you have got to be kidding me face. Totally happy proclaim victory to Kaede in Instant Messenger!
But wait... what about my netbook?
No problem into my chroot to compile for it, easy right? No, god no. So it turns out when you're in a chroot certain things don't work without extra effort. (No dev proc etc) So glib needs dbus for it's tests I install the build depends and of course dbus refuses to run because no /proc, right then. Must be time to disable those tests, I start searching the configure file. I finally find an option to turn it off, but debian does this all automatically and the configure file will be rewritten.
So time for some googling! I find out debian/rules is where I want to go! Head over there and find this:
# configure flags
DEB_CONFIGURE_EXTRA_FLAGS := \
Aha that looks like where I can disable the tests. So I try again adding --disable-modular-tests. No go, turns out the docs need the tests so I add --disable-gtk-doc. After all I only want the lib package to come out of this compile to fix my bug. Success chroot compiles my i386 deb. Off to my netbook to test it. Another success the netbook package seems fine too.
So warnings and lessons learned. Don't ever try to compile from source vital packages unless you're very confident about it. (libc for example) Always download the repositories package so you can install it locally with dkpg in case of the worst. Also persist and research, if I'd given up at the first few errors I'd have never got this to work.