PSPP-Perl-Moduleを使いたいのですが、思ったより難しそうです。モジュールのどのバージョンを使用しても問題ありませんが、すべてのマシンでビルドする必要があるように思われるため (間違っている場合は修正してください)、Ubuntu LTS バージョンを使用します。
pspp-0.7.9+git20120319 は、Ubuntu LTS 12.04 の PSPP バージョンです。
最初の試行: CPAN のインストール
cpan PSPP:Sysfile
かなり古いバージョンをビルドします
CPAN.pm: Going to build P/PD/PDONELAN/PSPP-Perl-0.7.2.20090730.tar.gz
そして、現時点では持っていない構成済みのソース ディレクトリを要求します。
Enter the location of the build directory of the configured pspp source: []
2 回目の試行: apt-get source -b
cd ~
apt-get build-dep pspp
apt-get source -b pspp
0.7.9+git20120319 のソースを現在のディレクトリにダウンロードしてビルドします。ビルドはかなり長い間機能しているように見えますが、テスト フェーズでエラーが発生して終了します。
...
| configure:43806: $? = 0
| configure:43806: gcc -std=gnu99 -c -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Wdeclaration-after-statement -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pango-1.0 conftest.c >&5
| conftest.c: In function 'main':
| conftest.c:444:22: error: expected expression before ')' token
| configure:43806: $? = 1
| configure: failed program was:
| | /* confdefs.h */
...
| This file was extended by GNU PSPP config.status 0.7.9, which was
| generated by GNU Autoconf 2.68. Invocation command line was
|
| CONFIG_FILES =
| CONFIG_HEADERS =
| CONFIG_LINKS =
| CONFIG_COMMANDS =
| $ ./config.status config.h
|
| on agnes
|
| config.status:2635: creating config.h
make[1]: *** [override_dh_auto_test] Fehler 1
make[1]: Verlasse Verzeichnis '/root/pspp-0.7.9+git20120319'
make: *** [build] Fehler 2
dpkg-buildpackage: Fehler: Fehler-Exitstatus von debian/rules build war 2
Build-Befehl »cd pspp-0.7.9+git20120319 && dpkg-buildpackage -b -uc« fehlgeschlagen.
E: Kindprozess fehlgeschlagen
PSPP ユーザーのメーリングリストでは、今年 1 月に Perl モジュールの構築に関するいくつかの問題が議論されました。
Basically you are right, you will need to compile PSPP first, but you don't need
to install it. At a risk of contradicting that sentence, you should follow the
instructions in the file called INSTALL. However, to save yourself a bit of
time and from having to install lots of things you won't need, you can pass
various --without-* flags to configure, thus:
./configure --without-gui --without-cairo --without-libncurses
make
cd perl-module
make install
だから私の未完成のビルドで、私は perl-module ディレクトリに入りました
cd pspp-0.7.9+git20120319/perl-module
make install
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/lib/perl/5.14.2/auto/PSPP/PSPP.so
Installing /usr/lib/perl/5.14.2/auto/PSPP/PSPP.bs
Installing /usr/lib/perl/5.14.2/PSPP.pm
Installing /usr/man/man3/PSPP.3pm
Installing /usr/man/man3/PSPP::Examples.3pm
Appending installation info to /usr/lib/perl/5.14.2/perllocal.pod
簡単に言えば、perl-module を使用してもまだ成功していません。
#!/usr/bin/perl
use PSPP;
Can't load '/usr/local/lib/perl/5.14.2/auto/PSPP/PSPP.so' for module PSPP: libpspp-core-0.7.9.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden at /usr/share/perl/5.14/XSLoader.pm line 71.
at /usr/local/lib/perl/5.14.2/PSPP.pm line 26
BEGIN failed--compilation aborted at /usr/local/lib/perl/5.14.2/PSPP.pm line 27.
Compilation failed in require at ./test2.pl line 2.
BEGIN failed--compilation aborted at ./test2.pl line 2.
:-(
問題のファイルPSPP.soが存在します。
ls /usr/local/lib/perl/5.14.2/auto/PSPP
libpspp-0.7.9.so libpspp-core-0.7.9.so libpspp-core.so libpspp.so PSPP.bs PSPP.so
これは私が立ち往生しているところです。あらゆるアプローチに関するヒントは大歓迎です。私の理解では、CPAN にはアップロードされた PSPP モジュールの古いバージョン 0.7.2 がありますが、PSPP モジュールは実際にはメインの PSPP ソースの一部です。モジュールがapt-get install pspp の一部としてマシンによって自動的にインストールされないのはなぜですか。それは...ですか?私は愚かすぎてそれを見つけたり使用したりできませんか?
よろしくお願いします、スティーブ