ルギア君の戯言

雑多な記事。

6年11月29日 (水) - TeX Live 20100722 + e-pTeX 20110315 奮闘記 - その1

みんな「みーっつ! みんな笑顔で明るいあるぱ城!」
ドンちゃん「よし、今日も仕事始め!」


…………………………


ルギア君「うーん、」
キリルン「何でゲソ?」
ルギア君「まず、じゃあ説明する前に、手元の環境を書こうか。」
キリルン「そうでゲソね。」

Package Version
autoconf 2.68-3m.mo7.noarch
automake 1.11.1-5m.mo7.noarch
bash 4.1-7m.mo7.x86_64
gcc 4.6.1-0.20110520.1m.mo7.x86_64
gcc-c++ 4.6.1-0.20110520.1m.mo7.x86_64
libtool 2.4-6m.mo7.x86_64
m4 1.4.16-2m.mo7.x86_64
make 3.81-14m.mo7.x86_64

ルギア君「結論から言うと、何が悪いって、autotools 使ってるからなんだよね。」
キリルン「それは無いでゲソ。」
ルギア君「Autotools は複雑だし、管理するファイルも多くて、やる気なくすものな。」
キリルン「そんなこと言ってはダメでゲソ。あきらめないで欲しいゲソ。」
ルギア君「まあ、とりあえず、e-pTeX に付いてきたパッチを当てるのは、一部パッチ変えたりしたけど、これは特に問題ない。」
キリルン「どういうことでゲソ?」
ルギア君--fuzz=0 で当たらないものだけ、パッチを見ながら修正したというわけ。」
キリルン「なるほどでゲソ。」
ルギア君「まあ、どちらかと言えば、手動 --fuzz=2 だから、あっているかどうかはわからないけど。」
キリルン「ダメじゃなイカ。」
ルギア君「それで、何が問題かというと、e-pTeX に付いてきたシェルスクリプトによれば、パッチを当てて autoreconf を実行するわけなんだが、これは Warning が大量にでるんだ。というのも、もともと TeX Live に付いてきたやつは、」

[lugia@arpa-castle texlive-20100722-source]$ head configure
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.65 for TeX Live 2010-07-20.
#
# Report bugs to <tex-k@tug.org>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.

ルギア君「となっていて、要するにバージョンが違うわけ。」
キリルン「それはさっきバージョンを教えてくれたからわかるでゲソ。」
ルギア君「一方で、」

[lugia@arpa-castle texlive-20100722-source]$ head aclocal.m4 
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-

# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without

ルギア君「こっちは一緒だけどね。で、これをそのまま autoreconf すると、」

[lugia@arpa-castle texlive-20100722-source]$ autoreconf
configure.ac:48: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
m4/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from...
m4/libtool.m4:4158: _LT_LINKER_SHLIBS is expanded from...
m4/libtool.m4:5233: _LT_LANG_C_CONFIG is expanded from...
m4/libtool.m4:138: _LT_SETUP is expanded from...
m4/libtool.m4:67: LT_INIT is expanded from...
m4/kpse-common.m4:217: KPSE_COMMON is expanded from...
configure.ac:48: the top level
configure.ac:48: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
(以下略。似たようなのが大量にでる。)

ルギア君「という風に Warning がいっぱいでるの。」
キリルン「それで?」
ルギア君「とりあえず、Warning だし、といってそのまま configure と make を実行するんだけど、」

+ /opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/configure --prefix=/usr --datadir=/usr/share --libdir=/usr/lib64 --datarootdir=/ --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc --with-system-xpdf --with-system-gd --with-system-t1lib --with-system-libpng --with-system-zlib --with-system-teckit --with-teckit-includes=/usr/include/teckit --with-kpathsea-includes=/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/texk --with-system-freetype2 --with-pic --with-xdvi-x-toolkit=motif --enable-shared --disable-dialog --disable-t1utils --disable-psutils --disable-lacheck --disable-ps2pkm --disable-dvidvi --with-ptexenc-enc=UTF-8 --enable-etex --enable-ptexenc --enable-pxdvik --enable-pdvipsk --enable-mendexk --enable-makejvf --enable-compiler-warnings=max --without-cxx-runtime-hack --disable-native-texlive-build
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
(中略)
** Configuration summary for TeX Live 2010-07-20:

   compiling for x86_64-unknown-linux-gnu
      in /opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source

   prefix:                       /usr
   enable_native_texlive_build:  no
   enable_shared:                yes
   enable_multiplatform:         no
   enable_cxx_runtime_hack:      no
   enable_libtool_hack:          yes
   enable_compiler_warnings:     max

