rmyorston / busybox-w32

WIN32 native port of BusyBox.
https://frippery.org/busybox
Other
693 stars 126 forks source link

Does it Support Windows on ARM #380

Closed PeronGH closed 8 months ago

PeronGH commented 10 months ago

The x86_64 version on Windows on ARM crashes often. Running commands like arch or cd a directory with denied permissions can cause crash.

So I attempted to build an arm64 version, but I got:

$ make menuconfig
make: (makefile:43): unexpected endif
~/Code/GitHub/busybox-w32 $ make.exe menuconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/split-include
  HOSTCC  scripts/basic/docproc
scripts/basic/docproc.c:170:51: warning: explicitly assigning value of variable of type 'char *' to itself
      [-Wself-assign]
  170 | void adddep2(char * file, char * line)     { line = line; adddep(file); }
      |                                              ~~~~ ^ ~~~~
scripts/basic/docproc.c:171:39: warning: explicitly assigning value of variable of type 'char *' to itself
      [-Wself-assign]
  171 | void noaction(char * line)                 { line = line; }
      |                                              ~~~~ ^ ~~~~
scripts/basic/docproc.c:172:51: warning: explicitly assigning value of variable of type 'char *' to itself
      [-Wself-assign]
  172 | void noaction2(char * file, char * line)   { file = file; line = line; }
      |                                              ~~~~ ^ ~~~~
scripts/basic/docproc.c:172:64: warning: explicitly assigning value of variable of type 'char *' to itself
      [-Wself-assign]
  172 | void noaction2(char * file, char * line)   { file = file; line = line; }
      |                                                           ~~~~ ^ ~~~~
4 warnings generated.
  GEN     include/applets.h
  GEN     include/usage.h
  GEN     applets/Kbuild
  GEN     archival/Kbuild
  GEN     archival/Config.in
  GEN     archival/libarchive/Kbuild
  GEN     console-tools/Kbuild
  GEN     console-tools/Config.in
  GEN     coreutils/Kbuild
  GEN     coreutils/Config.in
  GEN     coreutils/libcoreutils/Kbuild
  GEN     debianutils/Kbuild
  GEN     debianutils/Config.in
  GEN     e2fsprogs/Kbuild
  GEN     e2fsprogs/Config.in
  GEN     editors/Kbuild
  GEN     editors/Config.in
  GEN     findutils/Kbuild
  GEN     findutils/Config.in
  GEN     init/Kbuild
  GEN     init/Config.in
  GEN     klibc-utils/Kbuild
  GEN     klibc-utils/Config.in
  GEN     libbb/Kbuild
  GEN     libbb/Config.in
  GEN     libpwdgrp/Kbuild
  GEN     loginutils/Kbuild
  GEN     loginutils/Config.in
  GEN     mailutils/Kbuild
  GEN     mailutils/Config.in
  GEN     miscutils/Kbuild
  GEN     miscutils/Config.in
  GEN     modutils/Kbuild
  GEN     modutils/Config.in
  GEN     networking/Kbuild
  GEN     networking/Config.in
  GEN     networking/libiproute/Kbuild
  GEN     networking/udhcp/Kbuild
  GEN     networking/udhcp/Config.in
  GEN     printutils/Kbuild
  GEN     printutils/Config.in
  GEN     procps/Kbuild
  GEN     procps/Config.in
  GEN     runit/Kbuild
  GEN     runit/Config.in
  GEN     scripts/Kbuild
  GEN     scripts/kconfig/libcurses/Kbuild
  GEN     selinux/Kbuild
  GEN     selinux/Config.in
  GEN     shell/Kbuild
  GEN     shell/Config.in
  GEN     sysklogd/Kbuild
  GEN     sysklogd/Config.in
  GEN     util-linux/Kbuild
  GEN     util-linux/Config.in
  GEN     util-linux/volume_id/Kbuild
  GEN     util-linux/volume_id/Config.in
  GEN     win32/resources/Kbuild
make: *** [Makefile:380: gen_build_files] Error -1073741569
$ make.exe
make: *** [Makefile:802: .kernelrelease] Error -1073741569

I'm wondering if it supports Windows on ARM or has any plan to support arm64? If it can be compiled for arm64, can there be a prebuilt binary on the website?

avih commented 10 months ago

[-Wself-assign] 170 | void adddep2(char file, char line) { line = line; adddep(file); } | ~~ ^ ~~

I think these warnings are unrelated to arm and are related to using clang. I've noticed these warnings (and then same/similar build failure) using clang to build x86-64 too (happens with both msvcrt and ucrt).

I think the issue is with generating some files during the build (the assign to self thing is not the cause of the failure).

rmyorston commented 10 months ago

There's no current support for busybox-w32 on Windows on ARM and no immediate plan to introduce it.

Let's see what the future brings...

avih commented 10 months ago

I think first step should be to build using clang for x86/64. I got the same warnings and gen errors with clang on windows, though on linux (for linux) clang does get past the gen stage (but does have th same self-assign warnigns) and then completes the build successfuly.

So first step should be IMO to make clang build of busybox-w32 to get past the gen stage.

I've tried llvm-mingw and winlibs, both ucrt and msvcrt and the clang build always fails at the gen stage.

rmyorston commented 9 months ago

A prerelease binary for Windows on ARM is now available, as described here.

It might not work ;-)

rmyorston commented 8 months ago

A Windows on ARM binary is available in the current release.