docker-wine icon indicating copy to clipboard operation
docker-wine copied to clipboard

Support linux armhf/arm64

Open linrol opened this issue 11 months ago • 11 comments

build box86/box64 to run wine install wine 7.0.2

linrol avatar Mar 26 '24 05:03 linrol

@huan I have fix the CI action error, please help me re-run it.

linrol avatar Mar 26 '24 08:03 linrol

image

@huan When I tried to run it again, an error occurred because the docker password was not configured. I used secrets.DOCKER_PERSONAL_ACCESS_TOKEN in the yml ci file. Can you add the secrets.DOCKER_PERSONAL_ACCESS_TOKEN of the zixia account in this repository?

linrol avatar Mar 26 '24 09:03 linrol

It's great to have ARM support; thanks, @linrol and @tobiasdiez, for your contribution!

However, this PR looks like it needs some time to investigate and learn; I will do it when I have time.

Please feel free to add more documentation in the README and comments here.

huan avatar May 10 '24 19:05 huan

@huan Do you have any update on when this could be merged? Would be awesome to have arm support.

tobiasdiez avatar Aug 03 '24 15:08 tobiasdiez

We need more contributors to test it and make sure this pr works as expected.

Please let me know if you have personal tested it and it works, so that I’ll have more confident to merge it.

huan avatar Aug 03 '24 20:08 huan

@huan @linrol I gave it a try and sudo docker build --build-arg TARGETPLATFORM=linux/arm64 -t my-docker-image -f Dockerfile.arm . succeeded after some minimal changes (see code review comments above).

tobiasdiez avatar Aug 07 '24 12:08 tobiasdiez

I played around with this a bit more and found that the shortcuts wine and wine64 are not working:

root@53c2107b87ff:/# wine
Error: file is not found (check BOX86_PATH)
root@53c2107b87ff:/# wine64
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 PageSize:4096 Running on Neoverse-N1 with 2 Cores
Will use Hardware counter measured at 25.0 MHz emulating 3.2 GHz
Params database has 87 entries
Box64 with Dynarec v0.3.1 875a2ef3 built on Aug 28 2024 06:26:30
BOX64: Wine64 detected, WINEPRELOADRESERVE=""
BOX64: Detected 48bits at least of address space
WINE prereserve of 0x10000:0x8000 done
WINE prereserve of 0x110000:0x30000000 done
WINE prereserve of 0x7f000000:0x3000000 done
Counted 13 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/
Looking for /root/wine/bin/wine64
Apply RC params for wine64
Applying BOX64_MAXCPU=64
Error: File is not found. (check BOX64_PATH)

However, box64 /home/user/wine/bin/wine64 (and box86 /home/user/wine/bin/wine) works like a charm.

@linrol could you have a look please? I guess it's a problem with the wrappers

tobiasdiez avatar Aug 29 '24 11:08 tobiasdiez

I also got

user@c44fc0303ced:~/matrix-wechat-agent$ box64 wine cmd /k /home/user/matrix-wechat-agent/matrix-wechat-agent.exe
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 PageSize:4096 Running on Neoverse-N1 with 2 Cores
Will use Hardware counter measured at 25.0 MHz emulating 3.2 GHz
Params database has 87 entries
Box64 with Dynarec v0.3.1 875a2ef3 built on Aug 28 2024 06:26:30
BOX64: Wine64 detected, WINEPRELOADRESERVE=""
BOX64: Detected 48bits at least of address space
WINE prereserve of 0x10000:0x8000 done
WINE prereserve of 0x110000:0x30000000 done
WINE prereserve of 0x7f000000:0x3000000 done
Counted 16 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/
Looking for wine
Apply RC params for wine
Applying BOX64_MAXCPU=64
argv[1]="cmd"
argv[2]="/k"
argv[3]="/home/user/matrix-wechat-agent/matrix-wechat-agent.exe"
Not an ELF file (sign=#!/b)
Error: Reading elf header of /usr/local/bin/wine, Try to launch natively instead
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 PageSize:4096 Running on Neoverse-N1 with 2 Cores
Will use Hardware counter measured at 25.0 MHz emulating 3.2 GHz
Params database has 87 entries
Box64 with Dynarec v0.3.1 875a2ef3 built on Aug 28 2024 06:26:30
BOX64: Detected 48bits at least of address space
Counted 19 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/
Looking for /home/user/wine/bin/wineserver
Rename process to "wineserver"
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libutil.so.1
Using native(wrapped) libresolv.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
Error: Symbol res_query not found, cannot apply R_386_JMP_SLOT 0x60b04020 (0x10b6) in /home/user/wine/lib/wine/i386-unix/dnsapi.so
Error: relocating Plt symbols in elf dnsapi.so
̀ ``
Do you have any idea where this is coming from? (Btw `i386` in `/home/user/wine/lib/wine/i386-unix` looks strange - should this not be arm?)

tobiasdiez avatar Aug 29 '24 11:08 tobiasdiez

And another (potential) issue:

$ box64 /home/user/wine/bin/wine64 "echo"
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 PageSize:4096 Running on Neoverse-N1 with 2 Cores
Will use Hardware counter measured at 25.0 MHz emulating 3.2 GHz
Params database has 87 entries
Box64 with Dynarec v0.3.1 875a2ef3 built on Aug 28 2024 06:26:30
BOX64: Wine64 detected, WINEPRELOADRESERVE=""
BOX64: Detected 48bits at least of address space
WINE prereserve of 0x10000:0x8000 done
WINE prereserve of 0x110000:0x30000000 done
WINE prereserve of 0x7f000000:0x3000000 done
Counted 16 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/
Looking for /home/user/wine/bin/wine64
Apply RC params for wine64
Applying BOX64_MAXCPU=64
argv[1]="echo"
Rename process to "wine64"
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libutil.so.1
Using native(wrapped) libresolv.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
Using emulated /home/user/wine/bin/../lib64/wine/x86_64-unix/ntdll.so
Using emulated /lib/x86_64-linux-gnu/libunwind.so.8
Using native(wrapped) liblzma.so.5
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 PageSize:4096 Running on Neoverse-N1 with 2 Cores
Will use Hardware counter measured at 25.0 MHz emulating 3.2 GHz
Params database has 87 entries
Box64 with Dynarec v0.3.1 875a2ef3 built on Aug 28 2024 06:26:30
BOX64: Wine64 detected, WINEPRELOADRESERVE=""
BOX64: Detected 48bits at least of address space
WINE prereserve of 0x10000:0x8000 done
WINE prereserve of 0x110000:0x30000000 done
WINE prereserve of 0x7f000000:0x3000000 done
Counted 17 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/
Looking for /home/user/wine/bin/wine64
Apply RC params for wine64
Applying BOX64_MAXCPU=64
argv[1]="echo"
Rename process to "wine64"
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libutil.so.1
Using native(wrapped) libresolv.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
Using emulated /home/user/wine/bin/../lib64/wine/x86_64-unix/ntdll.so
Using emulated /lib/x86_64-linux-gnu/libunwind.so.8
Using native(wrapped) liblzma.so.5
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 PageSize:4096 Running on Neoverse-N1 with 2 Cores
Will use Hardware counter measured at 25.0 MHz emulating 3.2 GHz
Params database has 87 entries
Box64 with Dynarec v0.3.1 875a2ef3 built on Aug 28 2024 06:26:30
BOX64: Detected 48bits at least of address space
Counted 17 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/
Looking for /home/user/wine/bin/wineserver
Rename process to "wineserver"
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libutil.so.1
Using native(wrapped) libresolv.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0
wine: '/home/user/.wine' is a 32-bit installation, it cannot support 64-bit applications.

tobiasdiez avatar Aug 29 '24 11:08 tobiasdiez

I've fixed the issues above in https://github.com/linrol/docker-wine/pull/1 @linrol please have a look if you are okay with these changes! Thanks

tobiasdiez avatar Sep 06 '24 10:09 tobiasdiez

Thanks @linrol!

tobiasdiez avatar Sep 09 '24 10:09 tobiasdiez