Wine on rpi5b
Hi, I have compiled box64 with WOW64, but I can't start ./winecfg:
❯ box64 ./winecfg
[BOX64] Box64 v0.3.9 b2e68e803 built on Nov 5 2025 14:36:42
[BOX64] Running on Cortex-A76 with 4 cores, pagesize: 16384
[BOX64] Will use time-based emulation for RDTSC, even if hardware counters are available
[BOX64] Will use software counter measured at 1.0 GHz emulating 2.0 GHz
[BOX64] Detected 48bits at least of address space
[BOX64] Counted 70 Env var
[BOX64] Library search path:
[BOX64] Binary search path: ./:bin/:/home/alexv/llvm-mingw/bin/:/usr/local/sbin/:/usr/local/bin/:/usr/bin/:/usr/bin/site_perl/:/usr/bin/vendor_perl/:/usr/bin/core_perl/:/var/lib/snapd/snap/bin/:/home/alexv/llvm-mingw/llvm-mingw/llvm-mingw-20251104-ucrt-ubuntu-22.04-aarch64/bin/
[BOX64] Looking for ./winecfg
[BOX64] Rename process to "wine"
[BOX64] Using native(wrapped) libdl.so.2
[BOX64] Using native(wrapped) libc.so.6
[BOX64] Using native(wrapped) ld-linux-x86-64.so.2
[BOX64] Using native(wrapped) libpthread.so.0
[BOX64] Using native(wrapped) libutil.so.1
[BOX64] Using native(wrapped) librt.so.1
[BOX64] Using native(wrapped) libbsd.so.0
[BOX64] Using emulated /home/alexv/wine/wine-10.17-staging-tkg-amd64-wow64/bin/../lib/wine/x86_64-unix/ntdll.so
[BOX64] Using emulated /usr/lib/box64-x86_64-linux-gnu/libgcc_s.so.1
[BOX64] Box64 v0.3.9 b2e68e803 built on Nov 5 2025 14:36:42
[BOX64] Running on Cortex-A76 with 4 cores, pagesize: 16384
[BOX64] Will use time-based emulation for RDTSC, even if hardware counters are available
[BOX64] Will use software counter measured at 1.0 GHz emulating 2.0 GHz
[BOX64] Wine64 detected, WINEPRELOADRESERVE=""
[BOX64] Detected 48bits at least of address space
[BOX64] WINE prereserve of 0x10000:0x8000 done
[BOX64] WINE prereserve of 0x110000:0x30000000 done
[BOX64] WINE prereserve of 0x7f000000:0x3000000 done
[BOX64] Detected running wine with "winecfg"
[BOX64] Counted 72 Env var
[BOX64] Library search path:
[BOX64] Binary search path: ./:bin/:/home/alexv/llvm-mingw/bin/:/usr/local/sbin/:/usr/local/bin/:/usr/bin/:/usr/bin/site_perl/:/usr/bin/vendor_perl/:/usr/bin/core_perl/:/var/lib/snapd/snap/bin/:/home/alexv/llvm-mingw/llvm-mingw/llvm-mingw-20251104-ucrt-ubuntu-22.04-aarch64/bin/
[BOX64] Looking for /home/alexv/wine/wine-10.17-staging-tkg-amd64-wow64/lib/wine/x86_64-unix/wine64
[BOX64] BOX64ENV: Variables overridden:
BOX64_MAXCPU=64
[BOX64] argv[1]="winecfg"
[BOX64] Rename process to "wine64"
[BOX64] Using native(wrapped) libdl.so.2
[BOX64] Using native(wrapped) libpthread.so.0
[BOX64] Using native(wrapped) libc.so.6
[BOX64] Using native(wrapped) ld-linux-x86-64.so.2
[BOX64] Using native(wrapped) libutil.so.1
[BOX64] Using native(wrapped) librt.so.1
[BOX64] Using native(wrapped) libbsd.so.0
[BOX64] Using emulated /home/alexv/wine/wine-10.17-staging-tkg-amd64-wow64/lib/wine/x86_64-unix/ntdll.so
[BOX64] Using emulated /usr/lib/box64-x86_64-linux-gnu/libgcc_s.so.1
[BOX64] posix_spawn(0x7fff7c69e6fc, "/home/alexv/wine/wine-10.17-staging-tkg-amd64-wow64/lib/wine/../../bin/wineserver", (nil), (nil), 0x7fff7c69e700["/home/alexv/wine/wine-10.17-staging-tkg-amd64-wow64/lib/wine/../../bin/wineserver", "", ...], 0x7fff7c69ea98), IsX64=1, IsX86=0 IsScript=0 envp is context->envv
[BOX64] => posix_spawn(0x7fff7c69e6fc, "/usr/local/bin/box64", (nil), (nil), 0x7fffc5fc1300 ["/usr/local/bin/box64", "/home/alexv/wine/wine-10.17-staging-tkg-amd64-wow64/lib/wine/../../bin/wineserver", ""...:1], 0x7fffc5fc1b38)
[BOX64] posix_spawn returned 0
[BOX64] Box64 v0.3.9 b2e68e803 built on Nov 5 2025 14:36:42
[BOX64] Running on Cortex-A76 with 4 cores, pagesize: 16384
[BOX64] Will use time-based emulation for RDTSC, even if hardware counters are available
[BOX64] Will use software counter measured at 1.0 GHz emulating 2.0 GHz
[BOX64] Detected 48bits at least of address space
[BOX64] Counted 72 Env var
[BOX64] Library search path:
[BOX64] Binary search path: ./:bin/:/home/alexv/llvm-mingw/bin/:/usr/local/sbin/:/usr/local/bin/:/usr/bin/:/usr/bin/site_perl/:/usr/bin/vendor_perl/:/usr/bin/core_perl/:/var/lib/snapd/snap/bin/:/home/alexv/llvm-mingw/llvm-mingw/llvm-mingw-20251104-ucrt-ubuntu-22.04-aarch64/bin/
[BOX64] Looking for /home/alexv/wine/wine-10.17-staging-tkg-amd64-wow64/lib/wine/../../bin/wineserver
[BOX64] Rename process to "wineserver"
[BOX64] Using native(wrapped) libdl.so.2
[BOX64] Using native(wrapped) libc.so.6
[BOX64] Using native(wrapped) ld-linux-x86-64.so.2
[BOX64] Using native(wrapped) libpthread.so.0
[BOX64] Using native(wrapped) libutil.so.1
[BOX64] Using native(wrapped) librt.so.1
[BOX64] Using native(wrapped) libbsd.so.0
^C002c:err:virtual:map_image_into_view failed to set 60000060 protection on L"\\??\\C:\\windows\\system32\\wineboot.exe" section .text, noexec filesystem?
002c:err:virtual:map_image_into_view failed to set 60000020 protection on L"\\??\\C:\\windows\\system32\\ntdll.dll" section .text, noexec filesystem?
^[[A0024:err:environ:run_wineboot failed to start wineboot 1
[BOX64] Using emulated /home/alexv/.wine/dosdevices/f:/home/alexv/wine/wine-10.17-staging-tkg-amd64-wow64/bin/winecfg
0024:err:module:dlopen_dll invalid .so library "/home/alexv/.wine/dosdevices/f:/home/alexv/wine/wine-10.17-staging-tkg-amd64-wow64/bin/winecfg", too old?
0024:err:virtual:map_image_into_view failed to set 60000020 protection on L"\\??\\C:\\windows\\system32\\start.exe" section .text, noexec filesystem?
0024:err:virtual:map_image_into_view failed to set 60000020 protection on L"\\??\\C:\\windows\\system32\\ntdll.dll" section .text, noexec filesystem?
[BOX64] 20817|SIGSEGV @0x3513a67c (???(start.exe+0x93a67c)) (x64pc=0x7fff00047dbe/"/home/alexv/wine/wine-10.17-staging-tkg-amd64-wow64/lib/wine/x86_64-unix/ntdll.so/signal_init_process + 0x8e", rsp=0x7fff7c69e890), for accessing 0x7ffe1000 (code=2)
RAX:0x00007fff0004195c RCX:0x0000000000000032 RDX:0x0000000000000003 RBX:0x000000007ffe0000
RSP:0x00007fff7c69e890 RBP:0x00007fff002988c0 RSI:0x0000000000001000 RDI:0x000000007ffe1000
R8:0x00000000ffffffff R9:0x0000000000000000 R10:0x0000000000016000 R11:0x0000000000000003
R12:0x0000000000000000 R13:0x0000000000000000 R14:0x0000000000000000 R15:0x0000000000000000 ES:0x002b CS:0x0033 SS:0x002b DS:0x002b FS:0x0000 GS:0x0000 FSBASE=0x4b2893e0 GSBASE=(nil)
[1] 20817 segmentation fault (core dumped) box64 ./winecfg
You have a 16K pagesize kernel, and wine will only work with 4K pagesize. Please switch your kernel to 4K and will work.
Can't I get around it? And how change pagesize without new kernel?
Can't I get around it? And how change pagesize without new kernel?
On RPI5, changing kernel pagesize is just a setting in a text file. Look here for example https://pimylifeup.com/raspberry-pi-page-size/
No, there is no workaround for now. While Box64 is able to run some x86 software on 16K pagesize (including wine), Wine will not load x86 .exe on non-4K pagesize by default. (wine can handle different pagesize, but that code is not enable for x86 build).
Switch your kernel to 4K and all should work fine.