LoginSignup
0
0

More than 1 year has passed since last update.

xkeropi をビルドする (Debian 32bit)

Last updated at Posted at 2022-12-28

xkeropi を Hyper-V 上の ubuntu 16.04 で動かした が、最近のVirtualBox では ubuntu 16.04 がインスコできないんでやんの(VirtualBox 5.2あたりからダメっぽい)。

なので Debian に引っ越すよー

環境構築

OS をインストールする

debian-11.6.0-i386-netinst.iso を VirtualBox 7.0 にインストールする。

sudo できるようにする (任意)

$ su -
# adduser yui sudo
# reboot

あると便利な ssh (任意)

$ sudo apt install openssh-server

あると便利な samba (任意)

$ sudo apt install samba
$ sudo vi /etc/samba/smb.conf

[homes]
  comment = Home Directories
  browseable = no
  writable = yes
  create mask = 0644
  directory mask = 0755

$ sudo smbpasswd -a yui
$ sudo service smbd restart

必要なライブラリなどをインストール

$ sudo apt-get install xutils-dev
$ sudo apt-get install libgtk2.0-dev
$ sudo apt-get install libsdl1.2-dev
$ sudo apt-get install nasm

ビルド

$ wget https://www.nonakap.org/keropi/xkeropi-20101107.tar.bz2
$ tar xf xkeropi-20101107.tar.bz2
$ cd xkeropi-20101107
$ xmkmf -a
$ make
err.png
おうふ。。。

コンパイル オプション に -Wno-narrowing を追加する。

config.tmpl
EXTRA_DEFINES+= -Wno-narrowing

ビルド エラー

/usr/bin/ld: x68k/68kem.o: in function `m68000_ICountBk':
x68k/68kem.asm:(.data+0x4): multiple definition of `m68000_ICountBk'; x68k/cpu_glue.o:/home/yui/xkeropi-20101107/x68k/cpu_glue.c:6: first defined here
/usr/bin/ld: x68k/68kem.o: warning: relocation in read-only section `.text'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make: *** [Makefile:1152: xkeropi] Error 1

ubuntu だと問題なかったけど、確かに多重定義。
仕方がなのでコメントアウト。

cpu_glue.c
// int m68000_ICountBk;

ビルドは完了。
run.png

32bpp対応版を動かす

https://gitlab.com/nekodevteam/xkeropi を clone して、上記2ヵ所を直して実行。
run2.png
あとでもろもろ直しておきます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0