Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Make --disable-multibyte warn, since the test suite fails in that configuration. (was: Re: Test failures in --disable-multibyte)

Peter Stephenson wrote on Fri, Jan 03, 2020 at 10:15:51 +0000:
> On Thu, 2020-01-02 at 11:30 +0000, Daniel Shahaf wrote:
> > A build-time warning, then?  I.e., have configure warn if --disable-multibyte
> > is selected (manually or automatically), or perhaps use a #warning at
> > the C level.  It could say something to the effect of "Compiling without
> > multibyte support is known not to pass 'make test'.  We recommend to
> > rebuild with --enable-multibyte.  Alternatively, fix the test suite and
> > send us the patches".
> > 
> > This will at least make the issue known to anyone who tries to disable
> > multibyte support for whatever reason.
> It sounds like a pretty sensible idea to mention this at the end of the
> configure output, where there are a couple of other messages for issues
> (typically linking but anything configuration related would seem to be
> appropriate).

Here's a draft.  Probably needs wordsmithing.


(This patch was written on top of the gdbm patch I just posted, but they
can be applied independently of each other.)

diff --git a/configure.ac b/configure.ac
index 256584538..cd42a789e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2553,6 +2553,7 @@ wmemcpy wmemmove wmemset; do
       AC_MSG_NOTICE([all functions found, multibyte support enabled])
+      # Warns at the end of configure
       AC_MSG_NOTICE([missing functions, multibyte support disabled])
@@ -3299,4 +3300,16 @@ fi
 echo "See config.modules for installed modules and functions.
+if test x$zsh_cv_c_unicode_support != xyes; then
+  if test "x$zfuncs_absent" = x; then
+    # The user opted out.
+    AC_MSG_WARN([You have chosen to build without multibyte support.])
+    AC_MSG_WARN([This configuration may not be suitable for production use. It is known to cause errors in 'make test'. We strongly recommend to re-run configure with --enable-multibyte.])
+  else
+    # Some requisite functions are missing.
+    AC_MSG_WARN([Multibyte support disabled due to missing functions: $zfuncs_absent])
+    AC_MSG_WARN([Building without multibyte support is strongly discouraged and may cause errors in 'make test'.])
+  fi
 exit 0

Messages sorted by: Reverse Date, Date, Thread, Author