** Next run `make' to configure and build each library and program.

+ /usr/bin/make -j2 all
Making all in .
make[1]: Entering directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source'
=== configuring in texk/kpathsea (/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/texk/kpathsea)
(中略)
Making all in texk/ptexenc
make[2]: Entering directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/texk/ptexenc'
(中略)
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./ptexenc -DNO_DEBUG -DMAKE_PTENC_DLL -Wall -Wunused -Wimplicit -Wreturn-type -Wdeclaration-after-statement -Wno-unknown-pragmas -Wmissing-prototypes -Wmissing-declarations -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wold-style-definition -g -O2 -MT libptexenc_la-ptexenc.lo -MD -MP -MF .deps/libptexenc_la-ptexenc.Tpo -c ptexenc.c  -fPIC -DPIC -o .libs/libptexenc_la-ptexenc.o
ptexenc.c:5:29: fatal error: kpathsea/config.h: No such file or directory
compilation terminated.
make[2]: *** [libptexenc_la-ptexenc.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from kanjicnv.c:6:0:
./ptexenc/kanjicnv.h:8:28: fatal error: kpathsea/types.h: No such file or directory
compilation terminated.
make[2]: *** [libptexenc_la-kanjicnv.lo] Error 1
make[2]: Leaving directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/texk/ptexenc'
make[1]: *** [texlibs] Error 1
make[1]: Leaving directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source'
make: *** [all-recursive] Error 1

ルギア君「と言う風にビルドはエラーになるし。だから、とりあえず、このエラーを無くすため、応急処置として、」

CFLAGS="-I$srcroot/texk" \
$srcroot/configure --prefix=%{_prefix} \
    --datadir=%{_datadir} \
(以下略)

ルギア君「なんてやっちゃうわけ。」
キリルン「まあ、たしかにそれも有りでゲソね。」
ルギア君「で、ビルドするんだけど、」

(前略)
=== configuring in libpng (/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/libs/libpng)
(中略)
checking for working strtod... yes
checking for memset... yes
checking for library containing pow... -lm
./configure: line 4639: KPSE_ZLIB_SYSTEM_FLAGSelse: command not found
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating config.h
config.status: executing depfiles commands
(後略)

ルギア君「何か不気味なエラーが発生してるんだよね。libpng 以外にもいくつかの箇所で発生しているんだけど、--with-system-libpng のようにシステムのライブラリを使うように指示すると make を実行しなくなるから、結局ここは何も無かったように通り過ぎて、」

(前略)
make[6]: Leaving directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/texk/web2c/web2c'
make[5]: Leaving directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/texk/web2c/web2c'
Making all in .
make[5]: Entering directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/texk/web2c'
cp -f tangleboot.pin tangleboot.p
cp -f cwebboot.hin cwebboot.h
cp -f ctangleboot.cin ctangleboot.c
cp -f cwebboot.cin cwebboot.c
cd ./../../libs/zlib && /usr/bin/make  rebuild
/bin/mkdir -p etexdir
grep '^@d eTeX_version_string==' ./etexdir/etex.ch \
          | sed "s/^.*'-//;s/'.*$//" >etexdir/etex.version
make[6]: Entering directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/libs/zlib'
/usr/bin/make  all-recursive
make[7]: Entering directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/libs/zlib'
/bin/mkdir -p ptexdir
Making all in .
grep "^@d TeX_banner=='This is pTeX" ./ptexdir/ptex-base.ch \
          | sed "s/^.*-//;s/'.*$//" >ptexdir/ptex.version
make[8]: Entering directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/libs/zlib'
gcc -DHAVE_CONFIG_H -I. -I./zlib-1.2.3 -DUSE_MMAP   -I/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/texk -MT adler32.o -MD -MP -MF .deps/adler32.Tpo -c -o adler32.o `test -f 'zlib-1.2.3/adler32.c' || echo './'`zlib-1.2.3/adler32.c
cd ./../../libs/xpdf && /usr/bin/make  rebuild
make[6]: Entering directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/libs/xpdf'
/usr/bin/make  all-recursive
make[7]: Entering directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/libs/xpdf'
Making all in goo
(後略)

ルギア君「のように動作がカオスになったりしながら、」

libtool: link: gcc -Wall -Wunused -Wimplicit -Wreturn-type -Wdeclaration-after-statement -Wno-unknown-pragmas -Wmissing-prototypes -Wmissing-declarations -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-st
rings -Wold-style-definition -I/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/texk -o afm2pl afm2pl.o  -lm
afm2pl.o: In function `openin':
afm2pl.c:(.text+0x44b): undefined reference to `concat'
afm2pl.c:(.text+0x45d): undefined reference to `kpse_find_file'
afm2pl.c:(.text+0x479): undefined reference to `concat'
afm2pl.c:(.text+0x488): undefined reference to `concat'
afm2pl.c:(.text+0x4a2): undefined reference to `kpse_find_file'
afm2pl.c:(.text+0x4c3): undefined reference to `kpse_find_file'
afm2pl.c:(.text+0x4e1): undefined reference to `concat'
afm2pl.c:(.text+0x4fb): undefined reference to `kpse_find_file'
afm2pl.c:(.text+0x50d): undefined reference to `kpse_def'
afm2pl.c:(.text+0x583): undefined reference to `kpse_open_file'
afm2pl.c:(.text+0x5a2): undefined reference to `xbasename'
afm2pl.c:(.text+0x5ab): undefined reference to `kpse_def'
afm2pl.o: In function `openout':
afm2pl.c:(.text+0x641): undefined reference to `find_suffix'
afm2pl.c:(.text+0x683): undefined reference to `find_suffix'
afm2pl.c:(.text+0x6c2): undefined reference to `concat'
afm2pl.c:(.text+0x6d2): undefined reference to `xbasename'
afm2pl.c:(.text+0x6e4): undefined reference to `find_suffix'
afm2pl.c:(.text+0x70c): undefined reference to `concat'
afm2pl.c:(.text+0x74b): undefined reference to `concat'
afm2pl.c:(.text+0x758): undefined reference to `concat'
afm2pl.o: In function `writepl':
afm2pl.c:(.text+0x2dfd): undefined reference to `xbasename'
afm2pl.c:(.text+0x2e15): undefined reference to `find_suffix'
afm2pl.o: In function `version':
afm2pl.c:(.text+0x3a29): undefined reference to `kpathsea_version_string'
afm2pl.o: In function `conspsfonts':
afm2pl.c:(.text+0x437b): undefined reference to `xbasename'
afm2pl.c:(.text+0x4393): undefined reference to `find_suffix'
afm2pl.c:(.text+0x44f9): undefined reference to `xbasename'
afm2pl.c:(.text+0x4529): undefined reference to `xbasename'
afm2pl.c:(.text+0x4541): undefined reference to `find_suffix'
afm2pl.o: In function `main':
afm2pl.c:(.text+0x45cc): undefined reference to `kpse_set_program_name'
collect2: ld returned 1 exit status
make[4]: *** [afm2pl] Error 1
make[4]: Leaving directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/texk/afm2pl'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/texk/afm2pl'
make[2]: *** [subtexk] Error 1
make[2]: Leaving directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/texk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/Momonga/pkgs/texlive/BUILD/texlive-2010/texlive-20100722-source/texk'
make: *** [all-recursive] Error 1
エラー: /var/tmp/rpm-tmp.btPfOk の不正な終了ステータス (%build)

