ptitSeb / box64

Box64 - Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices

Home Page:https://box86.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RAR stdout lost

Tritonio opened this issue · comments

I built and installed this:

$ box64 --version
 PageSize:4096 Running on Cortex-A72 with 4 Cores
Will use time-based emulation for rdtsc, even if hardware counter are available
Will use Software counter measured at 1.0 GHz emulating 2.0 GHz
Params database has 69 entries
Box64 v0.2.8  built on Jun  9 2024 01:29:13

but when I run RAR for 64 bit Linux, it runs correctly (I've been able to compress files for example) but the stdout seems to be lost. Instead I get something like this in the output:

$ box64 rar
 PageSize:4096 Running on Cortex-A72 with 4 Cores
Will use time-based emulation for rdtsc, even if hardware counter are available
Will use Software counter measured at 1.0 GHz emulating 2.0 GHz
Params database has 69 entries
Box64 v0.2.8  built on Jun  9 2024 01:29:13
BOX64: Didn't detect 48bits of address space, considering it's 39bits
Counted 36 Env var
BOX64 LIB PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/:/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/
BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/bin/:/usr/sbin/:/sbin/:/bin/:/usr/lib/jvm/default-jdk/bin/:/usr/lib/jvm/default-jre/bin/:/home/user/bin/:/usr/local/go/bin/:/home/user/bin/:/usr/local/go/bin/
Looking for rar
Rename process to "rar"
Using emulated /lib/x86_64-linux-gnu/libstdc++.so.6
Using native(wrapped) libm.so.6
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
Using native(wrapped) libpthread.so.0
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libdl.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using native(wrapped) libbsd.so.0

and that's all, no stdout from the rar command itself.

IIRC, rar use widechar on it's stdout. But on linux, you "choose" to use widechar on not when 1st writing to stdout. But here, box64 write to stdout, not using widechar, and then rar tries to, but fail because non-widechar has already been selected.
Use BOX64_LOG=0 and BOX64_NOBANNER=1 to completly silence box, and it should work as expected.

You're legend.
BOX64_LOG=0 BOX64_NOBANNER=1 box64 rar
worked perfectly.