From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26506 invoked by alias); 21 Mar 2018 02:16:15 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23266 Received: (qmail 24307 invoked by uid 1010); 21 Mar 2018 02:16:13 -0000 X-Qmail-Scanner-Diagnostics: from mx.spodhuis.org by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(94.142.241.89):SA:0(-4.2/5.0):. Processed in 13.147385 secs); 21 Mar 2018 02:16:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: zsh-workers+phil.pennock@spodhuis.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201802; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=RJWp+AyukxeGkOkJL2Tk/fNCK4v6BvXbOcerWEfcjqY=; b=V2efVnMv86KpAN1Wr5GRtTwXC0 YXUL9iAbs3ct0fXlEfRR9DsFsALO8A/NnbVN2a2vTT4V8xIxPq0fP1mHdEyrjCSjLX3MIr6JrVoWE G6wyMMlkGqOt112N95Igm8h7ZUAcNljsWwANDm6Q4SoPPkgTxoePiF4szn9YDryBgxmo9AQ4xivBG 1FwRNCY+9DmeR2miw3QXqwQSO+tn; Date: Tue, 20 Mar 2018 22:15:51 -0400 From: Phil Pennock To: "Vadim A. Misbakh-Soloviov" Cc: zsh-users@zsh.org Subject: Re: zsh/pcre module breakage when static build enabled Message-ID: <20180321021551.GA5797@tower.spodhuis.org> References: <3073701.qdQlh9y6XZ@note> <20180319234236.GA43407@tower.spodhuis.org> <3473799.7LEjvMZMrB@note> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3473799.7LEjvMZMrB@note> OpenPGP: url=https://www.security.spodhuis.org/PGP/keys/0x4D1E900E14C1CC04.asc 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