Post date: 2011/01/06 15:07:20
KDE環境は(大きくていれたく)ないので、Qtだけ入れます。そのほかのAnagixのツール群と
ともに~/anagix_tools以下にインストールします。
1.KLayoutはQtベースなので、Qt(qt-everywhere-opensource-src-4.7.1)をまずインストールする
インストール先は、/home/anagix/anagix_tools(後で/home/anagix/anagix_tools/qt-4.7.1に変更)
KLayoutは、QtRubyを使用しており、QtRubyのインストールは、opensslを組み込んだQtでなくてはならないので、以下のオプションとした
OPENSSL_LIBS='-L/home/anagix/anagix_tools/lib -lssl -lcrypto' ./configure -static -prefix ~/anagix_tools -openssl-linked -I/home/anagix/anagix_tools/include -nomake demos -nomake examples -no-qt3support -no-accessibility -no-phonon -no-phonon-backend -no-webkit
make&make_install
注意: 後で、Qt4Rubyのために、-dbus(or -dbus-linked)と -opengl が必要だとわかった。
2.KLayout(klayout-0.21.3)のインストール
./build.sh -qt ~/anagix_tools/qt-4.7.1 -rblib ~/anagix_tools/lib/libruby-static.a -rbinc ~/anagix_tools/lib/ruby/1.8/i686-linux
以下のエラーが出るので、missing.hの定義をコメントした
/home/anagix/anagix_tools/lib/ruby/1.8/i686-linux/missing.h:43: error: declaration of eaccess(const char*, int) throws different exceptions /usr/include/unistd.h:297: error: from previous declaration eaccess(const char*, int) throw ()
3.KLayoutでQtRubyを使うためにQtRuby(qt4-qtruby-2.1.0)のインストール
cmakeが必要だったので、apt-get install cmake
~/anagix_tools/src/qt4-qtruby-2.1.0でcmakeするもよくわからないエラーで、この時点では、give up
解決は、1つ次の記事:Ubuntu10.04-serverにQt4Rubyをインストールを見てください。
4.automoc(automoc4-0.9.88)のインストール
cmake -DCMAKE_INSTALL_PREFIX=/home/anagix/anagix_tools
make & make install でOK
注意: 最初、Qtをopensslなしでインストールしたためにハマッタ
/home/anagix/anagix_tools/include/QtCoreの中に、QT_NO_OPENSSLがdefineされてしまっていたのが原因でエラー発生
対策: /home/anagix/anagix_tools/include/Qt*を削除した
メモ: defineの内容を見るには、g++ -E -dD -dI xxx.cppのオプションを使う
-oを指定すると出力が出ないので注意!