どうも、('A`)です。
えーと、早速ですが、昨日の日記をアップした後で、スレの方で助言を頂きまして・・・
結論から言うと、コンパイルというかmakeまではできました。
('A`)の勉強不足で「FreeBSDで用意されているmakeとGNUで使われているmakeは違う」と
いう事を昨日初めて知ったのでした・・・・(汗
で、gmakeをサーバにインストールして、以下の様に実行してみました。
w44# pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-stable/All/gmake-3.81_3.tbz
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-stable/All/gmake-3.81_3.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-stable/All/libiconv-1.13.1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-stable/All/gettext-0.17_1.tbz... Done.
w44# rehash
w44# which gmake
/usr/local/bin/gmake
w44# rehash
w44# cd /tmp/unixbench-5.1.2
w44# gmake
Checking distribution of files
./pgms exists
./src exists
./testdir exists
./tmp exists
./results exists
gcc -o ./pgms/arithoh -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall -Darithoh ./src/arith.c
gcc -o ./pgms/register -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall -Ddatum='register int' ./src/arith.c
gcc -o ./pgms/short -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall -Ddatum=short ./src/arith.c
gcc -o ./pgms/int -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall -Ddatum=int ./src/arith.c
gcc -o ./pgms/long -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall -Ddatum=long ./src/arith.c
gcc -o ./pgms/float -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall -Ddatum=float ./src/arith.c
gcc -o ./pgms/double -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall -Ddatum=double ./src/arith.c
gcc -o ./pgms/hanoi -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall ./src/hanoi.c
gcc -o ./pgms/syscall -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall ./src/syscall.c
gcc -o ./pgms/context1 -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall ./src/context1.c
gcc -o ./pgms/pipe -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall ./src/pipe.c
gcc -o ./pgms/spawn -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall ./src/spawn.c
gcc -o ./pgms/execl -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall ./src/execl.c
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DHZ= -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall dhry_1.c
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DHZ= -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall dhry_2.c
gcc -o ./pgms/dhry2 -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall ./src/dhry_1.o ./src/dhry_2.o
cd ./src; rm -f dhry_1.o dhry_2.o
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DREG=register -DHZ= -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall dhry_1.c
cd ./src; gcc -c -DTIME -Wall -pedantic -ansi -DREG=register -DHZ= -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall dhry_2.c
gcc -o ./pgms/dhry2reg -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall ./src/dhry_1.o ./src/dhry_2.o
cd ./src; rm -f dhry_1.o dhry_2.o
gcc -o ./pgms/looper -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall ./src/looper.c
gcc -o ./pgms/fstime -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall ./src/fstime.c
gcc -o ./pgms/whetstone-double -DTIME -Wall -pedantic -ansi -O2 -fomit-frame-pointer
-fforce-addr -ffast-math -Wall -DDP -DUNIX -DUNIXBENCH ./src/whets.c -lm
w44# ls -l
total 130
-rw-r--r-- 1 1000 100 9461 Oct 13 04:23 Makefile
-rw-r--r-- 1 root 100 9459 Oct 13 04:23 Makefile_org
-rw-r--r-- 1 1000 100 17508 Dec 26 2007 README
-rwxr-xr-x 1 1000 100 57744 Dec 22 2007 Run
-rw-r--r-- 1 1000 100 17890 Oct 15 2007 USAGE
-rw-r--r-- 1 1000 100 4622 Oct 4 2007 WRITING_TESTS
drwxr-xr-x 2 1000 100 512 Oct 13 09:21 pgms
drwxr-xr-x 2 1000 100 512 Dec 26 2007 results
drwxr-xr-x 2 1000 100 512 Oct 13 09:21 src
drwxr-xr-x 2 1000 100 512 Dec 25 2007 testdir
drwxr-xr-x 2 1000 100 512 Dec 26 2007 tmp
w44#
とまあ、ここまでは良かったのですが・・・・
いざ実行しようとすると、エラーになってしまいます。トホホ・・・
w44# gmake run
sh ./Run
use: not found
./Run: 5: Syntax error: "(" unexpected
gmake: *** [run] Error 2
w44#
えーと、makeでもって作られたスクリプト(Run)はこんな内容のPerlでした。
で、Makefileの一番最後の処に動かす為の記述がありました。
で、もしかしてPerlモジュールが入っていないからなのかなあ、と思って、本意ではなかったのですが
CPANでstrictと、Time::HiResとIO::Handleをインストールしました。
cpan[1]> install strict;
CPAN: Storable loaded ok (v2.19)
LWP not available
LWP not available
CPAN: Net::FTP loaded ok (v2.77)
Fetching with Net::FTP:
ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
............................................................................DONE
LWP not available
LWP not available
Fetching with Net::FTP:
ftp://ftp.perl.org/pub/CPAN/modules/02packages.details.txt.gz
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
Database was generated on Mon, 12 Oct 2009 23:27:04 GMT
HTTP::Date not available
...............
New CPAN.pm version (v1.9402) available.
[Currently running version is v1.9301]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
.............................................................DONE
LWP not available
LWP not available
Fetching with Net::FTP:
ftp://ftp.perl.org/pub/CPAN/modules/03modlist.data.gz
Going to read /root/.cpan/sources/modules/03modlist.data.gz
............................................................................DONE
Going to write /root/.cpan/Metadata
Warning: Cannot install strict;, don't know what it is.
Try the command
i /strict;/
to find objects with matching identifiers.
cpan[2]> install IO::Handle;
Warning: Cannot install IO::Handle;, don't know what it is.
Try the command
i /IO::Handle;/
to find objects with matching identifiers.
cpan[3]> install Time::HiRes;
Warning: Cannot install Time::HiRes;, don't know what it is.
Try the command
i /Time::HiRes;/
to find objects with matching identifiers.
cpan[4]> exit
Terminal does not support GetHistory.
Lockfile removed.
w44#
それでも同じエラーメッセージが出て止まってしまいます。
うーん、うーん。
もう少し格闘してみますが、もし皆さんの方で、こんなベンチマークツールを使ったら、と
いうのがありましたら、教えて下さい。。。。
それではまた。
|