LIBSVM のインストールで ld: fatal: file /opt/sunstudio12.1/prod/lib/crti.o: section [9].rela.annotate has invalid type [ SHT_RELA ]

LIBSVM

からダウンロードしてきて,

% tar zxvf libsvm-2.9.tar.gz
% cd libsvm/python
% python setup.py install

したら,

% python setup.py install
running install
running build
running build_py
creating build
creating build/lib.solaris-2.11-i86pc-2.6
copying svm.py -> build/lib.solaris-2.11-i86pc-2.6
running build_ext
building 'svmc' extension
creating build/temp.solaris-2.11-i86pc-2.6
/usr/lib/python2.6/pycc -DNDEBUG -I/home/sotarok/include/python2.6 -c ../svm.cpp -o build/temp.solaris-2.11-i86pc-2.6/../svm.o -O3 -I../
/usr/lib/python2.6/pycc -DNDEBUG -I/home/sotarok/include/python2.6 -c svmc_wrap.c -o build/temp.solaris-2.11-i86pc-2.6/svmc_wrap.o -O3 -I../
/usr/lib/python2.6/pyCC -G build/temp.solaris-2.11-i86pc-2.6/../svm.o build/temp.solaris-2.11-i86pc-2.6/svmc_wrap.o -lpython2.6 -o build/lib.solaris-2.11-i86pc-2.6/svmc.so
CC: Warning: Option -shared passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -fPIC passed to ld, if ld is invoked, ignored otherwise
CC: Fatal error in ld: Segmentation Fault (core dumped)
ld: fatal: file /opt/sunstudio12.1/prod/lib/crti.o: section [9].rela.annotate has invalid type [ SHT_RELA ]
error: command '/usr/lib/python2.6/pyCC' failed with exit status 1

ぐぐったら以下の情報がでてきた.

32bit でしかビルドできないものをインストールしようとしたときにでるくさい?

% LD_NOEXEC_64=1 python setup.py install

でいけた.

で,

% python svm_test.py

したら,エラー出た.

なんかだめっぽだった.README見てもっかいやりなおし.
includedirをちゃんと設定しないとだめだったみたい.

% make PYTHON_INCLUDEDIR=~/include/python2.6 all
% python setup.py install

これでどうやらいけたみたい.

% python svm_test.py

すると,なんかズラッと出てくる.