Opened 3 years ago

Closed 3 years ago

#5019 closed enhancement (fixed)

Add support for pcre2

Reported by: Bas Couwenberg Owned by: pramsey
Priority: medium Milestone: PostGIS 3.2.0
Component: pagc_address_parser Version: master
Keywords: Cc:

Description

PostGIS currently requires the deprecated PCRE library (pcre.h), as used by the Debian package via libpcre3-dev.

The maintainer of the pcre3 package in Debian intends to remove it in favour of pcre2 (pcre2.h), because upstream is increasingly unwilling to fix issues in the old PCRE library, see: https://lists.debian.org/debian-devel/2021/11/msg00176.html

PostGIS currently only supports the PCRE API, it should also support the PCRE2 API in the address_standardizer extension.

Change History (11)

comment:1 by robe, 3 years ago

Component: postgispagc_address_parser
Owner: changed from pramsey to robe

I vaguely remember starting to do this before and forget if I ran into any issues trying. I'm surprised we don't have this ticketed already as I recall it being brought up several years ago.

comment:2 by pramsey, 3 years ago

First swing at this (untested) here https://github.com/pramsey/postgis/tree/master-pcre2

comment:3 by pramsey, 3 years ago

This branch now passes the regressions in the address_standardizer directory. (yay) Want to do any further testing before I merge?

comment:4 by robe, 3 years ago

Just merge.

comment:5 by Bas Couwenberg, 3 years ago

Assuming this gets into 3.2.0-beta2 it will get tested with the updated to that.

comment:6 by Paul Ramsey <pramsey@…>, 3 years ago

Resolution: fixed
Status: newclosed

In 6cf2fba/git:

Support PCRE2 where available and PCRE otherwise, closes #5019

comment:7 by robe, 3 years ago

FWIW I tested on bookworm (bookkie) with pcre2 and mingw64 windows (winnie) with pcre1 and both work fine and regress.

On winnie shows in configure output:

PCRE support:         Version 1 

On bookkie shows:

PCRE support:         Version 2

comment:8 by robe, 3 years ago

Resolution: fixed
Status: closedreopened

Okay reopening. Seems debbie is not happy. I think she only has pcre1 but she's failing on

14:26:09 configure: error: Package requirements (libpcre) were not met:
14:26:09 
14:26:09 No package 'libpcre' found
14:26:09 
14:26:09 Consider adjusting the PKG_CONFIG_PATH environment variable if you
14:26:09 installed software in a non-standard prefix.
14:26:09 

Might be something I misconfigured that this change is triggering.

comment:9 by robe, 3 years ago

okay just checked last successful runs from debbie shows no pcre enabled, but doesn't error

05:03:51  -------------- Dependencies -------------- 
05:03:51   GEOS config:          /var/lib/jenkins/workspace/geos/rel-3.10w64/bin/geos-config
05:03:51   GEOS version:         3.10.2dev
05:03:51   GDAL config:          /var/lib/jenkins/workspace/gdal/rel-3.2w64/bin/gdal-config
05:03:51   GDAL version:         3.2.3
05:03:51   SFCGAL config:        /usr/bin/sfcgal-config
05:03:51   SFCGAL version:       1.3.8
05:03:51   PostgreSQL config:    /var/lib/jenkins/workspace/pg/rel/pg9.6w64/bin/pg_config
05:03:51   PostgreSQL version:   PostgreSQL 9.6.24
05:03:51   PROJ4 version:        72
05:03:51   Libxml2 config:       /usr/bin/xml2-config
05:03:51   Libxml2 version:      2.9.12
05:03:51   JSON-C support:       yes
05:03:51   protobuf support:     yes
05:03:51   protobuf-c version:   1003003
05:03:51   PCRE support:         no
05:03:51   Perl:                 /usr/bin/perl
05:03:51 
05:03:51  --------------- Extensions --------------- 
05:03:51   PostGIS Raster:                     enabled
05:03:51   PostGIS Topology:                   enabled
05:03:51   SFCGAL support:                     enabled
05:03:51   Address Standardizer support:       disabled
05:03:51 
05:03:51  -------- Documentation Generation -------- 
05:03:51   xsltproc:             /usr/bin/xsltproc
05:03:51   xsl style sheets:     /usr/share/xml/docbook/stylesheet/docbook-xsl
05:03:51   dblatex:              /usr/bin/dblatex
05:03:51   convert:              /usr/bin/convert
05:03:51   mathml2.dtd:          /usr/share/xml/schema/w3c/mathml/dtd/mathml2.dtd

so it seems she might be the only bot not building with pcre support and we are not handling the case of no pcre

comment:10 by robe, 3 years ago

Owner: changed from robe to pramsey
Status: reopenednew

comment:11 by robe, 3 years ago

Resolution: fixed
Status: newclosed

Looks good now.

Note: See TracTickets for help on using tickets.