ptitSeb / box64

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

Adding a library to emulate #512

Open DotJARgon opened 1 year ago

DotJARgon commented 1 year ago

I am currently experimenting with a barebones libcef project, and seeing if I can get an app to at least open instead of crash, I have the libcef.so, however I cannot seem to figure out how to get box64 to emulate it. Is there any specific way I would have to direct to either its directory or location?

ptitSeb commented 1 year ago

You mean, you built an Aarch64 version of libcef and you want box64 to use it instead of an x86_64 one?

That mean all exported functions have to be wrapped. But, libcef is C++ library, not a C library. That means Virtual Table also have to be emulated. That means a lot of mecanism that are not in place in box for now (and C++ library easily have thousand of function entry). This is not something I plan to explore, it's way to complex and way too much work. Also, I'm pretty sure libcef is evolving a lot, so it would never be the "right" version.

What you can do if you want to help is, based on a software that is not working with libcef is: build an x86_64 version of libcef that works with that software but with debug symbol, to identify more easily where the issue happens, and with the helps of the sources, understand why it happens so the root cause can be fixed in box64.

DotJARgon commented 1 year ago

Ah gotcha, and kind of, not one I built myself, but it is an aarch64 minimal version of libcef that is enough to get a window open, I have been having an issue with one game, TF2, and I thought the issue had to do with libcef/chromium, since the error crops up right before it loads, with an error that states there was a timeout with chrome_ipc_client. I'm not sure however.