ほとまるブログ

おっぱいアニメ愛好家のブログ (゚∀゚)o彡゜おっぱい!おっぱい!

debianでPC98エミュレータの導入(失敗編)

はじめに

最近、艦これおじさん化が進んでる状態で、
いろいろ見てたら、「提督の決断」のスクリーンショットを見てしまったwww
やったことないけど、懐かしいドット絵。
僕としてはゲームといえばPC98ですよwwwwwwwwwwwwwwww
幸い、PC98ゲーム資産はいろいろある状態。
ただし、実機なんてもうない!
Win用エミュは配布されてるけど、Winマシンがないんだよクソガ
で、Linuxでもエミュレータがあるぽいので、導入してみようかなと。

OS環境

いわゆるdebianです

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 7.5 (wheezy)
Release:	7.5
Codename:	wheezy

結果

結論から言うと失敗した。
うまく起動しなくなったので、インストールしたモジュールはすべてアンインストール

$ sudo make uninstall

それで元に戻ったから、傷は浅かったw
調べたところ、debianは、次のjessieからGTK+3を採用してるので
wheezyに、GTK+3入れると死ぬと思われる。
今回必要なのは、2.6以上なので、その辺りなら大丈夫かもしれない。
対策方針が決まるまで、保留。

失敗した手順の記録として、以下に残す。

ソース取得

Linux用のエミュレータは、Xnp2 というプロジェクトらしい
http://www.nonakap.org/np2/
とりあえずダウンロードだ

$ wget http://www.nonakap.org/np2/xnp2-20140607.tar.bz2
$ wget http://www.nonakap.org/np2/xnp2-help-20130726.tar.bz2
$ wget http://www.nonakap.org/np2/np21/np21-20130726.zip

なんか日付が新しい。
まだ活動してるプロジェクトらしい。感謝
解凍する

$ tar xf xnp2-20140607.tar.bz2 
$ tar xf xnp2-help-20130726.tar.bz2 
$ unzip np21-20130726.zip 

ビルド

解凍したヘルプにインストール方法が書いてあるので、その通り実行

$ cd xnp2-20140607/x11/
$ ./configure 

とりあえずエラー発生

checking for GTK+ - version >= 2.6.0... no
*** A new enough version of pkg-config was not found.
*** See http://pkgconfig.sourceforge.net
configure: error: Test for GTK failed. See the file 'x11/INSTALL.ja' for help

GTK のバージョンが2.6.0以上らしい

GTK+ のインストール

いろいろ調べたら、自力でインストールするらしい。
めんどくせ
http://www.gtk.org/download/linux.php
最新版は3.12だった

$ wget http://ftp.gnome.org/pub/gnome/sources/gtk+/3.12/gtk+-3.12.2.tar.xz
$ tar xf gtk+-3.12.2.tar.xz 
$ cd gtk+-3.12.2/
$ ./configure 

エラー発生

checking for BASE_DEPENDENCIES... no
configure: error: in `/home/hoge/xnp2/gtk+-3.12.2':
configure: error: The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

pkg-config が足りないらしい

$ sudo apt-get install pkg-config

でリトライ

$ ./configure 

いろいろ足りないらしい

configure: error: Package requirements (glib-2.0 >= 2.39.5    atk >= 2.7.5    pango >= 1.32.4    cairo >= 1.12.0    cairo-gobject >= 1.12.0    gdk-pixbuf-2.0 >= 2.27.1) were not met:

No package 'glib-2.0' found
No package 'atk' found
No package 'pango' found
No package 'cairo' found
No package 'cairo-gobject' found
No package 'gdk-pixbuf-2.0' found

GTK のダウンロードページにあったやつは全部入れないとダメらしい

glib
$ wget http://ftp.gnome.org/pub/gnome/sources/glib/2.40/glib-2.40.0.tar.xz
$ tar xf glib-2.40.0.tar.xz 
$ cd glib-2.40.0/
$ ./configure

やはり足りないw

checking for inflate in -lz... no
configure: error: *** Working zlib library and headers not found ***

やだもう、日頃から開発してないのバレバレじゃないですかーwwww

$ sudo apt-get install zlib1g zlib1g-dev
$ ./configure
$ sudo apt-get install libffi-dev
checking for LIBFFI... no
configure: error: Package requirements (libffi >= 3.0.0) were not met:

No package 'libffi' found

$ ./configure
checking for msgfmt... no
configure: error: 
*** You must have either have gettext support in your C library, or use the
*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html

$ sudo apt-get install gettext
$ ./configure

やっと通った

$ make
$ sudo make install
pango
$ wget http://ftp.gnome.org/pub/gnome/sources/pango/1.36/pango-1.36.3.tar.xz
$ tar xf pango-1.36.3.tar.xz 
$ cd pango-1.36.3/
$ ./configure
checking for HARFBUZZ... no
no
checking for CoreText availability... no
checking for CAIRO... no
no
configure: error: *** Could not enable any backends.
*** Must have at least one backend to build Pango.

$ sudo apt-get install libcairo2-dev

$ sudo find /usr/ -name cairo.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/cairo.pc
$ PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/ ./configure
gdk-pixbuf
$ wget http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.30/gdk-pixbuf-2.30.8.tar.xz
$ tar xf gdk-pixbuf-2.30.8.tar.xz 
$ cd gdk-pixbuf-2.30.8/
$ ./configure
checking for TIFFFlushData in -ltiff34... no
configure: WARNING: *** TIFF loader will not be built (TIFF library not found) ***
configure: error: 
*** Checks for TIFF loader failed. You can build without it by passing
*** --without-libtiff to configure but some programs using GTK+ may
*** not work properly

$ sudo apt-get install libtiff4 libtiff4-dev 
$ ./configure
checking for libpng10... no
no
checking for png_read_info in -lpng... no
configure: WARNING: *** PNG loader will not be built (PNG library not found) ***
configure: WARNING: *** PNG loader will not be built (PNG header file not found) ***
configure: error: 

$ sudo apt-get install libpng12-0 libpng12-dev 
$ ./configure
$ make
$ sudo make install
atk
$ wget http://ftp.gnome.org/pub/gnome/sources/atk/2.12/atk-2.12.0.tar.xz
$ tar xf atk-2.12.0.tar.xz 
$ cd atk-2.12.0/
$ ./configure
$ make
$ sudo make install
gobject
$ wget http://ftp.gnome.org/pub/gnome/sources/gobject-introspection/1.40/gobject-introspection-1.40.0.tar.xz

$ tar xf gobject-introspection-1.40.0.tar.xz
$ cd gobject-introspection-1.40.0/
$ ./configure
checking for flex... no
checking for lex... no
configure: error: flex not found but required

$ sudo apt-get install flex
$ ./configure
checking for bison... no
configure: error: bison not found but required

$ sudo apt-get install bison
$ ./configure
checking for python extension module directory... ${exec_prefix}/lib/python2.7/dist-packages
checking for headers required to compile python extensions... ./configure: line 14647: /usr/bin/python-config: No such file or directory
not found
configure: error: Python headers not found

$ sudo apt-get install python-dev
$ ./configure
$ make
$ sudo make install