WINEでは毎年1月にメジャーバージョンを更新することになっており、
Plamo用の正式なパッケージは7.
ソースコードのダウンロードとビルドスクリプトの用意
WINEのビルドには32ビット用のコンパイラやライブラリが必要で、
まずは、
$ wget https://dl.winehq.org/wine/source/7.0/wine-7.0-rc2.tar.xz --2021-12-22 17:04:31-- https://dl.winehq.org/wine/source/7.0/wine-7.0-rc2.tar.xz dl.winehq.org をDNSに問いあわせています... 151.101.90.217 ... 2021-12-22 17:04:33 (11.2 MB/s) - `wine-7.0-rc2.tar.xz' へ保存完了 [27108028/27108028] $ tar xvf wine-7.0-rc2.tar.xz wine-7.0-rc2/tools/wrc/CHANGES wine-7.0-rc2/tools/wrc/Makefile.in ... wine-7.0-rc2/tools/wrc/wrctypes.h
WINEのソースコードにはconfigureスクリプトが付属しているので、
$ cp /usr/share/doc/wine-6.20/PlamoBuild.wine-6.20.gz . $ gunzip PlamoBuild.wine-6.20.gz $ cp PlamoBuild.wine-{6.20,7.0-rc2}
今回はconfigureスクリプトに渡すオプション等は6.
$ cat -n PlamoBuild.wine-7.0-rc2 1 #!/bin/sh 2 ############################################################## 3 pkgbase="wine" 4 vers="7.0_rc2" 5 url="https://dl.winehq.org/wine/source/6.x/wine-7.0-rc2.tar.xz" 6 verify="" 7 digest="" 8 arch=`uname -m` 9 build=B1 10 src="wine-7.0-rc2" 11 OPT_CONFIG="--with-x --enable-win64"
エラー発生!!
config処理では、
$ ./PlamoBuild.wine-7.0-rc2 config | cat -n 1 checking build system type... x86_64-pc-linux-gnu 2 checking host system type... x86_64-pc-linux-gnu ... 419 configure: OpenCL 64-bit development files not found, OpenCL won't be supported. 420 configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported. 421 configure: libcapi20 64-bit development files not found, ISDN won't be supported. 422 423 configure: Finished. Do 'make' to compile Wine.
ところが、
$ ./PlamoBuild.wine-7.0-rc2 build | cat -n 1 x86_64-w64-mingw32-gcc -c -o dlls/acledit/main.cross.o /home/kojima/Wine/wine-7.0-rc2/dlls/acledit/main.c -Idlls/acledit \ 2 -I/home/kojima/Wine/wine-7.0-rc2/dlls/acledit -Iinclude -I/home/kojima/Wine/wine-7.0-rc2/include \ 3 -I/home/kojima/Wine/wine-7.0-rc2/include/msvcrt -D__WINESRC__ -D_UCRT -D__WINE_PE_BUILD -Wall \ 4 -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Winit-self \ .... 23068 /home/kojima/Wine/wine-7.0-rc2/dlls/d3d12/d3d12_main.c:341:24: エラー: ‘VKD3D_API_VERSION_1_2’ undeclared (first use in this function); did you mean ‘VK_API_VERSION_1_2’? 23069 341 | .api_version = VKD3D_API_VERSION_1_2, 23070 | ^~~~~~~~~~~~~~~~~~~~~ 23071 | VK_API_VERSION_1_2 23072 /home/kojima/Wine/wine-7.0-rc2/dlls/d3d12/d3d12_main.c:341:24: 備考: 未宣言の識別子は出現した各関数内で一回のみ報告されます 23073 make: *** [Makefile:37240: dlls/d3d12/d3d12_main.o] エラー 1 23074 make: *** 未完了のジョブを待っています.... 23075 build error. ./PlamoBuild.wine-7.0-rc2 script stop
あれれ、
$ ./PlamoBuild.vkd3d-1.2 config checking for gcc... gcc checking whether the C compiler works... yes ... checking whether SpvCapabilityDemoteToHelperInvocationEXT is declared... no configure: error: SPIR-V headers are too old. configure error. ./PlamoBuild.vkd3d-1.2 script stop
関連パッケージを更新して再挑戦
インストール済みのSPIRV_
SPIRV-HeadersはSPIR-Vが使う変数や関数の定義集
SPIRV_
$ ./PlamoBuild.wine-7.0-rc2 build | cat -n 1 x86_64-w64-mingw32-gcc -c -o dlls/acledit/main.cross.o \ /home/kojima/Wine/wine-7.0-rc2/dlls/acledit/main.c -Idlls/acledit \ 2 -I/home/kojima/Wine/wine-7.0-rc2/dlls/acledit -Iinclude -I/home/kojima/Wine/wine-7.0-rc2/include \ 3 -I/home/kojima/Wine/wine-7.0-rc2/include/msvcrt -D__WINESRC__ -D_UCRT -D__WINE_PE_BUILD -Wall \ ... 50389 dlls/winecrt0/libwinecrt0.cross.a dlls/msvcrt/libmsvcrt.cross.a dlls/kernel32/libkernel32.cross.a \ 50390 dlls/ntdll/libntdll.cross.a 50391 Wine build complete.
これで64ビット版のWine-7.
$ ./PlamoBuild.lib32_vkd3d-1.2 ... $ sudo updatepkg -f lib32_vkd3d-1.2-i686-M1.tzst ... $ ./PlamoBuild.wine_32-7.0 ... pruning symlink in /home/kojima/Wine/work/usr/share/man/mann basename:wine_32 version:7.0_rc2 arch:i686 build:M1 ext:tzst usr/lib32/wine/i386-unix/libwine.so.1 -> libwine.so.1.0 ( cd usr/lib32/wine/i386-unix ; rm -rf libwine.so.1 ) ( cd usr/lib32/wine/i386-unix ; ln -sf libwine.so.1.0 libwine.so.1 ) ./usr/lib32/wine/i386-unix/libwine.so.1 ../wine_32-7.0_rc2-i686-M1.tzst.tar : 20.90% (590428160 => 123392743 bytes, /*stdout*\)
多少試行錯誤があったものの、
新しいパッケージの動作確認
6.
$ ls -lh wine{,_32}-{6.20,7.0}*tzst -rw-r--r-- 1 root root 115M 10月 23日 13:23 wine-6.20-x86_64-B1.tzst -rw-r--r-- 1 root root 125M 12月 22日 13:13 wine-7.0_rc2-x86_64-B1.tzst -rw-r--r-- 1 root root 107M 10月 23日 13:11 wine_32-6.20-i686-M1.tzst -rw-r--r-- 1 root root 114M 12月 22日 13:17 wine_32-7.0_rc2-i686-M1.tzst
updatepkgコマンドで新しいパッケージに更新し、
$ sudo updatepkg wine-7.0_rc2-x86_64-B1.tzst wine_32-7.0_rc2-i686-M1.tzst [sudo] kojima のパスワード: removing wine-6.20 ... --> Deleting empty directory usr/lib32/wine wine_32-7.0_rc2-i686-M1 のインストール中 PACKAGE DESCRIPTION: wine_32-7.0_rc2-i686-M1 のインストールスクリプトを実行中 $ winecfg
バージョンアップすると既存のWine環境

インストール済のアプリもたいていは問題なく動いているものの、


バグレポートを出せればいいのだけれど、
以上、
WINEは64ビットと32ビットを自在に使い分ける複雑なソフトウェアで、
今回は触れられなかったものの、
本稿を参考に、