×

[PR]この広告は3ヶ月以上更新がないため表示されています。
ホームページを更新後24時間以内に表示されなくなります。



CentOS5.2 でPyanaを使用する(作戦失敗)



Windows版のPyanaは試してみましたが、
CentOS5.2で動くか試してみました。

まずはモジュールのダウンロードとインストール


#wget http://downloads.sourceforge.net/pyana/Pyana-0.9.2.tar.gz
#tar zxvf Pyana-0.9.2.tar.gz
#cd Pyana-0.9.2
#python setup.py install


すると・・・


python setup.py install
Checking for "XERCESCROOT" environment variable... not found
Checking for '../xml-xerces/c'... not found
Checking for '../xml-xerces'... not found
Assuming Xerces include/library paths available from environment
Checking for "XALANCROOT" environment variable... not found
Checking for '../xml-xalan/c'... not found
Assuming Xalan include/library paths available from environment
running install
running build
running build_py
running build_ext
building '_Pyana' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DLINUX -DXERCES_VERSION="2_5" -DXALAN_VERSION="1_8" -I/usr/local/include/python2.5 -c Src/Boolean.cpp -o build/temp.linux-i686-2.5/Src/Boolean.o
gcc: error trying to exec 'cc1plus': execvp: そのようなファイルやディレクトリはありません
error: command 'gcc' failed with exit status 1



execvpのエラーに対応するには、ここを参考にC++が必用であることが判明
http://fun.poosan.net/sawa/index.php?UID=1174765949


早速インストール


#yum install gcc-c++



また、

Checking for "XERCESCROOT" environment variable... not found
Checking for "XALANCROOT" environment variable... not found


の表示から、xerces-cとXalan-Cが必用ですので
http://d.hatena.ne.jp/n9d/20080819/1219110620
ここを参考にインストールしました。



#cd /usr/local/src/
#wget http://ftp.riken.jp/net/apache/xml/xerces-c/xerces-c-current.tar.gz
#wget http://www.meisei-u.ac.jp/mirror/apache/dist/xml/xalan-c/Xalan-C_current-src.tar.gz

tar xzpf xerces-c-current.tar.gz
cd xerces-c-src_2_7_0/src/xerces
export XERCESCROOT=/usr/local/src/xerces-c-src_2_7_0
./runConfigure -plinux -cgcc -xg++ -minmem -nsocket -tnative -rpthread
make
make install


tar xzpf Xalan-C_current-src.tar.gz
cd xml-xalan/c
export XALANCROOT=/usr/local/src/xml-xalan/c
./runConfigure -p linux -c gcc -x g++
make
make install


※Pyanaのreadmeを読んだら、xerces-cとXalan-Cがいるってちゃんと書いてありました。
readmeは読まないとだめですね・・・


これでよしと思い、Pyanaをビルドしたのですが・・・


