zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: [PATCH] Make --disable-multibyte warn, since the test suite fails in that configuration. (was: Re: Test failures in --disable-multibyte)
Date: Fri, 3 Jan 2020 20:11:02 +0000	[thread overview]
Message-ID: <20200103201102.o7ezzd6ccxxih7fb@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <1578046551.4581.1.camel@samsung.com>

---
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.

Cheers,

Daniel
(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])
       zsh_cv_c_unicode_support=yes
     else
+      # Warns at the end of configure
       AC_MSG_NOTICE([missing functions, multibyte support disabled])
       zsh_cv_c_unicode_support=no
     fi
@@ -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
+fi
+
 exit 0

  reply	other threads:[~2020-01-03 21:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-31 18:39 Test failures in --disable-multibyte Daniel Shahaf
2019-12-31 19:46 ` Peter Stephenson
2020-01-01 13:44   ` Daniel Shahaf
2020-01-01 18:01     ` Peter Stephenson
2020-01-02 11:30       ` Daniel Shahaf
2020-01-03 10:15         ` Peter Stephenson
2020-01-03 20:11           ` Daniel Shahaf [this message]
2020-01-05 18:20             ` [PATCH] Make --disable-multibyte warn, since the test suite fails in that configuration. (was: Re: Test failures in --disable-multibyte) Peter Stephenson
2020-01-05 19:13               ` Daniel Shahaf
2020-01-06  9:44                 ` Peter Stephenson
2019-12-31 20:23 ` Test failures in --disable-multibyte dana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200103201102.o7ezzd6ccxxih7fb@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).