ptitSeb / box64

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

Can it work on android? Aarch64 #64

Open klaxons1 opened 3 years ago

ptitSeb commented 3 years ago

Not directly for now. But it can run on proot/termux/whatever solution to get linux on android.

klaxons1 commented 3 years ago

But porting to android in your ToDo?

leap0x7b commented 3 years ago

I tried to compile box64 inside termux in my aarch64 phone, and i got a lot of errors from clang. One of them was use of undeclared identifier 'info'

ptitSeb commented 3 years ago

I haven't tried building box64 with clang. Can you use gcc instead?

leap0x7b commented 3 years ago

I haven't tried building box64 with clang. Can you use gcc instead?

I tried using gcc from it's pointless repo, but cmake fails, it might be related to this issue: termux/termux-packages#6960

Screenshot_20210801-214440

leap0x7b commented 3 years ago

The only way I can bypass this is by replacing the line include(Platform/Android/abi-${CMAKE_ANDROID_ARCH_ABI}-GNU) with include(Platform/Android/abi-arm64-v8a-GNU) on $PREFIX/share/cmake-3.21/Modules/Platform/Android-GNU.cmake. And surprisingly enough, there isn't as many errors in GCC compared to Clang, but still, it can't be compiled on Termux until there's some patch to make it work on Termux

Screenshot_20210802-110427

leap0x7b commented 3 years ago

There's this video but it uses proot https://youtu.be/TMV3Fp5YhTs

leap0x7b commented 3 years ago

I want to make it work on native termux, not just in a prooted linux distro

leap0x7b commented 3 years ago

Also why is this issue closed? Can someone reopen it again?

ptitSeb commented 3 years ago

I have reopenned the issue. The issue is not realy cland/gcc here. It's Android. I didn't noticed this was the "Android" ticket. If you look at box86, the Android build has a lot of #ifdef'd parts, because Android is not 100% linux.

oxr463 commented 2 years ago

See also: https://github.com/termux/termux-packages/issues/7672

ptitSeb commented 1 year ago

Box64 now have a ANDROID build profile, like box86. With this profile, box64 should be able to build with android NDK and run Android x86_64 binary (not linux x86_64 binary), like box86.

This build is untested, as Android support is minimum (it build, that's all that is checked)

rajdakin commented 2 months ago

Can this be closed now?