Checking for "XERCESCROOT" environment variable... not found
Checking for '../xml-xerces/c'... not found
Checking for '../xml-xerces'... not found
Assuming Xerces include/library paths available from environment
Checking for "XALANCROOT" environment variable... not found
Checking for '../xml-xalan/c'... found
Checking for Xalan include path as '../xml-xalan/c/include'... not found
Checking for Xalan include path as '../xml-xalan/c/src'... found
Checking for Xalan library path as '../xml-xalan/c/lib'... found
running build
running build_py
creating build
creating build/lib.linux-i686-2.5
creating build/lib.linux-i686-2.5/Pyana
copying Pyana/__init__.py -> build/lib.linux-i686-2.5/Pyana
running build_ext
building '_Pyana' extension
creating build/temp.linux-i686-2.5
creating build/temp.linux-i686-2.5/Src
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DLINUX -DXERCES_VERSION="2_5" -DXALAN_VERSION="1_8" -I../xml-xalan/c/src -I/usr/local/include/python2.5 -c Src/Boolean.cpp -o build/temp.linux-i686-2.5/Src/Boolean.o
cc1plus: 警告: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
Src/Boolean.hpp:8 から include されたファイル中,
Src/Boolean.cpp:5 から:
Src/PyanaDefs.hpp:26:29: 警告: ファイル末尾に改行がありません
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DLINUX -DXERCES_VERSION="2_5" -DXALAN_VERSION="1_8" -I../xml-xalan/c/src -I/usr/local/include/python2.5 -c Src/DocStrings.cpp -o build/temp.linux-i686-2.5/Src/DocStrings.o
cc1plus: 警告: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
Src/DocStrings.hpp:8 から include されたファイル中,
Src/DocStrings.cpp:5 から:
Src/PyanaDefs.hpp:26:29: 警告: ファイル末尾に改行がありません
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DLINUX -DXERCES_VERSION="2_5" -DXALAN_VERSION="1_8" -I../xml-xalan/c/src -I/usr/local/include/python2.5 -c Src/ElemTemplateElement2PyObject.cpp -o build/temp.linux-i686-2.5/Src/ElemTemplateElement2PyObject.o
cc1plus: 警告: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
Src/ElemTemplateElement2PyObject.hpp:9 から include されたファイル中,
Src/ElemTemplateElement2PyObject.cpp:5 から:
Src/PyanaDefs.hpp:26:29: 警告: ファイル末尾に改行がありません
Src/ElemTemplateElement2PyObject.hpp:17 から include されたファイル中,
Src/ElemTemplateElement2PyObject.cpp:5 から:
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:45:29: error: LocalMsgIndex.hpp: そのようなファイルやディレクトリはありません
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:921: error: ‘XalanMessages’ has not been declared
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:921: error: expected ‘,’ or ‘...’ before ‘theCode’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:935: error: ‘XalanMessages’ has not been declared
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:935: error: expected ‘,’ or ‘...’ before ‘theCode’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:936: error: ‘void xalanc_1_10::ElemTemplateElement::error(xalanc_1_10::StylesheetExecutionContext&, int) const’ cannot be overloaded
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:921: error: with ‘void xalanc_1_10::ElemTemplateElement::error(xalanc_1_10::StylesheetExecutionContext&, int) const’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:950: error: ‘XalanMessages’ has not been declared
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:950: error: expected ‘,’ or ‘...’ before ‘theCode’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:951: error: ‘void xalanc_1_10::ElemTemplateElement::error(xalanc_1_10::StylesheetExecutionContext&, int) const’ cannot be overloaded
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:921: error: with ‘void xalanc_1_10::ElemTemplateElement::error(xalanc_1_10::StylesheetExecutionContext&, int) const’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:964: error: ‘XalanMessages’ has not been declared
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:964: error: expected ‘,’ or ‘...’ before ‘theCode’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:978: error: ‘XalanMessages’ has not been declared
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:978: error: expected ‘,’ or ‘...’ before ‘theCode’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:979: error: ‘void xalanc_1_10::ElemTemplateElement::warn(xalanc_1_10::StylesheetExecutionContext&, int) const’ cannot be overloaded
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:964: error: with ‘void xalanc_1_10::ElemTemplateElement::warn(xalanc_1_10::StylesheetExecutionContext&, int) const’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:993: error: ‘XalanMessages’ has not been declared
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:993: error: expected ‘,’ or ‘...’ before ‘theCode’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:994: error: ‘void xalanc_1_10::ElemTemplateElement::warn(xalanc_1_10::StylesheetExecutionContext&, int) const’ cannot be overloaded
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:964: error: with ‘void xalanc_1_10::ElemTemplateElement::warn(xalanc_1_10::StylesheetExecutionContext&, int) const’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1007: error: ‘XalanMessages’ has not been declared
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1007: error: expected ‘,’ or ‘...’ before ‘theCode’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1022: error: ‘XalanMessages’ has not been declared
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1022: error: expected ‘,’ or ‘...’ before ‘theCode’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1023: error: ‘void xalanc_1_10::ElemTemplateElement::error(xalanc_1_10::StylesheetConstructionContext&, int)’ cannot be overloaded
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1007: error: with ‘void xalanc_1_10::ElemTemplateElement::error(xalanc_1_10::StylesheetConstructionContext&, int)’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1038: error: ‘XalanMessages’ has not been declared
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1038: error: expected ‘,’ or ‘...’ before ‘theCode’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1040: error: ‘void xalanc_1_10::ElemTemplateElement::error(xalanc_1_10::StylesheetConstructionContext&, int)’ cannot be overloaded
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1007: error: with ‘void xalanc_1_10::ElemTemplateElement::error(xalanc_1_10::StylesheetConstructionContext&, int)’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1055: error: ‘XalanMessages’ has not been declared
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1055: error: expected ‘,’ or ‘...’ before ‘theCode’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1057: error: ‘void xalanc_1_10::ElemTemplateElement::error(xalanc_1_10::StylesheetConstructionContext&, int)’ cannot be overloaded
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1007: error: with ‘void xalanc_1_10::ElemTemplateElement::error(xalanc_1_10::StylesheetConstructionContext&, int)’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1072: error: ‘XalanMessages’ has not been declared
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1072: error: expected ‘,’ or ‘...’ before ‘theCode’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1074: error: ‘void xalanc_1_10::ElemTemplateElement::error(xalanc_1_10::StylesheetConstructionContext&, int)’ cannot be overloaded
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1007: error: with ‘void xalanc_1_10::ElemTemplateElement::error(xalanc_1_10::StylesheetConstructionContext&, int)’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1090: error: ‘XalanMessages’ has not been declared
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1090: error: expected ‘,’ or ‘...’ before ‘theCode’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1093: error: ‘void xalanc_1_10::ElemTemplateElement::error(xalanc_1_10::StylesheetConstructionContext&, int)’ cannot be overloaded
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1007: error: with ‘void xalanc_1_10::ElemTemplateElement::error(xalanc_1_10::StylesheetConstructionContext&, int)’
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1109: error: ‘XalanMessages’ has not been declared
../xml-xalan/c/src/xalanc/XSLT/ElemTemplateElement.hpp:1109: error: expected ‘,’ or ‘...’ before ‘theCode’
error: command 'gcc' failed with exit status 1



xerces-cとXalan-CのバージョンをPyanaのreadmeに記載されている
バージョンに変更してみても、結局ビルドは通らず、くじけました。


・・・別の方法を考えて見ます。




もどる