-
Notifications
You must be signed in to change notification settings - Fork 22
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
grepdiff: --exended-regexp
does not work when compiled --with-pcre2
#60
Comments
So, after more investigation, this behaviour only appears on RHEL8, with a self-compiled patchutils 0.4.2 using the system-installed libpcre2 ( It does not appear:
|
Turns out, the system where I was seeing this behaviour had |
Note that this would not have happened with pcre2 10.33 or later since the POSIX function names are only defined as preprocessor macros starting in that release: https://github.com/PCRE2Project/pcre2/blob/4a6a8b056f39079d5e958eac84c2ad173f4680bc/ChangeLog#L1050-L1054. |
Two things to mention in retrospect:
@KangOl CC-ing you since you authored that commit :) |
Can you resume the problem ? it is only on RHEL 8 ? |
Hi @sergiomb2, in the end, the behaviour I was seeing was caused by So the issue can be closed, although I noted two possible improvements in #60 (comment). |
I discovered that if the package is compiled with
--with-pcre2
(which is the default behaviour if libpcre2 is found on the system), then the following invocation does not return anything for the diff copied at the end of this message.grepdiff --output-matching=hunk -E 'landblockelim|blockall' out.txt
Since either
landblockelim
orblockall
are found in several of the hunks, I should get an output. However, if I use the BRE syntax instead:grepdiff --output-matching=hunk -E 'landblockelim\|blockall' out.txt
then I get the expected output.
I ran the code through GDB and I see the regexp is correctly passed to
regcomp
withREG_EXTENDED
set, but in<pcre2posix.h>
, which is included instead of<regex.h>
under--with-pcre2
, we have the following:so it seems something is missing for a working "out-of-the box" experience when compiling with libpcre2...
The diff in question:
The text was updated successfully, but these errors were encountered: