Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About the problem that pcre2 cannot work on Debian of WSL2. #138

Closed
CandyMi opened this issue Jul 28, 2022 · 1 comment
Closed

About the problem that pcre2 cannot work on Debian of WSL2. #138

CandyMi opened this issue Jul 28, 2022 · 1 comment

Comments

@CandyMi
Copy link

CandyMi commented Jul 28, 2022

TYPE NAME VALUE
OS WSL2-Debain v10
Compiler GCC v8.3.0
Software PCRE2 v10.32

question

I have a problem starting Debian on WSL2 and installing pcre2posix via apt, please refer to the following pseudo code:

   #include <pcre2posix.h>
   regex_t *re = allocate memory;
   regcomp(re, "(.+)", ...);
   regexec(re, ....);

The return result of regexec is that it cannot find, match any characters. When I change to posix regex or pcre (v1) the problem disappears. If I download pcre2 and use cmake to compile and install The problem also disappeared after that.

I found a line of comment inside the pcre2posix file:

/*
Debian had a patch that used different names. These are now here to save
them having to maintain their own patch, but are not documented by PCRE2.
*/

Does this have anything to do with the problem I'm having? Or maybe this is a bug in a version iteration?

Note: On my personal MacBookPro, FreeBSD installed with pkg/brew without problems.

More information

Compile manually:

 CandyMi@localhost:~/cfadmin $ ldd lre.so 
        linux-vdso.so.1
        libpcre2-posix.so.3 => /usr/local/lib/libpcre2-posix.so.3
        libpcre2-8.so.0 => /usr/local/lib/libpcre2-8.so.0
        ...
        .......

apt install:

 CandyMi@localhost:~/cfadmin $ ldd lre.so 
        linux-vdso.so.1
        libpcre2-posix.so.3 => /usr/lib/x86_64-linux-gnu/libpcre2-posix.so.3
        libpcre2-8.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0
        ...
        .......
@PhilipHazel
Copy link
Collaborator

PCRE2 10.32 was released in September 2018 - almost four years ago - and has been superseded several times. We are currently on 10.40. Perhaps your source install used a later version, because there have been changes in the relevant area. See the ChangeLog entry for version 10.36, change 8. I don't think there's any action to be taken here, so I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants