Issue with x64 application launch
I built box64:
[francesco@orangepi4 Projects]$ box64 -v Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL PageSize:4096 Box64 with Dynarec v0.1.7 fa07a0f built on Mar 23 2022 18:20:44
on an OrangePi4 (RK3399) running Armbian 22.02.1, without errors. Now, I'm trying to run an x64 command line utility ("upgrade_tool"):
[francesco@orangepi4 Projects]$ file upgrade_tool upgrade_tool: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=c045033bffa8866dc148b16718d8a49be47e9ecb, stripped
but unfortunately I get this error message:
[francesco@orangepi4 Projects]$ box64 upgrade_tool Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL PageSize:4096 Box64 with Dynarec v0.1.7 fa07a0f built on Mar 23 2022 18:20:44 Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/ Using default BOX64_PATH: ./:bin/ Counted 29 Env var Looking for upgrade_tool warning, call to unsupported arch_prctl(0x1002, 0x7ac24900) cannot set %fs base address for thread-local storageAnnullato (core dump creato) upgrade_tool.gz
Is there anything I can do to run my utility on the OrangePi?
Thanks,
fld2865
I'm pretty sure this is a statically linked binary, and it's not supported on box64 for now. You can probably use qemu-user to run it, it should work.
Hi ptitSeb, ok, I'll give it a try.
Thanks!!
Hmm, I'm running into the same issue here with a statically linked binary. Error message:
$ box64 ~/src/tinygo/tinygo/test
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:16384
Box64 with Dynarec v0.1.9 f19b89b built on Oct 18 2022 20:05:06
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 73 Env var
Looking for /home/ayke/src/tinygo/tinygo/test
Rename process to "test"
warning, call to unsupported arch_prctl(0x1002, 0x2041a8)
290781|BOX64: Warning, calling Signal 11 function handler SIG_DFL
Unhandled signal caught, aborting
fish: Job 1, 'build/box64 ~/src/tinygo/tinygo…' terminated by signal SIGABRT (Abort)
I'm not sure what instruction causes the issue, but I'm suspecting this code (probably in musl):
0000000000201c26 <__errno_location>:
201c26: 64 48 8b 04 25 00 00 00 00 mov rax, qword ptr fs:[0]
201c2f: 48 83 c0 34 add rax, 52
201c33: c3 ret
This is on Asahi Linux. I normally use qemu-x86_64 but that doesn't work on Asahi Linux with its 16K page size.
I can share the binary if that helps in any way.