Solaris10のgcc
Solaris10でコンテナを作成して、Apacheをコンパイル、リンクしていたらこんなエラー。
===> src/os/unix gcc -c -I../../os/unix -I../../include -DSOLARIS2=2100 -DUSE_HSREGEX -DUSE_EXPAT -I../../lib/expat-lite -DNO_DL_NEEDED `../../apaci` os.c In file included from /usr/include/sys/wait.h:24, from ../../include/ap_config.h:1080, from os.c:22: /usr/include/sys/siginfo.h:259: error: parse error before "ctid_t" /usr/include/sys/siginfo.h:292: error: parse error before '}' token /usr/include/sys/siginfo.h:294: error: parse error before '}' token /usr/include/sys/siginfo.h:390: error: parse error before "ctid_t" /usr/include/sys/siginfo.h:392: error: conflicting types for `__proc' /usr/include/sys/siginfo.h:261: error: previous declaration of `__proc' /usr/include/sys/siginfo.h:398: error: conflicting types for `__fault' /usr/include/sys/siginfo.h:267: error: previous declaration of `__fault' /usr/include/sys/siginfo.h:404: error: conflicting types for `__file' /usr/include/sys/siginfo.h:273: error: previous declaration of `__file' /usr/include/sys/siginfo.h:420: error: conflicting types for `__prof' /usr/include/sys/siginfo.h:287: error: previous declaration of `__prof' /usr/include/sys/siginfo.h:424: error: conflicting types for `__rctl' /usr/include/sys/siginfo.h:291: error: previous declaration of `__rctl' /usr/include/sys/siginfo.h:426: error: parse error before '}' token /usr/include/sys/siginfo.h:428: error: parse error before '}' token /usr/include/sys/siginfo.h:432: error: parse error before "k_siginfo_t" /usr/include/sys/siginfo.h:437: error: parse error before '}' token In file included from /usr/include/sys/procset.h:24, from /usr/include/sys/wait.h:25, from ../../include/ap_config.h:1080, from os.c:22: /usr/include/sys/signal.h:85: error: parse error before "siginfo_t" In file included from ../../include/ap_config.h:1080, from os.c:22: /usr/include/sys/wait.h:86: error: parse error before "siginfo_t" In file included from ../../include/ap_config.h:1097, from os.c:22: /usr/include/signal.h:111: error: parse error before "siginfo_t" /usr/include/signal.h:113: error: parse error before "siginfo_t" make[3]: *** [os.o] Error 1 make[2]: *** [subdirs] Error 1 make[2]: Leaving directory `/export/home/hoge/apache/apache_1.3.41/src' make[1]: *** [build-std] Error 2 make[1]: Leaving directory `/export/home/hoge/apache/apache_1.3.41' make: *** [build] Error 2
なんだかヘッダファイルがおかしいような。
ここで使われているgccはhttp://www.sunfreeware.comから取ってきてpkgaddしたもの。そこにこんな情報がありました。
Note that this version of gcc was created on build 60 of Solaris 10. If you are using a higher version, you will need to redo some of the header files. This is done by doing the following steps: cd /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/install-tools/ Put the line SHELL=/bin/sh on the first line of the mkheaders.conf file. Then run ./mkheaders This will correct some files and make the build 60 gcc usable on higher builds. I have tested this on build 72 and it works fine.
/usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/install-tools/mkheaders.confの一行目に
SHELL=/bin/sh
を追加して、/usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/install-tools/mkheadersを実行すればいい模様。
面倒な。gccの新しいバージョンをインストールしてやる(そっちの方が面倒)。