daemontoolsをCentOS5.2にいれてみた(ビルド編)

これ:http://cr.yp.to/daemontools.html

で、そのままビルド&インストールしようとすると

# ./package/install
:
./load envdir unix.a byte.a
/usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in envdir.o
/lib/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status

とかでた。

割とメジャーなエラーらしく、/usr/include/errno.h をインクルードするとよいらしい。ので、./src/print-cc.shを

c="`head -1 conf-cc`"
systype="`cat systype`"

cat warn-auto.sh
echo exec "$cc --include=/usr/include/errno.h " '-c ${1+"$@"}'

と書き換えて再ビルド。

成功(・ω・)