Box64 On Android
The Android device is faster than another arm64 devices(like respiberry 4B).
So we can make a branch for android.
There are some errors to fix :
1 . STB_GNU_UNIQUE , (ptitSeb is trying to fix it).
2 .
struct __jmp_buf_tag , It's a bug for Android NDK. So should I change <setjmp.h> and add these following lines ? (I didn't check)
{
/* NOTE: The machine-dependent definitions of __sigsetjmp'
assume that a jmp_buf' begins with a __jmp_buf' and that
__mask_was_saved' follows it. Do not move these members
or add others before it. */
jmp_buf __jmpbuf; /* Calling environment. */
int __mask_was_saved; /* Saved the signal mask? */
sigset_t __saved_mask; /* Saved signal mask. */
};
//I collected it form GLIBC sources code.
3. Another wrongs...
I can't settle someone of them. @ptitSeb Can you see them?
Android has different standard C library implementation from Linux (Bionic). However, you can compile box86/64 without much problems using proot-distro and installing ubuntu.
Android has different standard C library implementation from Linux (Bionic). However, you can compile box86/64 without much problems using proot-distro and installing ubuntu.
Thanks!
Android设备比其他arm64设备(如呼吸4B)更快。因此,我们可以为Android创建一个分支。有一些错误需要修复:1 。STB_GNU_UNIQUE ,(ptitSeb 正试图修复它)。 阿拉伯数字。结构__jmp_buf_tag,是安卓NDK的一个bug。那么我应该更改<setjmp.h>并添加以下行吗?(我没有检查) 2.另一个错误...我无法解决其中的某个人。你能看到他们吗?
{ /* NOTE: The machine-dependent definitions of __sigsetjmp' assume that a jmp_buf' begins with a __jmp_buf' and that __mask_was_saved' follows it. Do not move these members or add others before it. */ jmp_buf __jmpbuf; /* Calling environment. */ int __mask_was_saved; /* Saved the signal mask? */ sigset_t __saved_mask; /* Saved signal mask. */ }; //I collected it form GLIBC sources code.
#define STB_GNU_UNIQUE 10
we can use this?
Android设备比其他arm64设备(如呼吸4B)更快。因此,我们可以为Android创建一个分支。有一些错误需要修复:1 。STB_GNU_UNIQUE ,(ptitSeb 正试图修复它)。 阿拉伯数字。结构__jmp_buf_tag,是安卓NDK的一个bug。那么我应该更改<setjmp.h>并添加以下行吗?(我没有检查) 2.另一个错误...我无法解决其中的某个人。你能看到他们吗?
{ /* NOTE: The machine-dependent definitions of __sigsetjmp' assume that a jmp_buf' begins with a __jmp_buf' and that __mask_was_saved' follows it. Do not move these members or add others before it. */ jmp_buf __jmpbuf; /* Calling environment. */ int __mask_was_saved; /* Saved the signal mask? */ sigset_t __saved_mask; /* Saved signal mask. */ }; //I collected it form GLIBC sources code.#define STB_GNU_UNIQUE 10we can use this?
I doubt this simple define would be enough to build box64 on android. Look at the android build of box86 and you'll see there is much more than just that.
If box64 runs on Android and Android doesn't have STB_GNU_UNIQUE, why do we need to use it on Android?
Android设备比其他arm64设备(如呼吸4B)更快。因此,我们可以为Android创建一个分支。有一些错误需要修复:1 。STB_GNU_UNIQUE ,(ptitSeb 正试图修复它)。阿拉伯数字。结构__jmp_buf_tag,是安卓NDK的一个bug。那么我应该更改<setjmp.h>并添加以下行吗?(我没有检查) 2.另一个错误...我无法解决其中的某个人。你能看到他们吗?
{ /* NOTE: The machine-dependent definitions of __sigsetjmp' assume that a jmp_buf' begins with a __jmp_buf' and that __mask_was_saved' follows it. Do not move these members or add others before it. */ jmp_buf __jmpbuf; /* Calling environment. */ int __mask_was_saved; /* Saved the signal mask? */ sigset_t __saved_mask; /* Saved signal mask. */ }; //I collected it form GLIBC sources code.#define STB_GNU_UNIQUE 10我们可以用这个吗?
我怀疑这个简单的定义是否足以在 android 上构建 box64。看看box86的android版本,你会发现还有更多的东西。
https://chromium.googlesource.com/arc/arc/+/0b22b18d4555ffb85b2bfb18ef3ecc73a9e61c5a/mods/android/bionic/linker/linker.cpp:668
I don't find STB_GNU_UNIQUE and something like it in android libc++. It seems to exist only in the gcc toolchain.
I don't find STB_GNU_UNIQUE and something like it in android libc++. It seems to exist only in the gcc toolchain.
I think it is unnecessary since we have the proot/chroot linux containers. ( Another reason is that I don't have so much knowledge about porting a C runtime ,especially glibc, so maybe I can't help on coding.I am sorry about this. )
If we tried to make box64 work on android,Is it worth for us to add the libc wrapper? (Android blocked most of the syscall that glibc will use by using seccomp).
So,I closed the issue two years ago.