perlを使用してSIGARAPIを実行する方法に関する情報や指示を探しています。Makefile.PLが配置されているバインディングディレクトリを調べてmakefileを作成し、makeコマンドを実行しました。問題はありませんでしたが、どの例も実行できません。また、「exmaples」ディレクトリにリストされているサンプルプログラムを実行したときに発生するエラーを貼り付けました。足りないものがあれば教えてください。
[oracle@mercury perl]$ perl Makefile.PL
Sigar_generated.xs needs update
generating Sigar_generated.xs
Warning: -L../../sigar-bin/lib changed to -L/u01/test/hyperic-sigar-1.6.4/bindings/perl/../../sigar-bin/lib
Writing Makefile for Sigar
[oracle@mercury perl]$ make
cp Sigar.pm blib/lib/Sigar.pm
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap Sigar.xs > Sigar.xsc && mv Sigar.xsc Sigar.c
gcc -c -I../../sigar-bin/include -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/l ocal/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexcep tions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fPIC "-I/usr /lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE" -Wall -Werror Sigar.c
Running Mkbootstrap for Sigar ()
chmod 644 Sigar.bs
rm -f blib/arch/auto/Sigar/Sigar.so
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=g eneric Sigar.o -o blib/arch/auto/Sigar/Sigar.so \
-L/u01/test/hyperic-sigar-1.6.4/bindings/perl/../../sigar-bin/lib -lsigar-amd64-linux \
chmod 755 blib/arch/auto/Sigar/Sigar.so
cp Sigar.bs blib/arch/auto/Sigar/Sigar.bs
chmod 644 blib/arch/auto/Sigar/Sigar.bs
[oracle@mercury perl]$ cd examples
[oracle@mercury examples]$ ls
cpu_info.pl df.pl free.pl ifconfig.pl
[oracle@mercury examples]$ perl free.pl
Can't locate Sigar.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib64/perl5/site _perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5. 8.5/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /us r/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib64/p erl5/vendor_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64/perl5 /vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/ vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at free.pl line 19.
BEGIN failed--compilation aborted at free.pl line 19.
インストールとテストを実行しました
[root@mercury perl]# make install
Installing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Sigar/Sigar.so
Installing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Sigar/Sigar.bs
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Sigar.pm
Writing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Sigar/.packlist
Appending installation info to /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod
[root@mercury perl]# make test
No tests defined for Sigar extension.
[root@mercury perl]# cd examples
[root@mercury examples]# ls
cpu_info.pl df.pl free.pl ifconfig.pl
[root@mercury examples]# perl ifconfig.pl
Can't load '/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Sigar/Sigar.so' for module Sigar: libsigar-amd64-linux.so: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/XSLoader.pm line 70.
at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Sigar.pm line 36
Compilation failed in require at ifconfig.pl line 19.
BEGIN failed--compilation aborted at ifconfig.pl line 19.