[myn:2006042400] の続き.
undefined reference to `__ctype_b' undefined reference to `__ctype_tolower' undefined reference to `__ctype_toupper'
とかで怒られるというあれ.いわゆる上記の symbol 入り libc をつくる件.
% apt-get source glibc (これで glibc-2.3.6.ds1 という directory ができる) % cd glibc-2.3.6.ds1 % head -1 debian/changelog glibc (2.3.6.ds1-11) unstable; urgency=low % emacs debian/changelog C-c C-v (要 debian-changelog-mode) 2.3.6.ds1-12 となるところをなんとなく 2.3.6.ds1-11.1 とかに修正 C-c C-f, C-x C-s, C-x C-c % head -1 debian/changelog glibc (2.3.6.ds1-11.1) unstable; urgency=low % wget -O - 'http://cvs.debian.org/*checkout*/glibc-package/debian/patches/glibc23-ctype-compat.dpatch?root=glibc' > debian/patches/any/glibc23-ctype-compat.dpatch % echo any/glibc23-ctype-compat.dpatch >> debian/patches/series
ここまでが下準備.ここで,
% nice -19 fakeroot make -f debian/rules binary
とかしてもいいのだけれど,相当時間がかかるので, 今回は必要なものだけ作る方針をとる.必要なものとは,
% dpkg -l | grep 2.3.6.ds1
によると
とのこと.同じ build# の package に依存 (locales が libc6 に依存とか) するので,これらすべて(のみ)を作り直す.debian/rules に適当に,
hoge: @echo RUN_TESTSUITE: $(RUN_TESTSUITE) @echo DEB_INDEP_REGULAR_PACKAGES: $(DEB_INDEP_REGULAR_PACKAGES) @echo DEB_ARCH_REGULAR_PACKAGES: $(DEB_ARCH_REGULAR_PACKAGES) @echo DEB_UDEB_PACKAGES: $(DEB_UDEB_PACKAGES) @echo GLIBC_PASSES: $(GLIBC_PASSES)
とか書いて調べてみたところ,default では,
RUN_TESTSUITE: yes DEB_INDEP_REGULAR_PACKAGES: glibc-doc locales DEB_ARCH_REGULAR_PACKAGES: libc6 libc6-dev libc6-dbg libc6-prof libc6-pic locales-all libc6-i686 libc6-xen libc6-amd64 libc6-dev-amd64 nscd DEB_UDEB_PACKAGES: libc6-udeb libnss-dns-udeb libnss-files-udeb GLIBC_PASSES: libc nptl i686 xen amd64
となっている.これを,
RUN_TESTSUITE: no DEB_INDEP_REGULAR_PACKAGES: locales DEB_ARCH_REGULAR_PACKAGES: libc6 libc6-dev libc6-amd64 libc6-dev-amd64 DEB_UDEB_PACKAGES: GLIBC_PASSES: libc nptl amd64
とすべく,
% nice -19 fakeroot make -f debian/rules hoge \ > "RUN_TESTSUITE=no" \ > "DEB_INDEP_REGULAR_PACKAGES=locales" \ > "DEB_ARCH_REGULAR_PACKAGES=libc6 libc6-dev libc6-amd64 libc6-dev-amd64" \ > "DEB_UDEB_PACKAGES=" \ > "GLIBC_PASSES=libc nptl amd64" RUN_TESTSUITE: no DEB_INDEP_REGULAR_PACKAGES: locales DEB_ARCH_REGULAR_PACKAGES: libc6 libc6-dev libc6-amd64 libc6-dev-amd64 DEB_UDEB_PACKAGES: GLIBC_PASSES: libc nptl amd64
という感じでテスト.良さげ.ということで,
% nice -19 fakeroot make -f debian/rules binary \ "RUN_TESTSUITE=no" \ "DEB_INDEP_REGULAR_PACKAGES=locales" \ "DEB_ARCH_REGULAR_PACKAGES=libc6 libc6-dev libc6-amd64 libc6-dev-amd64" \ "DEB_UDEB_PACKAGES=" \ "GLIBC_PASSES=libc nptl amd64"
とかで必要な .deb が ../ に生成される.
RUN_TESTSUITE は test をするかどうかを指示するフラグみたいなもので, yes だと相当 build に時間がかかってしまう.*_PACKAGES は文字通り作る package のリスト.GLIBC_PASSES は良く別らない (see debian/sysdeps/i386.mk とか).
ちなみに Pentium M 1.20GHz で ccache が効きまくった状態でだいたい 1時間半ぐらいかかる.
Last-modified: Fri Jul 20 10:44:04 +0900 2007