zsh-workers
 help / color / mirror / code / Atom feed
* --enable-pcre doesn't fail when not supported / zsh should switch to PCRE2
@ 2022-09-02  0:26 Vincent Lefevre
  0 siblings, 0 replies; only message in thread
From: Vincent Lefevre @ 2022-09-02  0:26 UTC (permalink / raw)
  To: zsh-workers

I've configured zsh with

  ./configure --enable-pcre --prefix=$HOME/opt/zsh-dev

but I get the following error:

zira:~,2> zmodload zsh/pcre
zsh: failed to load module `zsh/pcre': /home/vinc17/opt/zsh-dev/lib/zsh/5.9.0.1-dev/zsh/pcre.so: cannot open shared object file: No such file or directory

In config.log:

configure:6170: checking for pcre-config
configure:6205: result: no
[...]
configure:6401: checking for pcre.h
configure:6401: gcc -c  -Wall -Wmissing-prototypes -O2  conftest.c >&5
conftest.c:95:10: fatal error: pcre.h: No such file or directory
   95 | #include <pcre.h>
      |          ^~~~~~~~
compilation terminated.
[...]
configure:6401: result: no
[...]
configure:9995: checking for pcre_compile
configure:9995: gcc -o conftest  -Wall -Wmissing-prototypes -O2   conftest.c  -ldl -lncursesw -lrt -lm  -lc >&5
/usr/bin/ld: /tmp/cc9sU4eV.o: in function `main':
conftest.c:(.text.startup+0x7): undefined reference to `pcre_compile'
collect2: error: ld returned 1 exit status
configure:9995: $? = 1
[...]
/usr/bin/ld: /tmp/ccuULZbN.o: in function `main':
conftest.c:(.text.startup+0x7): undefined reference to `pcre_study'
collect2: error: ld returned 1 exit status
configure:10001: $? = 1
[...]

etc.

So, first, the configure script should have failed because of
the --enable-pcre option, meaning that one wants PCRE.

Moreover, the current PCRE version is PCRE2, and zsh should switch
to it.

https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions
says:

  In 2015 a fork of PCRE was released with a revised programming
  interface (API). The original software, now called PCRE1 (the
  1.xx–8.xx series), has had bugs mended, but no further development.
  As of 2020, it is considered obsolete, and the current 8.45 release
  is likely to be the last. The new PCRE2 code (the 10.xx series) has
  had a number of extensions and coding improvements and is where
  development takes place.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-02  0:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02  0:26 --enable-pcre doesn't fail when not supported / zsh should switch to PCRE2 Vincent Lefevre

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