23:12:46 # Life Running qemubuilder with cross compiler on host OS. I installed cross compiler from emdebian. In the qemubuilder environment, I installed distcc. It is possible to run the host OS cross-compiler from the emulated environment. Because the emulated environment is slow, this will improve compilation speed much. In my simple example (hello world), the speed difference is x2. I need to tune my set up a bit more to get packages building, but I think I figured out what's really required.
root@pbuilder-coreduo:/tmp# export DISTCC_HOSTS=10.0.2.2 root@pbuilder-coreduo:/tmp# time distcc arm-linux-gnueabi-gcc -c a.c real 0m0.324s user 0m0.160s sys 0m0.150s root@pbuilder-coreduo:/tmp# time cc -c a.c real 0m0.657s user 0m0.410s sys 0m0.240s
21:58:17 # Life Rebuilding packages fast with distcc and ccache. I've found that I've neglected ecasound package for a long time. It's a pretty big C++ package, and one of the reasons I don't want to touch it recently is the time it takes to build the package. I played with distcc/ccache a little bit and found that it's pretty easy to set it up working with debuild thanks to those people who made it possible. debuild (or dpkg-buildpackage) now takes -j option for parallelism, and there are some options for ccache/distcc. I just crafted ~/.devscript, and ran debuild -j5, and the build went zooming fast. Cool.
DEBUILD_SET_ENVVAR_CCACHE_PREFIX="distcc" DEBUILD_SET_ENVVAR_DISTCC_HOSTS="coreduo.local akkeee.local" # names of machines to use in the build. DEBUILD_PREPEND_PATH=/usr/lib/ccache
22:33:32 # Life Rewritten parts of apt-listbugs. I've uploaded apt-listbugs 0.0.90. It has the core bug logic re-written, and some other user-visible changes. I hope I haven't broken anything, but please bash it out.
06:15:40 # Life Running a unittest in C, for emacs, the simplest way. I was looking at running a functional unittest for C, and there are so many tools available. I wrote a little emacs script which runs test_FILENAME.c via binfmtc in compile-mode, and running tests using good-old assert() macros. 'assert' macro output has the program name, which is the same as the C source file name when running binfmtc, and emacs compile mode doesn't like that. Hmmm.. and I found that auto-compile.el seems to do most of what I wanted, a little different manner.
./test_ilistcreate.c test_ilistcreate.c: test_ilistcreate.c:15: main: Assertion `0' failed.
So, how does this look like?
(defun dancer-test-run-c () "run test program for current buffer, for C language" (interactive) (let* ((compilation-error-regexp-alist '(("\\([^:]+\\): \\([^:]+\\):\\([0-9]+\\):" 2 3 nil)))) (compile (concat "./test_" (file-name-nondirectory buffer-file-name))))) (add-hook 'c-mode-hook '(lambda () (progn (local-set-key "\C-c\C-c" 'dancer-test-run-c)))) (add-hook 'c++-mode-hook '(lambda () (progn (local-set-key "\C-c\C-c" 'dancer-test-run-c))))
19:27:07 # Life Recovered Macbook. Thanks to several people at Debconf who have helped me out in this task, I have Debian running on my MacBook, again, on a new harddrive. The silliest part was not noticing that disk was GPT partitioned and not noticing it was, thinking that I partitioned with MBR/FAT partitioning.
00:08:05 # Life Writing unit tests for shell scripts. Fed up with trial and error with 1-hour long testsuite of pbuilder, I've wrote some functional unit testing framework in bash, and added that to pbuilder. 'testlib.sh' is the framework, test_xxxx.sh scripts are the ones which actually run the tests. Anyone really need something like that? UPDATE: I've received info that TAP has resources on bash as well, and there was a link to Git.
23:07:50 # Life My laptop harddisk died. Or rather, it's dying. Making funny noise, and ext3 journal is failing to write. It's not good news.
sd 0:0:1:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK sd 0:0:1:0: [sda] Sense Key : Medium Error [current] [descriptor] Descriptor sense data with sense descriptors (in hex): 72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00 05 77 c3 b3 sd 0:0:1:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed
00:00:40 # Life Packages uploaded in Debconf. I've uploaded qemubuilder new version which supports armel architecture. And I updated dpatch with some necessary patches.
05:23:32 # Life debugging qemubuilder armel. nomeata wondered why it's not working, and after having added basic support for it, it wasn't working. Debugging why it isn't working at all now. I have figured out that armel kernel doesn't need initrd to bootstrap qemubuilder session; the kernel has support for ext3 built-in. The initrd for armel reads 'init=' and parses it as a command for the initrd to process, and tries to invoke that command within the ramdisk. qemubuilder expects that harddisk is mounted and passes init=/pbuilder-run, and that's not found on the initrd, and the error happens. If I didn't specify the initrd, things seem to work fine. It just runs as versatile architecture. My pbuilderrc for qemu-armel.
KERNEL_IMAGE=vmlinuz-2.6.24-1-versatile-armel ARCH=armel BASEPATH=/home/dancer/tmp/base-armel.qemu
08:02:27 # Life Looking at native code invocation options for ruby. To make apt-listbugs code safer, and faster, I was looking for ways of not forking dpkg every time it tries to analyse package versions. SWIG and other stuff seem to be good for calling C code, but not useful for calling C++ code. C++ code isn't exactly convenient for dlopening and calling. I tried making a little shared library for forking and it seems to work that way, but I don't know if I really want to create and maintain this C++ shared library just for this feature. 390332 is the old patch I crafted.
14:38:29 # Life Ubuntu kernels not working with qemubuilder. I've seen reports that Ubuntu kernels don't work because they have /dev/sda instead of /dev/hda for IDE devices. I'm not entirely sure that's a clever thing to do, but I'm not entirely sure if it's a clever thing to hardcode /dev/hda for i386/amd64 qemu architectures. UPDATE: 0.48: I added a configuration item so that hd/sd can be configured.
11:50:56 # Life gettext locale bug. I debugged 492907 today. Contrary to my initial impression, it looks like a bug in libgettext-ruby1.8. charset for cs_CZ is ISO-8859-2, but ruby thinks it is UTF-8.
14:41:40 # Life Trying to debug a race condition in dsh. I received a report that dsh drops a few hosts when running 'hostname' on parallel on 1000+ node clusters. I have set up some testsuite and simulation environment, and found some possible causes, and managed to reduce that rate to about 1/3000. However, it's not zero, and I feel uneasy that not all corner cases have been found. I hate this feeling.
$Id: 200808.html.en,v 1.23 2008/09/01 06:14:44 dancer Exp $