php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76256 Configure doesn't find external pcre2
Submitted: 2018-04-23 18:27 UTC Modified: 2018-04-29 00:04 UTC
From: pprkut at slackware dot com Assigned: cmb (profile)
Status: Closed Package: *Compile Issues
PHP Version: master-Git-2018-04-23 (Git) OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pprkut at slackware dot com
New email:
PHP Version: OS:

 

 [2018-04-23 18:27 UTC] pprkut at slackware dot com
Description:
------------
Configure doesn't work when building with --with-pcre-regex=/usr:

checking for PCRE headers location... /usr/include
checking for PCRE library location... configure: error: Could not find libpcre2.(a|so) in /usr

The problem is that there is no libpcre2.so on my system (slackware linux). I have these options:

/usr/lib64/libpcre2-16.so
/usr/lib64/libpcre2-32.so
/usr/lib64/libpcre2-8.so
/usr/lib64/libpcre2-posix.so

I checked arch and fedora and libpcre2.so doesn't appear to be a thing there either.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-04-23 21:14 UTC] cmb@php.net
It seems that Debian handles this analogously[1].  Since PHP
requires the 8-bit version[2], we'd have to change (or extend?)
the respective check[3]:

  test -f $j/libpcre2-8.a || test -f $j/libpcre2-8.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j

[1] <https://packages.debian.org/sid/i386/libpcre2-dev/filelist>
[2] <https://github.com/php/php-src/blob/703e0370905bc432aa26d71803b3081851e99230/ext/pcre/config0.m4#L58>
[3] <https://github.com/php/php-src/blob/703e0370905bc432aa26d71803b3081851e99230/ext/pcre/config0.m4#L27>
 [2018-04-23 21:14 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2018-04-24 15:56 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2018-04-24 16:34 UTC] pprkut at slackware dot com
Not entirely sure, but I think this line needs to be adjusted as well:

PHP_ADD_LIBRARY_WITH_PATH(pcre2, $PCRE_LIBDIR)

For me the follow up tests fail still:
checking for pcre2_jit_exec in -lpcre2... no

because it's trying to link -lpcre2 instead of -lpcre2-8
 [2018-04-24 21:41 UTC] cmb@php.net
-Status: Closed +Status: Re-Opened
 [2018-04-24 21:41 UTC] cmb@php.net
Thanks – re-opening.

Actually, there are even further issues at least with the version
detection[1]; $pcre_version is "210222" for me (PCRE 10.22) due to
the 2 in PCRE2.

> checking for pcre2_jit_exec in -lpcre2... no

For some reason, pcre-jit seems to be supported for the bundled
libpcre2 only[2].

[1] <https://github.com/php/php-src/blob/e79013a71fdc951f9a5842ffe8a0e3af63c31111/ext/pcre/config0.m4#L36-L37>
[2] <https://github.com/php/php-src/blob/e79013a71fdc951f9a5842ffe8a0e3af63c31111/ext/pcre/config0.m4#L12>
 [2018-04-25 14:18 UTC] ab@php.net
-Status: Re-Opened +Status: Feedback
 [2018-04-25 14:18 UTC] ab@php.net
@pprkut these issues should have been fixed just now. Please check.

Thanks.
 [2018-04-25 14:31 UTC] ab@php.net
@cmb just fixed the regex as well.

Thanks.
 [2018-04-25 16:28 UTC] ab@php.net
Thinking more about it, it probably needs a clear rewrite of this piece. Likely based on pkg-config, pcre2-config and so on by default. It's a new stuff, so there's no reason to modernize. I guess one more rewrite is to follow, with a better approach.

Thanks.
 [2018-04-25 17:00 UTC] pprkut at slackware dot com
-Status: Feedback +Status: Assigned
 [2018-04-25 17:00 UTC] pprkut at slackware dot com
FWIW, what's there now seems to work :)
 [2018-04-26 12:32 UTC] ab@php.net
@pprkut thanks for the checks so far. A more robust approach is now pushed. If everything is ok, i'd see the bug as fixed.

Thanks.
 [2018-04-28 19:31 UTC] pprkut at slackware dot com
Everything still works :)
Thanks!
 [2018-04-29 00:04 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2018-04-29 00:04 UTC] cmb@php.net
> Everything still works :)

Fine.

Thanks to Anatol the issue has been resolved, so I'm closing this
ticket.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 15:01:30 2024 UTC