Building for ARM #18
Replies: 8 comments 4 replies
-
|
hmmmm..... interesting. The problem is in gnulib, maybe a link issue? An incompatibility with MinGW in ARM64 (most probably)? I will dig into that. |
Beta Was this translation helpful? Give feedback.
-
|
I know what's going on.
So, going forward, I only see two routes to include arm64 in the mix:
I prefer the second as I feel way more comfortable using Linux dev tools. This is why I used this Xcompiling toolchain to build for Windows. But , maybe it is time to fight against the problems of porting gnulib to MSVC.... Any thought? |
Beta Was this translation helpful? Give feedback.
-
|
Well, I have good news. LLVM-MinGW works better than expected. It requires some minimal changes in the PDCursesMod makefile and adding the Bcrypt lib to nano, but other than that it goes quite smooth. All the features work: mouse, full unicode, transparent background, etc. The amd64 version works well here. I can even build the arm64 version, but I can't test it since I don't have any arm64 windows hardware.. |
Beta Was this translation helpful? Give feedback.
-
|
First experimental build using Clang-UCRT-LLVM-MinGW-ld.lld toolchain for the three platforms: win32, win64, and winarm64 is now available for download as a temporal beta here: It would be nice having some testing in a Windows arm64 environment. |
Beta Was this translation helpful? Give feedback.
-
|
I tried to signup for a Windows VM, at least five or six times, on Chrome and Edge, but got nothing but error messages |
Beta Was this translation helpful? Give feedback.
-
|
I have evolved the script and made some key improvements:
Now the deliverable assets would be: Each package is about 350KB. |
Beta Was this translation helpful? Give feedback.
-
|
I am exploring a estrange behavior when building in a container vs in WSL. The differences are way more obvious for the x86_64 than for other platforms.
The problem is that the output is different. Using the same packages, and removing This is the diff result from container to the WSL version of -#define NEED_PRINTF_FLAG_GROUPING 1
+/* #undef NEED_PRINTF_FLAG_GROUPING */
/* Define if the vasnprintf implementation needs special code for the '-'
flag. */
@@ -1443,11 +1443,11 @@
/* Define if the vasnprintf implementation needs special code for the 0 flag.
*/
-#define NEED_PRINTF_FLAG_ZERO 1
+/* #undef NEED_PRINTF_FLAG_ZERO */
/* Define if the vasnprintf implementation needs special code for infinite
'double' arguments. */
-#define NEED_PRINTF_INFINITE_DOUBLE 1
+/* #undef NEED_PRINTF_INFINITE_DOUBLE */
/* Define if the vasnprintf implementation needs special code for infinite
'long double' arguments. */
@@ -1459,7 +1459,7 @@
/* Define if the vasnprintf implementation needs special code for supporting
large precisions without arbitrary bounds. */
-#define NEED_PRINTF_UNBOUNDED_PRECISION 1
+/* #undef NEED_PRINTF_UNBOUNDED_PRECISION */
/* Define this if you need the _XOPEN_SOURCE_EXTENDED macro for color support.
*/
@@ -1793,7 +1793,7 @@
/* Define to rpl_ if the getopt replacement functions and variables should be
used. */
-#define __GETOPT_PREFIX rpl_
+/* #undef __GETOPT_PREFIX */
/* Define to 1 on platforms where this makes time_t a 64-bit type. */
/* #undef __MINGW_USE_VC2005_COMPAT */
--- nanoc/Makefile
+++ nanow/Makefile
@@ -354,8 +354,8 @@
FLOAT_H =
FNMATCH_H = fnmatch.h
GETLOGIN_LIB = -ladvapi32
-GETOPT_CDEFS_H = getopt-cdefs.h
-GETOPT_H = getopt.h
+GETOPT_CDEFS_H =
+GETOPT_H =
GETRANDOM_LIB = -lbcrypt
GETTEXT_MACRO_VERSION = 0.18
GLOB_H = glob.h
@@ -759,7 +759,7 @@
GL_GNULIB_TRUNCL = 0
GL_GNULIB_TTYNAME_R = 0
GL_GNULIB_TZSET = 0
-GL_GNULIB_UNISTD_H_GETOPT = 1
+GL_GNULIB_UNISTD_H_GETOPT = 0
GL_GNULIB_UNISTD_H_NONBLOCKING = 0
GL_GNULIB_UNISTD_H_SIGPIPE = 0
GL_GNULIB_UNLINK = 0
@@ -1140,7 +1140,7 @@
HAVE_SYMLINK = 1
HAVE_SYMLINKAT = 1
HAVE_SYS_BITYPES_H = 0
-HAVE_SYS_CDEFS_H = 1
+HAVE_SYS_CDEFS_H =
HAVE_SYS_INTTYPES_H = 0
HAVE_SYS_LOADAVG_H = 0
HAVE_SYS_PARAM_H = 0
@@ -1425,9 +1425,9 @@
REPLACE_FREE = 1
REPLACE_FREELOCALE = 0
REPLACE_FREOPEN = 0
-REPLACE_FREXP = 1
+REPLACE_FREXP = 0
REPLACE_FREXPF = 0
-REPLACE_FREXPL = 1
+REPLACE_FREXPL = 0
REPLACE_FSEEK = 0
REPLACE_FSEEKO = 0
REPLACE_FSTAT = 1
@@ -1699,9 +1699,9 @@
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
-gl_LIBOBJDEPS = ./$(DEPDIR)/asnprintf.Po ./$(DEPDIR)/fnmatch.Po ./$(DEPDIR)/frexp.Po ./$(DEPDIR)/frexpl.Po ./$(DEPDIR)/malloc.Po ./$(DEPDIR)/mbsrtowcs-state.Po ./$(DEPDIR)/printf-args.Po ./$(DEPDIR)/printf-parse.Po ./$(DEPDIR)/realloc.Po ./$(DEPDIR)/snprintf.Po ./$(DEPDIR)/stat-w32.Po ./$(DEPDIR)/strcasestr.Po ./$(DEPDIR)/vasnprintf.Po ./$(DEPDIR)/vsnprintf.Po
-gl_LIBOBJS = asnprintf.o fnmatch.o frexp.o frexpl.o malloc.o mbsrtowcs-state.o printf-args.o printf-parse.o realloc.o snprintf.o stat-w32.o strcasestr.o vasnprintf.o vsnprintf.o
-gl_LTLIBOBJS = asnprintf.lo fnmatch.lo frexp.lo frexpl.lo malloc.lo mbsrtowcs-state.lo printf-args.lo printf-parse.lo realloc.lo snprintf.lo stat-w32.lo strcasestr.lo vasnprintf.lo vsnprintf.lo
+gl_LIBOBJDEPS = ./$(DEPDIR)/asnprintf.Po ./$(DEPDIR)/fnmatch.Po ./$(DEPDIR)/malloc.Po ./$(DEPDIR)/mbsrtowcs-state.Po ./$(DEPDIR)/printf-args.Po ./$(DEPDIR)/printf-parse.Po ./$(DEPDIR)/realloc.Po ./$(DEPDIR)/snprintf.Po ./$(DEPDIR)/stat-w32.Po ./$(DEPDIR)/strcasestr.Po ./$(DEPDIR)/vasnprintf.Po ./$(DEPDIR)/vsnprintf.Po
+gl_LIBOBJS = asnprintf.o fnmatch.o malloc.o mbsrtowcs-state.o printf-args.o printf-parse.o realloc.o snprintf.o stat-w32.o strcasestr.o vasnprintf.o vsnprintf.o
+gl_LTLIBOBJS = asnprintf.lo fnmatch.lo malloc.lo mbsrtowcs-state.lo printf-args.lo printf-parse.lo realloc.lo snprintf.lo stat-w32.lo strcasestr.lo vasnprintf.lo vsnprintf.lo
gltests_LIBOBJDEPS =
gltests_LIBOBJS =
gltests_LTLIBOBJS =Obviously, the extra requirements for the containerized version require extra code. The result is a 2KB bytes less code for the WSL version. The question is, why do those tests fail during the configuration process in the container and not in WSL ???? |
Beta Was this translation helpful? Give feedback.
-
|
The pre-release with the heavily improved toolchain and the first version for ARM is in the release section. https://github.com/okibcn/nano-for-windows/releases/tag/v7.2-13.1 |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
I patched Xbuild4Windows.yml to build on ARM64,
but am getting the error
../../../lib/stat-time.h:51:43: error: invalid use of undefined type ‘const struct _stati64’athttps://github.com/rasa/nano-for-windows/actions/runs/4205780215/jobs/7298354041#step:8:2186
I thought the issue is in the curses code, but it builds fine for arm/arm64 via https://github.com/rasa/PDCursesMod/blob/master/.github/workflows/github_actions_build_windows.yml
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions