Post date: 2015/05/15 2:51:16
これは、2015年5月15 日時点で、QUCS 0.0.19リリース以前にgit repositoryからcloneしてmakeしたときの記録です。
(# 2015年9月5日に、0.0.19-RC3をインストールした際のメモを付け加えました。)
CentOS5という古いOSをつかったため、gccやautomakeが古く、新しいバージョンを使うためにいろいろと苦労した内容が含まれてますので、注意してください。Ubuntuの新しいバージョンを使えば、src/qucs/README.mdのままこんな苦労せずいけると思います。
1. git repositoryから spice4qucsをmakeした。
git clone https://github.com/Qucs/qucs
cd qucs
git checkout -b spice4qucs origin/spice4qucs
export QTDIR=/usr/local/anagix_tools/qt-4 しておく。また、export PATH=/usr/local/anagix_tools/qt-4/bin:$PATHも必要。
開発版ではconfigureを作成するために、yum install automakeの必要があった
2. qucsの下に、qucs-coreとqucsがあったので、先に
cd qucs
./autogen.sh で、configureが生成されるので、以下を実行
./configure CC=gcc44 CXX=g++44 --prefix=/usr/local/anagix_tools
make&&make installで作成できた。
ところが、qucs-coreのmakeが荊の道となった。
3. まず、cd qucs-core
a. 以下は、バージョンが古いため(表示はインストールしたバージョン)yumではインストールできないので、ソースからmakeした:
bison-3.0.4, flex-2.5.39, libtool-2.4.6, automake-1.15, autoconf-2.69
b. また、以下をyum installする必要があった。
moc, gd, gd-devel, gperf, (libXpm, libXpm-develは自動的にインストールされたかもしれない)
c. qucs-coreの下にbuild-auxを作っておかないと、./bootstrap.sh が成功しない
d. centos5のgcc4.1.2は古すぎて、qucsをコンパイルできないのでgcc44をインストールして使っていたが、qucs-coreのconfigureで以下のエラーが出た。
error: *** A compiler with support for C++11 language features is required.
調べてみると、4.4では、C++11がサポートされてない。参考:C++0x/C++11 Support in GCC
そこで、以下の方法で4.7.2をインストールした:
scl enable devtoolset-1.1 bash
を実行すると、gcc 4.7.2に .切り替わる
e. cpanで、GDをインストールするところでトラブった
cpan GD実行中に、testで止まる。
Error: Can't locate loadable object for module GD in @INC
GD.pmがインストールされてないのが問題のように思われたので、GD-2.56が展開されたディレクトリで、
perl ./Build.PLを実行して、Buildを作成し(?)、(そのために、cpan Buildもした。)
./Build installでインストールした。(./Build testはエラーで止まったが。)
4. ./bootstrap.sh を実行すると configureが作られた
しかし makeすると、libtool: Version mismatch error. This is libtool 2.4.6, but the libtool: definition of this LT_INIT comes from libtool 2.4.2.
というエラー。autoreconf --force --install, automake --add-missingなどいろいろやって何が解決したのかわからないまま makeできるようになった。
5. /configure --prefix=/usr/local/anagix_tools --enable-maintainer-mode
6. make && make install
【2015年9月5日に、0.0.19-RC3をインストールした際のメモ】
https://github.com/ra3xdh/qucs/releases から、qucs-0.0.19Src3.tar.gz をダウンロード
展開したディレクトリで、./configure --prefix=/usr/local/anagix_tools --enable-maintainer-mode し、
make したところ以下のエラー
../../src/nodelist.h:47:3: error: 'qucs::nodelist_t::nodelist_t(qucs::nodelist_t&)' declared to take non-const reference cannot be defaulted in the class body
https://github.com/Qucs/qucs/issues/249 によると、gcc 4.7のバグっぽいので、CentOS 6.5にGCC 4.8.2をレポジトリで入れてみた に従ってgcc 4.8を入れた。
scl enable devtoolset-2 bash 実行後、make && make install できた。
【2016年2月11日に、0.0.19-RC4をインストール】
./qucs :
export QTDIR=/usr/local/anagix_tools/qt-4
export PATH=/usr/local/anagix_tools/qt-4/bin:$PATH
scl enable devtoolset-2 bash
./configure --prefix=/usr/local/anagix_tools
make && make install
./qucs-core :
./bootstrap
./configure --prefix=/usr/local/anagix_tools --enable-maintainer-mode
make && make install