Problem with Apache 2.2.6
apache 2.2.6 で autoconf 化した apache module のビルドが出来ない問題について。
再現方法
% apxs -g -n hello
というように作成した apache module mod_hello を
http://threebit.net/tutorials/apache2_modules/tut1/tutorial1.html
の手順に従って autoconf 化する。
% ./configure –with-apache=/usr/local/httpd-2.2.6
% make
/bin/sh ./libtool –tag=CC –mode=compile gcc -DPACKAGE_NAME=\”\” -DPACKAGE_TARNAME=\”\” -DPACKAGE_VERSION=\”\” -DPACKAGE_STRING=\”\” -DPACKAGE_BUGREPORT=\”\” -DPACKAGE=\”mod_hello\” -DVERSION=\”1.0\” -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I/usr/local/httpd-2.2.6/include -g -O2 -MT mod_hello.lo -MD -MP -MF .deps/mod_hello.Tpo -c -o mod_hello.lo mod_hello.c
gcc -DPACKAGE_NAME=\”\” -DPACKAGE_TARNAME=\”\” -DPACKAGE_VERSION=\”\” -DPACKAGE_STRING=\”\” -DPACKAGE_BUGREPORT=\”\” -DPACKAGE=\”mod_hello\” -DVERSION=\”1.0\” -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I/usr/local/httpd-2.2.6/include -g -O2 -MT mod_hello.lo -MD -MP -MF .deps/mod_hello.Tpo -c mod_hello.c -fPIC -DPIC -o .libs/mod_hello.o
In file included from /usr/local/httpd-2.2.6/include/ap_config.h:25,
from /usr/local/httpd-2.2.6/include/httpd.h:43,
from mod_hello.c:40:
/usr/local/httpd-2.2.6/include/apr.h:273: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘apr_off_t’
In file included from /usr/local/httpd-2.2.6/include/apr_file_io.h:29,
from /usr/local/httpd-2.2.6/include/apr_network_io.h:26,
from /usr/local/httpd-2.2.6/include/httpd.h:53,
from mod_hello.c:40:
/usr/local/httpd-2.2.6/include/apr_file_info.h:204: error: expected specifier-qualifier-list before ‘apr_off_t’
In file included from /usr/local/httpd-2.2.6/include/apr_network_io.h:26,
from /usr/local/httpd-2.2.6/include/httpd.h:53,
from mod_hello.c:40:
/usr/local/httpd-2.2.6/include/apr_file_io.h:551: error: expected declaration specifiers or ‘…’ before ‘apr_off_t’
/usr/local/httpd-2.2.6/include/apr_file_io.h:747: error: expected declaration specifiers or ‘…’ before ‘apr_off_t’
In file included from /usr/local/httpd-2.2.6/include/httpd.h:53,
from mod_hello.c:40:
/usr/local/httpd-2.2.6/include/apr_network_io.h:545: error: expected declaration specifiers or ‘…’ before ‘apr_off_t’
In file included from /usr/local/httpd-2.2.6/include/apr_buckets.h:32,
from /usr/local/httpd-2.2.6/include/httpd.h:54,
from mod_hello.c:40:
/usr/local/httpd-2.2.6/include/apr_mmap.h:134: error: expected declaration specifiers or ‘…’ before ‘apr_off_t’
/usr/local/httpd-2.2.6/include/apr_mmap.h:161: error: expected declaration specifiers or ‘…’ before ‘apr_off_t’
In file included from /usr/local/httpd-2.2.6/include/httpd.h:54,
(略)
同様の問題が、
http://www2.ecos.de/~mailarc/embperl/2007-09/msg00007.html
に報告されているが、お前のシステムに off64_t が定義されていないからだという指摘で議論は止まっている。そんな訳ない、off64_t は定義されているし apache 2.0.61 ではなんの問題もなくコンパイル出来る。
恐らく apache 2.2.6 に何らかの問題があるので原因を追っかけたいのだけど、今日はもう眠くて眠くてもうダメだ。
Permanent Link: http://www.cuspy.org/blog/archives/533
Trackback URL: http://www.cuspy.org/blog/archives/533/trackback