忍者ブログ

素人翻訳

適当に翻訳する。

ubuntu-22.10にてsnes9x、snes9x-gtk(snes9x-1.60)を構築・インストール

Ubuntu-22.10でSnes9x-gtk(snes9x-1.60)をインストールする。

このサイトこのサイトによると、snes9x-gtkは「meson」を使ってビルドする仕組みになっているようだ。
そのため「snes9x-1.60/gtk」にはconfigureスクリプトは入ってない。

$ sudo apt install gcc
$ sudo apt install g++
$ sudo apt install make
$ sudo apt install meson
$ sudo apt install libx11-dev
$ sudo apt install libxv-dev
$ sudo apt install libxml2-dev
$ sudo apt install libsdl2-dev
$ sudo apt install libgtkmm-3.0-dev
$ sudo apt install pulseaudio
$ sudo apt install portaudio19-dev
$ sudo apt install alsa-oss
$ export CXXFLAGS="-std=gnu++14"
$ tar -xf snes9x-1.60.tar.gz
$ cd snes9x-1.60/gtk
$ meson build --prefix=/usr/local --buildtype=release --strip
$ cd build
$ ninja
$ ./snes9x-gtk
$ sudo meson install
$ cd ../..
$ snes9x-gtk

「libepoxy」も必要らしいが、上のように色々入れていたら、いつの間にかインストールされていた。
「xorg-dev」は入れたかもしれないし、入れなかったかもしれない。多分、入れなくても大丈夫。

snes9xを作らなくてもsnes9x-gtkの作成は可能。
ターミナルから使用する普通のsnes9xは「snes9x-1.60/unix」に移動して作成する。

$ export CXXFLAGS="-std=gnu++14"
$ cd snes9x-1.60/unix
$ ./configure
$ make
$ sudo make install

snes9xよりもsnes9x-gtkの方が設定・利用しやすい。

====================

その他、snes9x作成の際に出たエラーについて。

$ sudo apt update
...
...
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is he^C by process 5782 (unattended-upgr)... 73s
...
...
$

エラーに書かれているプロセス番号を指定して「sudo kill 5782」で解決。

$ cd snes9x-1.60/unix
$ ./configure
$ make
...
...
./conffile.cpp:215:19: required from here
/usr/include/c++/12/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const
/usr/include/c++/12/bits/stl_tree.h:770:15: note: ‘std::is_invocable_v<const ConfigFile::ConfigEntry::line_less&, const ConfigFile::ConfigEntry&, const ConfigFile::ConfigEntry&>’ evaluates to false
make: *** [Makefile:77: ../conffile.o] Error 1
$

このサイトに従って、環境変数「CXXFLAGS」に「-std=gnu++14」を設定して解決。

(snes9x/unixにて)
$ export CXXFLAGS="-std=gnu++14"
$ make clean
$ ./configure
$ make
...
...
x11.cpp:26:10: fatal error: X11/extensions/Xvlib.h: No such file or directory
26 | #include <X11/extensions/Xvlib.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:77: x11.o] Error 1
$

これはlibxv-devをインストールして解決。

PR

gitエラーのためcurlをインストール

[user09@localhost git-2.9.5]$ git clone https://github.com/TASEmulators/desmume
Cloning into 'desmume'...
fatal: Unable to find remote helper for 'https'
[user09@localhost git-2.9.5]$

curlが入ってないと上記のエラーが出るとのこと。

curl のソースコードをダウンロードしようとして goo.ne.jpで検索したら、一番上にgithubのcurlのページが出てきた。
gitが使えなくて困っているのだが…。

curlのサイトの「daily snapshots」からダウンロード。

openssl-1.1.1qをインストールしてある環境で、

$ cd git-2.9.5
$ export PKG_CONFIG_PATH="/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig"
$ export LD_LIBRARY_PATH="/usr/local/lib64:/usr/local/lib"
$ export CFLAGS="-I/usr/local/include"
(自分なりの環境変数を設定)
$ make clean
$ cd ..
$ tar -xf curl-7.88.1-20230220.tar.xz
$ cd curl-7.88.1-20230220
$ ./configure --with-openssl=/usr/local
(人によっては --with-openssl=/usr/local/ssl かもしれない。)
$ make
$ sudo make install
$ cd ../git-2.9.5
$ ./configure
...
...
checking for curl_global_init in -lcurl... yes
checking for Curl_ssl_init in -lcurl... no
checking for curl-config... curl-config
...
...
$ ./configure --with-curl=/usr/local
...
...
checking for curl_global_init in -lcurl... yes
checking for Curl_ssl_init in -lcurl... no
checking for curl-config... curl-config
...
...
$ make
$ sudo make install

「checking for Curl_ssl_init in -lcurl... no」のままだが、「git clone https://〜〜」は成功した。

/usr/local/libexec/git-coreの中に「git-remote-https」ができている。

カレンダー

03 2024/04 05
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

最新コメント

[08/18 NONAME]
[05/18 NONAME]
[04/09 NONAME]
[03/21 NONAME]
[03/20 NONAME]

最新記事

ブログ内検索

広告

バーコード

広告