試験運用中なLinux備忘録・旧記事

はてなダイアリーで公開していた2007年5月-2015年3月の記事を保存しています。

sayleenのconfigureスクリプトの修正メモ(後半)

sayleenのconfigureスクリプトの修正メモ(前半)」の続き。最後に

configure.in:37: required file `./config.rpath' not found

で止まっているところから。
config.rpathというファイルについてはよく分からなかったが、touchコマンドで空(サイズが0)のファイルをとりあえず作成することにして再試行。

$ touch config.rpath
$ LC_MESSAGES=C make
(中略)
Making all in sayleen
make[2]: Entering directory `/tmp/work/sayleen-20021027/sayleen'
cd .. && automake-1.10 --gnu --include-deps sayleen/Makefile
configure.in:37: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
../../lib/autoconf/specific.m4:386: AC_USE_SYSTEM_EXTENSIONS is expanded from...
aclocal.m4:8915: gl_LOCK_EARLY_BODY is expanded from...
aclocal.m4:8908: gl_LOCK_EARLY is expanded from...
aclocal.m4:9139: gl_LOCK is expanded from...
aclocal.m4:939: gt_INTL_SUBDIR_CORE is expanded from...
aclocal.m4:778: AM_INTL_SUBDIR is expanded from...
aclocal.m4:100: AM_GNU_GETTEXT is expanded from...
configure.in:37: the top level
configure.in:37: warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
sayleen/Makefile.am:26: rcpconv_DEPENDENCIES multiply defined in condition TRUE ...
sayleen/Makefile.am:17: ... `rcpconv_DEPENDENCIES' previously defined here
sayleen/Makefile.am: required file `./depcomp' not found
sayleen/Makefile.am:   `automake --add-missing' can install `depcomp'
sayleen/Makefile.am:32: variable `OMIT_DEPENDENCIES' is defined but no program or
sayleen/Makefile.am:32: library has `OMIT' as canonic name (possible typo)
make[2]: *** [Makefile.in] Error 1
make[2]: Leaving directory `/tmp/work/sayleen-20021027/sayleen'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/work/sayleen-20021027'
make: *** [all] Error 2

今度はdepcompらしいが、次の行に指示があるのでそれに従う。

$ automake --add-missing
configure.in:37: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
../../lib/autoconf/specific.m4:386: AC_USE_SYSTEM_EXTENSIONS is expanded from...
aclocal.m4:8915: gl_LOCK_EARLY_BODY is expanded from...
aclocal.m4:8908: gl_LOCK_EARLY is expanded from...
aclocal.m4:9139: gl_LOCK is expanded from...
aclocal.m4:939: gt_INTL_SUBDIR_CORE is expanded from...
aclocal.m4:778: AM_INTL_SUBDIR is expanded from...
aclocal.m4:100: AM_GNU_GETTEXT is expanded from...
configure.in:37: the top level
configure.in:37: warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
sayleen/Makefile.am:26: rcpconv_DEPENDENCIES multiply defined in condition TRUE ...
sayleen/Makefile.am:17: ... `rcpconv_DEPENDENCIES' previously defined here
sayleen/Makefile.am: installing `./depcomp'
sayleen/Makefile.am:32: variable `OMIT_DEPENDENCIES' is defined but no program or
sayleen/Makefile.am:32: library has `OMIT' as canonic name (possible typo)
$ echo ${?}
0

色々メッセージが出ているがコマンドは成功し、該当ファイルも配置されたようなのでビルドを再試行する。しかし

$ LC_MESSAGES=C make
(中略)
make[2]: Entering directory `/tmp/work/sayleen-20021027/sayleen'
source='rcp_functions.c' object='rcp_functions.lo' libtool=yes \
        DEPDIR=.deps depmode=none /bin/sh ../depcomp \
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I./ -I../ -I../intl -DLOCALEDIR=\"/usr/local/share/locale\"    -g -O2 -c -o rcp_functions.lo rcp_functions.c
libtool: unrecognized option `--tag=CC'
Try `libtool --help' for more information.
make[2]: *** [rcp_functions.lo] Error 1
make[2]: Leaving directory `/tmp/work/sayleen-20021027/sayleen'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/work/sayleen-20021027'
make: *** [all] Error 2

このようなエラーが出てしまった。このエラーは試行錯誤の後

$ make LIBTOOL=/usr/bin/libtool

で回避できることが分かったが、それでは面倒な上に根本的解決にならないので、他の方法を色々試した。その結果

$ libtoolize --force

で先に進めるようになった。が、

$ ./configure --enable-sted-interface --enable-devrtc
$ LC_MESSAGES=C make
(中略)
make[2]: Leaving directory `/tmp/work/sayleen-20021027/sayleen'
Making all in po
make[2]: Entering directory `/tmp/work/sayleen-20021027/po'
make[2]: *** No rule to make target `@CATALOGS@', needed by `all-yes'.  Stop.
make[2]: Leaving directory `/tmp/work/sayleen-20021027/po'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/work/sayleen-20021027'
make: *** [all] Error 2

また見慣れない形のエラーが出た。
再び試行錯誤の末、今度は以下の内容を追加して
ファイル名: sayleen-20021027/configure.in

IT_PROG_INTLTOOL
GETTEXT_PACKAGE=sayleen
AC_SUBST(GETTEXT_PACKAGE)

その後、下のようにすることで解決した。

$ intltoolize --force
$ autoreconf

あとは普通にビルド・インストール作業が行える。
最初のconfigure.inの修正後に行う作業を自動化する(並べる)と

touch config.rpath
libtoolize --force
intltoolize --force
autoreconf --force --install --symlink

となる。
なお、automakelibtoolizeintltoolizeではシステム上のファイル(/usr/share/以下の各ファイル)に対するシンボリックリンク

config.guess -> /usr/share/libtool/config.guess
config.sub -> /usr/share/libtool/config.sub
depcomp -> /usr/share/automake-1.10/depcomp
ltmain.sh -> /usr/share/libtool/ltmain.sh
po/Makefile.in.in -> /usr/share/intltool/Makefile.in.in

のように作成しているが、3つのコマンド全てに対して、シンボリックリンクの代わりにファイルコピーを行う--copyオプションも存在し、不特定多数に公開(配布)するファイルに対して修正を行うような場合はこちらを使うことになる。autoreconfでは--symlinkオプションを付けないで実行すればOK。
また、この状態では、未使用のディレクトintlや、サイズが0の幾つかのファイルが残っていたりするが、ここではそのままにしている。

参考URL:

使用したバージョン:

  • autoconf 2.63-1mdv2009.0
  • automake 1.10.1-2mdv2009.0
  • libtool(libtool, libtool-base) 1.5.26-5.1mdv2009.0
  • intltool 0.40.4-2mdv2009.0