ptitSeb / box64

Box64 - Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices
https://box86.org
MIT License
3.39k stars 239 forks source link

Trying to get box64 to run a x86_64 file but I get pagesize error #1150

Open moolibear opened 6 months ago

moolibear commented 6 months ago

Can anyone help me troubleshoot this, I am trying to get a game to run on my macbook pro m1. Thanks brian@brian-linux:~/box64/build$ box64 /home/brian/Desktop/WingsLinuxBuild/Wings.x86_64 Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL SHA1 SHA2 USCAT FLAGM FLAGM2 FRINT PageSize:16384 Running on Icestorm-M1-Pro Firestorm-M1-Pro with 10 Cores Params database has 39 entries Box64 with Dynarec v0.2.7 23542bbf built on Dec 20 2023 14:04:31 BOX64: Detected 48bits at least of address space Error: PageSize configuration is wrong: configured with 4096, but got 16384 brian@brian-linux:~/box64/build$ box64 /home/brian/Downloads/WingsSetup.exe Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL SHA1 SHA2 USCAT FLAGM FLAGM2 FRINT PageSize:16384 Running on Icestorm-M1-Pro Firestorm-M1-Pro with 10 Cores Params database has 39 entries Box64 with Dynarec v0.2.7 23542bbf built on Dec 20 2023 14:04:31 BOX64: Detected 48bits at least of address space Error: PageSize configuration is wrong: configured with 4096, but got 16384 brian@brian-linux:~/box64/build$

ptitSeb commented 6 months ago

You are on Mac, use the "M1" profile to build with 16k page size, but note that x86 is just 4k pagesize, so many things will not work on 16k pagesize. Especialy, Wine doesn't work on 16k pagesize.

moolibear commented 6 months ago

@ptitSeb I used when I installed it: cmake .. -D M1=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo Thanks for clarification re x86 and pagesize

ptitSeb commented 6 months ago

@ptitSeb I used when I installed it: cmake .. -D M1=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo Thanks for clarification re x86 and pagesize

That's odd. it should have automaticaly selected 16k pagesize then. You can reconfigure with

cmake .. -D M1=1 -D PAGE16K=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

to force 16k pagesize and build again.

moolibear commented 6 months ago

Didnt seem to work for me:

brian@brian-linux:~/build$ cd ~/box64/build cmake .. -D M1=1 -D PAGE16K=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- Configuring done (0.1s) -- Generating done (0.1s) -- Build files have been written to: /home/brian/box64/build brian@brian-linux:~/box64/build$ /home/brian/box64 bash: /home/brian/box64: Is a directory brian@brian-linux:~/box64/build$ cd /home/brian/box64 brian@brian-linux:~/box64$ box64 /home/brian/Downloads/warzone2100_win_x64_installer.exe Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL SHA1 SHA2 USCAT FLAGM FLAGM2 FRINT PageSize:16384 Running on Icestorm-M1-Pro Firestorm-M1-Pro with 10 Cores Params database has 39 entries Box64 with Dynarec v0.2.7 23542bbf built on Dec 20 2023 14:04:31 BOX64: Detected 48bits at least of address space Error: PageSize configuration is wrong: configured with 4096, but got 16384 brian@brian-linux:~/box64$

ptitSeb commented 6 months ago

Try to use ccmake . to have an interactive configuration menu. You'll be able to swtich M1 & PAGE16K to ON with that tols (use c and g to configure and generate makefile when done).

moolibear commented 6 months ago

@ptitSeb Thanks I’ll give that a try

ptitSeb commented 3 months ago

Can the ticket be closed now?