ルギア君「とリンクエラーで終わるわけ。これも、」

CFLAGS="-I$srcroot/texk -L$srcroot/texk/kpathsea -lkpathsea" \
$srcroot/configure --prefix=%{_prefix} \

ルギア君「ってやれば解決するんだけど、どう考えてもこれは問題があるよね。」
キリルン「確かにそんな気がするでゲソ。」
ルギア君「ところで、さっきの Warning なんだけど、」
キリルン「うん。」

+ libtoolize
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: linking file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: linking file `m4/libtool.m4'
libtoolize: linking file `m4/ltoptions.m4'
libtoolize: linking file `m4/ltversion.m4'
libtoolize: linking file `m4/lt~obsolete.m4'
libtoolize: Remember to add `LT_INIT' to configure.ac.
+ ./reautoconf
./reautoconf: using "autoconf" = autoconf (GNU Autoconf) 2.68
./reautoconf: using "autoheader" = autoheader (GNU Autoconf) 2.68
./reautoconf: using "automake" = automake (GNU automake) 1.11.1
./reautoconf: using "aclocal" = aclocal (GNU automake) 1.11.1
./reautoconf:       if you want to use different versions, set TL_AUTOCONF,
./reautoconf:               TL_AUTOHEADER, TL_AUTOMAKE, and/or TL_ACLOCAL.
./reautoconf: running "autoreconf -v --no-recursive ."
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4 --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not running libtoolize: --install not given
autoreconf: running: autoconf
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --no-force
autoreconf: Leaving directory `.'
./reautoconf: running "autoreconf -v --no-recursive auxdir/auxsub"
(後略)

ルギア君「のように libtoolize を実行しておくと無くなるんだけど、結局ビルド結果は変わらなかったよ。」
キリルン「…。」
ルギア君「眠いや。寝る。」
キリルン「おやすみでゲソ。」