第80日目:【A-Tiger】FreeBSD 7.1Rで苦闘中・・・
|
どうも、('A`)です。
ちょっと朝から訳がわからない状態です。
「誰か助けて下さい〜!!!!」と言いたい気分です。
えーとエース( ,_ノ` )y━・~~~ から久々に「サーバ作って下さい」の指令を受けて
第78日目から作業を続けていました。前回T-BananaにFreeBSD 7.1Rをインストールして
Apache等のパッケージのインストール、カーネルの再構築、Worldの再構築もエラーも
発生せずに終わって、サーバができました。
でもね、、、、A-Tigerサーバで同じ方法を試してみると、何故かエラーとなります。
で、今どうしてエラーが起きるのかを調べています。
(手がかりが無いのが、正直なところ・・・まずは追記で書いた事から始めてみます。)
で、不思議なのが、T-Bananaサーバ(CPUがCORE2 E8500)だと同じ手順で問題が
起きていないのです。
エラーになっているのはA-tIGER(CPUがCORE2 Quad Q9550)だけなのです・・・
インストールする際にはソースコードベースでサーバ上で再コンパイルして
入れ込んでいます。
本当なら、今日あたりにお披露目したかったのですが、早くても今週いっぱい
かかるかもしれません。(それも自信がないです。)
root兄(・∀・)に急きょ「ゴメンネゴメンネ〜」と泣きついています。
エラーとなった箇所を4点報告しますね。でも他にもうまくいっていない処があるのかも。。。。
・buildwordldで途中でエラーとなる。
(詳細はこちらにまとめました。)
・PHPのインストールでエラーとなる。
(詳細はこちらにまとめました。)
・SpeedyCGIのインストールでエラーとなる。
(詳細はこちらにまとめました。)
・mod_perlのインストールでエラーとなる。
(詳細はこちらにまとめました。)
('A`)がA-Tigerを最初作っていた時も、カーネル再構築とかがうまくいかなくて、
入院した後でroot兄(・∀・)が代わってA-Tigerを作った時も、ハードウェアの問題
なのか、何度も試行錯誤してcsvupで最新ソースを取得してカーネルを作ったという
経緯がありました。その際にWorldも再構築してカーネルのコンパイルが通った、と。
でも、今回はそれに加えてソースコードをコンパイルしてインストールする箇所も
うまくいかなくなっているので、状況はさらに悪いです。
まあ、「初物」には付きものの事ですので、1つ1つ解決していきます。
エース( ,_ノ` )y━・~~~ 、ごめんね。もう少し待って・・・・
新しいサーバを作るのはちょっと時間が必要なのです。試行錯誤がなぜか起きるのです、
('A`)今までの経験則上から。
不思議なものです。
新しい「モノつくり」をしてみようか、と社内のみんな('A`)( `э´)(・∀・)( ,_ノ` )y━・~~~と
お話しています。
(たとえば、SASとかSSDとかCore i7とか試してみようよ〜と言ってます。)
こういう「ワイワイガヤガヤ」とお話している時が、きもち良いひと時です。
(まあ、実際に作り始めると、今回の様にちょっと大変なことになるのですが・・・)
皆さんにお話でき様な状況になりましたら、随時この日記でお話しようと思っています。
(まあ、('A`)は「みなさんからの声」って運用情報の「花子スレ」とか「特化型スレ」
を拝見して始めて知るという環境です。
日記という媒体の性格上、そうなっちゃうんですよね・・・)
何かお勧め情報とかあったら、スレで紹介して頂けると助かります。
さて、もう一度インストールがんばってみますね。
それでは、また。
[追記 16:10]
社内のみんなのアドバイスとか助けを借りて、これから以下の事を試してみます。
1) 4.3系のGCC(コンパイラ)をインストールしてから他のパッケージをインストールしてみる。
ちなみにデフォルトのGCCのバージョンは4.2.1でした。
tiger3528# gcc --version
gcc (GCC) 4.2.1 20070719 [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2) /etc/make.confでCPUTYPEを指定しない
今まではCPUTYPE=core2と書いていました。
ちょっとやってみますね。
これからの作業手順
1)GUIを使わないコマンドベースのcvsupをインストールする。
pkg_add http://banana244.maido3.com/~pkg/ports/amd64/packages-7.1-release/All/cvsup-without-gui-16.1h_4.tbz
rehash
2)以下の内容の設定ファイルを設置する。
cd /root
fetch http://banana244.maido3.com/~pkg/cvsup/FreeBSD7.1-standard-supfile.v1
#*default host=cvsup.jp.FreeBSD.org
*default host=cvsup4.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_7_1
*default delete use-rel-suffix
# If you seem to be limited by CPU rather than network or disk bandwidth, try
# commenting out the following line. (Normally, today's CPUs are fast enough
# that you want to run compression.)
*default compress
## Main Source Tree.
#
# The easiest way to get the main source tree is to use the "src-all"
# mega-collection. It includes all of the individual "src-*" collections.
src-all
3) 以下の内容のetc/make.confを作成する
CFLAGS= -O -fno-strict-aliasing -pipe
COPTFLAGS= -O -fno-strict-aliasing -pipe
4) cvsupを実行し、最新ソースを取ってくる。
cvsup -g -L2 /root/FreeBSD7.1-standard-supfile.v1
5) 以下の内容で/etc/sysctl.confを作成し、sysctlを再起動する。
echo "net.inet.tcp.rfc1323=0" >> /etc/sysctl.conf
echo "net.inet.tcp.sack.enable=0" >> /etc/sysctl.conf
6) カーネルコンフィグレーションファイルを設置する。
fetch -o /usr/src/sys/amd64/conf/TBANANA64711 http://banana244.maido3.com/~pkg/kernel/TBANANA64711
7) GCC4.3をpkg_addコマンドでインストールする。
pkg_add -r http://banana244.maido3.com/~pkg/ports/amd64/packages-7.1-release/Latest/gcc43.tbz
rehash
8) 前準備(/usr/objをディスク容量の広い処に作りこむ)
rmdir /usr/obj /usr/games
mkdir /home/service/obj
ln -s /home/service/obj /usr/obj
9) buildworld 再挑戦
cd /usr/src
make -j4 buildworld
|
[追記 17:35]
えーと、、、、作業中に('A`)「GCC入れ替えるの忘れたぁぁぁ!」と慌てたのですが、
そのまま実行したら、エラーもなくWorldの再構築とカーネルの再構築が
無事終わりました・・・・何なんだっ!!!!
で、うまくいかなかった時と何が違ったかというとCPUTYPEを何もしていしない
という事でした。
で、コンパイル時にCPUは何と認識されてるかなと作業ログを見て調べてみたら
cc -m32 -march=i686 -mmmx -msse -msse2 -mfancy-math-387 -DCOMPAT_32BIT -iprefix /usr/obj/usr/src/lib32/usr/ -L/usr/obj/usr/src/lib32/usr/lib32 -B/usr/obj/usr/src/lib32/usr/lib32 -fpic -DPIC -O -fno-strict-aliasing -pipe -DTERMIOS -DANSI_SOURCE -I/usr/src/secure/lib/libcrypto/../../../crypto/openssl -I/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto -I/home/service/obj/lib32/usr/src/secure/lib/libcrypto -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_IDEA -DL_ENDIAN -DNO_IDEA -std=gnu89 -c /usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/bn/bn_word.c -o bn_word.So
という風に「i686」とでます。
('A`)「Pentium4だって?大丈夫かなぁ?・・・」
root兄(・∀・)「まーまーまー、落ち着こう。カーネルもWorldも作り直せたんだから」
('A`)「でもなあ、何か腑に落ちないんだよなあ。make.confの記述ではamd64での
オプションの記述でCPUがINTELのCore2を使っていたら、CPUTYPE=Core2で
有効になるんだけどなあ・・・」
root兄(・∀・)「作り始めなんだから、一つ一つ進めていこう。
何かうまくいった事があるだけ、良かったと考えるべきだよ。」
('A`)「うーん。。。。」
|
さて、次はApacheとかのパッケージのインストールです。今度は1つづつ入れていきます。
あ、でも今日は時間切れになっちゃった('A`)・・・・
明日仕切り直しです。
では、また。
・buildwordldで途中でエラーとなる。
作業ログはこちら
→モジュールを生成するところで異常終了するけど、対象のモジュールはその都度異なる。
--------------------------------------------------
gzip -cn /usr/src/lib/bind/lwres/../../../contrib/bind9/lib/lwres/man/lwres_packet.3 > lwres_packet.3.gz
gzip -cn /usr/src/lib/bind/lwres/../../../contrib/bind9/lib/lwres/man/lwres_resutil.3 > lwres_resutil.3.gz
building static lwres library
building profiled lwres library
make: don't know how to make ../../lib/bind/lwres/liblwres.a. Stop
*** Error code 2
1 error
*** Error code 2
building shared library liblwres.so.30
ranlib liblwres.a
ranlib liblwres_p.a
1 error
*** Error code 2
1 error
*** Error code 2
1 error
--------------------------------------------------
・PHPのインストールでエラーとなる。
作業ログはこちら
→y.tab.c が無いよ、と言われて止まってしまう。。。
--------------------------------------------------
/tmp/php-5.2.5-for7.0/ext/pdo_sqlite/sqlite/src/vdbemem.c: In function 'sqlite3ValueText':
/tmp/php-5.2.5-for7.0/ext/pdo_sqlite/sqlite/src/vdbemem.c:764: warning: cast from pointer to integer of different size
/bin/sh /tmp/php-5.2.5-for7.0/libtool --silent --preserve-dup-deps --mode=compile gcc -I/tmp/php-5.2.5-for7.0/ext/pdo_sqlite/sqlite/src -DPDO_SQLITE_BUNDLED=1 -DSQLITE_OMIT_CURSOR -DTHREADSAFE=0 -I/tmp/php-5.2.5-for7.0/ext -Iext/pdo_sqlite/ -I/tmp/php-5.2.5-for7.0/ext/pdo_sqlite/ -DPHP_ATOM_INC -I/tmp/php-5.2.5-for7.0/include -I/tmp/php-5.2.5-for7.0/main -I/tmp/php-5.2.5-for7.0 -I/usr/local/include/libxml2 -I/usr/local/include -I/tmp/php-5.2.5-for7.0/ext/date/lib -I/usr/local/include/freetype2 -I/tmp/php-5.2.5-for7.0/ext/mbstring/oniguruma -I/tmp/php-5.2.5-for7.0/ext/mbstring/libmbfl -I/tmp/php-5.2.5-for7.0/ext/mbstring/libmbfl/mbfl -I/usr/local/include/mysql -I/tmp/php-5.2.5-for7.0/TSRM -I/tmp/php-5.2.5-for7.0/Zend -I/usr/local/include -g -O2 -c /tmp/php-5.2.5-for7.0/ext/pdo_sqlite/sqlite/src/where.c -o ext/pdo_sqlite/sqlite/src/where.lo
exit 0; -d /tmp/php-5.2.5-for7.0/ext/pdo_sqlite/sqlite/src/parse.y
mv y.tab.c /tmp/php-5.2.5-for7.0/ext/pdo_sqlite/sqlite/src/parse.c
mv: y.tab.c: No such file or directory
*** Error code 1
--------------------------------------------------
あ、インストールするコマンドの内容はここで見れます。
・SpeedyCGIのインストールでエラーとなる。
作業ログはこちら
→途中で入力要求が2回出て、パスを入力すると、止まってしまう。
--------------------------------------------------
Mod_speedycgi increases performance under Apache by avoiding the fork/exec
overhead associated with each request under normal SpeedyCGI. However, it
requires a working copy of "apxs" in your path, Apache with mod_so
support, and additional Apache configuration.
Compile mod_speedycgi (default no)? yes
Compiling for Apache version 2
Checking if your kit is complete...
Looks good
Writing Makefile for src
Writing Makefile for speedy_backend
Writing Makefile for speedy
Writing Makefile for mod_speedycgi2
Writing Makefile for CGI::SpeedyCGI
Makefile out-of-date with respect to /usr/local/lib/perl5/5.8.8/mach/Config.pm /usr/local/lib/perl5/5.8.8/mach/CORE/config.h
Cleaning current config before rebuilding Makefile...
make -f Makefile.old clean > /dev/null 2>&1
/usr/bin/perl Makefile.PL
Optional mod_speedycgi support.
Mod_speedycgi increases performance under Apache by avoiding the fork/exec
overhead associated with each request under normal SpeedyCGI. However, it
requires a working copy of "apxs" in your path, Apache with mod_so
support, and additional Apache configuration.
Compile mod_speedycgi (default no)? yes
Compiling for Apache version 2
Checking if your kit is complete...
Looks good
Writing Makefile for src
Writing Makefile for speedy_backend
Writing Makefile for speedy
Writing Makefile for mod_speedycgi2
Writing Makefile for CGI::SpeedyCGI
==> Your Makefile has been rebuilt. <==
==> Please rerun the make command. <==
false
*** Error code 1
--------------------------------------------------
インストールする時に以下のコマンドを実行しています。
perl Makefile.PL
make install
で、Makefile.PLの内容はここで見れます。
・mod_perlのインストールでエラーとなる。
作業ログはこちら
→apxsのパスが見つからないようで、パスを入力するとエラーとなる。
--------------------------------------------------
Please provide a full path to 'apxs' executable
(press Enter if you don't have it installed): /usr/local/apache2/bin/apxs
Configuring Apache/2.2.10 mod_perl/2.0.3 Perl/v5.8.8
Checking if your kit is complete...
Looks good
[ info] generating script t/TEST
[ info] generating script ./t/cgi-bin/cookies.pl
[ info] generating script ./t/cgi-bin/next_available_port.pl
Writing Makefile for Apache::Test
Checking for File::Spec...ok
Checking for Cwd...ok
[ info] generating script t/TEST
Checking if your kit is complete...
Looks good
Writing Makefile for ModPerl::Registry
Writing Makefile for APR::Base64
Writing Makefile for APR::Brigade
Writing Makefile for APR::Bucket
Writing Makefile for APR::BucketAlloc
Writing Makefile for APR::BucketType
Writing Makefile for APR::Date
Writing Makefile for APR::Error
Writing Makefile for APR::Finfo
Writing Makefile for APR::IpSubnet
Writing Makefile for APR::OS
Writing Makefile for APR::Pool
Writing Makefile for APR::SockAddr
Writing Makefile for APR::Socket
Writing Makefile for APR::Status
Writing Makefile for APR::String
Writing Makefile for APR::Table
Writing Makefile for APR::ThreadMutex
Writing Makefile for APR::URI
Writing Makefile for APR::UUID
Writing Makefile for APR::Util
Writing Makefile for APR
Writing Makefile for Apache2::Access
Writing Makefile for Apache2::CmdParms
Writing Makefile for Apache2::Command
Writing Makefile for Apache2::Connection
Writing Makefile for Apache2::ConnectionUtil
Writing Makefile for Apache2::Directive
Writing Makefile for Apache2::Filter
Writing Makefile for Apache2::FilterRec
Writing Makefile for Apache2::HookRun
Writing Makefile for Apache2::Log
Writing Makefile for Apache2::MPM
Writing Makefile for Apache2::Module
Writing Makefile for Apache2::Process
Writing Makefile for Apache2::RequestIO
Writing Makefile for Apache2::RequestRec
Writing Makefile for Apache2::RequestUtil
Writing Makefile for Apache2::Response
Writing Makefile for Apache2::ServerRec
Writing Makefile for Apache2::ServerUtil
Writing Makefile for Apache2::SubProcess
Writing Makefile for Apache2::SubRequest
Writing Makefile for Apache2::URI
Writing Makefile for Apache2::Util
Writing Makefile for Apache2
Writing Makefile for ModPerl::Global
Writing Makefile for ModPerl::Util
Writing Makefile for ModPerl
Writing Makefile for ModPerl::WrapXS
Writing Makefile for APR
Writing Makefile for APR::Const
Writing Makefile for APR::PerlIO
Writing Makefile for libaprext
Writing Makefile for APR_build
Writing Makefile for Apache2::Const
Writing Makefile for Apache2_build
Writing Makefile for ModPerl::Const
Writing Makefile for ModPerl
Writing Makefile for ModPerl::XS
Writing Makefile for mod_perl2
[warning] mod_perl dso library will be built as mod_perl.so
[warning] You'll need to add the following to httpd.conf:
[warning]
[warning] LoadModule perl_module modules/mod_perl.so
[warning]
[warning] depending on your build, mod_perl might not live in
[warning] the modules/ directory.
[warning] Check the results of
[warning]
[warning] $ /usr/local/apache2/bin/apxs -q LIBEXECDIR
[warning]
[warning] and adjust the LoadModule directive accordingly.
==> Your Makefile has been rebuilt. <==
==> Please rerun the make command. <==
false
*** Error code 1
--------------------------------------------------
インストールする時に以下のコマンドを実行しています。
perl Makefile.PL MP_APXS=/usr/local/sbin/apxs MP_USE_DSO=1
make install
で、Makefile.PLの内容はここで見れます。
|
|
|
|
|