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

--enable-pcre doesn't fail when not supported / zsh should switch to PCRE2



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@xxxxxxxxxx> - 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)




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