zsh-users
 help / color / mirror / code / Atom feed
From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: "Vadim A. Misbakh-Soloviov" <mva@mva.name>
Cc: zsh-users@zsh.org
Subject: Re: zsh/pcre module breakage when static build enabled
Date: Tue, 20 Mar 2018 22:15:51 -0400	[thread overview]
Message-ID: <20180321021551.GA5797@tower.spodhuis.org> (raw)
In-Reply-To: <3473799.7LEjvMZMrB@note>

On 2018-03-20 at 12:16 +0700, Vadim A. Misbakh-Soloviov wrote:
> # yeah, even with double `disable-dynamic like in yours)

Sorry, mistake caused by tiredness.

The separate install steps were because I couldn't be bothered to
install the YODL suite of tools in that jail, so skipped the doc stages.

> Then I called ./Src/zsh -f, and...
> 
> note%  setopt rematchpcre
> note%  [[ 'foo→bar' =~ .([^[:ascii:]]). ]]; print $MATCH
> zsh: module `zsh/pcre' has no such feature: `C:pcre-match'
> zsh: -pcre-match not available for regex
> 
> So, it seems, it is either somehow related to linux only, or to libpcre 
> version, maybe...

I just built zsh on Ubuntu Xenial with PCRE packages from 2:8.38-3.1,
and could not reproduce.

I think the only way to get this failure is if PCRE support wasn't
actually built in, and the pcre module became a stub.  Easiest way to
check for that is to look at the HAVE_* values in config.h:

    % grep HAVE_PCRE_ config.h
    #define HAVE_PCRE_COMPILE 1
    #define HAVE_PCRE_EXEC 1
    #define HAVE_PCRE_H 1
    #define HAVE_PCRE_STUDY 1

The build flow requires that you enable the flag, and that
`pcre-config --version` exits successfully.

Are you missing a build dependency?

If you examine the file `config.log` and look for `pcre` then you should
see what checks the configure system ran and what the results were,
which may help with tracing down when things have gone wrong.

There may still be a bug in zsh, or some failure mode which can be
handled more gracefully, but we'll need to know what's actually failing
first.

Hrm, perhaps `--build-require-all-enables` or something for the
`configure` script could have the build system go "hey, you enabled
PCRE, but I'm not going to enable it for $reasons, so that's a fatal
error".  Mechanism: config.h would #define `SHOULD_ERROR_IF_ENABLED` and
`ENABLE_REQUESTED_FOO` for each FOO, and then the #if guard in/around
the relevant modules would just have an `#else if
defined(SHOULD_ERROR_IF_ENABLED) && defined(ENABLE_REQUESTED_FOO)`
followed by `# error whatever` just at the end.

-Phil


  reply	other threads:[~2018-03-21  2:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19 17:33 Vadim A. Misbakh-Soloviov
2018-03-19 23:42 ` Phil Pennock
2018-03-20  5:02   ` Vadim A. Misbakh-Soloviov
2018-03-20  5:16   ` Vadim A. Misbakh-Soloviov
2018-03-21  2:15     ` Phil Pennock [this message]
2018-03-25  6:04       ` Vadim A. Misbakh-Soloviov
2018-03-25  6:25         ` Vadim A. Misbakh-Soloviov
2018-03-25 19:50           ` Bart Schaefer
2018-03-26  2:53             ` Vadim A. Misbakh-Soloviov
2018-03-26  5:37             ` Phil Pennock
2018-03-26  8:16               ` Vadim A. Misbakh-Soloviov
2018-03-26  9:41                 ` Vadim A. Misbakh-Soloviov
2018-03-19 18:13 Vadim A. Misbakh-Soloviov

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=20180321021551.GA5797@tower.spodhuis.org \
    --to=zsh-workers+phil.pennock@spodhuis.org \
    --cc=mva@mva.name \
    --cc=zsh-users@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).