ptitSeb / box64

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

More wrapped functions are required to run xterm #1990

Open jserv opened 1 day ago

jserv commented 1 day ago

When attempting to run xterm on a Debian unstable system with x86-64 architecture using box64, the emulation encountered multiple symbol resolution issues in the Xaw library. Specifically, box64 failed to find and correctly map several global symbols required by libXaw.so.7, including:

Error: Global Symbol XmuCvtStringToShapeStyle not found, cannot apply R_X86_64_GLOB_DAT @0x3f00268dc0 ((nil)) in /lib/x86_64-linux-gnu/libXaw.so.7
Error: Global Symbol XmuCvtStringToBackingStore not found, cannot apply R_X86_64_GLOB_DAT @0x3f00268dd8 ((nil)) in /lib/x86_64-linux-gnu/libXaw.so.7
Error: Global Symbol XmuCvtStringToBitmap not found, cannot apply R_X86_64_GLOB_DAT @0x3f00268de8 ((nil)) in /lib/x86_64-linux-gnu/libXaw.so.7
Error: Global Symbol _XA_COMPOUND_TEXT not found, cannot apply R_X86_64_GLOB_DAT @0x3f00268df8 ((nil)) in /lib/x86_64-linux-gnu/libXaw.so.7
Error: Global Symbol constraintWidgetClass not found, cannot apply R_X86_64_GLOB_DAT @0x3f00268e10 ((nil)) in /lib/x86_64-linux-gnu/libXaw.so.7
Error: Symbol constraintWidgetClass not found, cannot apply R_X86_64_64 @0x3f00269cd0 ((nil)) in /lib/x86_64-linux-gnu/libXaw.so.7
Error: Global Symbol _XA_CHARACTER_POSITION not found, cannot apply R_X86_64_GLOB_DAT @0x3f00268e20 ((nil)) in /lib/x86_64-linux-gnu/libXaw.so.7
...

To successfully emulate the Xaw library, box64 requires additional function wrappers to be implemented, ensuring comprehensive symbol resolution and compatibility across different architectural environments.

ptitSeb commented 1 day ago

Maybe it would be easier to just wrap libXaw.so.7 instead?

jserv commented 1 day ago

Maybe it would be easier to just wrap libXaw.so.7 instead?

I am interested in developing wrappers for libXaw.so.7 to resolve the symbol mapping issues preventing xterm from running under box64, but I am uncertain about how to identify the required symbols and implement the necessary wrapping process.

Could you provide a detailed guide to approach this library wrapping challenge?

ptitSeb commented 1 day ago

Youc an start with https://box86.org/2024/02/how-to-create-a-wrapping/

There is also the new wrapperhelper that can help a lot.

ksco commented 1 day ago

Out of curiosity, what's the use case to run xterm with box64 on an x86_64 machine?