{"thread":{"id":"45554","subject":"Git and PCRE2 vs PCRE?","startedAt":"2017-03-30T20:59:33Z","lastAt":"2017-03-30T22:04:29Z","messageCount":4,"participants":["Jeffrey Walton","Jeff King","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"315830","messageId":"CAH8yC8kOeuVjvoeg0WsSfDeakJh_es2xhYK_O_bM87DEBVcB1w@mail.gmail.com","threadId":"45554","inReplyTo":null,"subject":"Git and PCRE2 vs PCRE?","fromName":"Jeffrey Walton","fromEmail":"noloader@gmail.com","sentAt":"2017-03-30T20:59:27Z","receivedAt":"2017-03-30T20:59:33Z","isPatch":false,"sender":{"key":"noloader@gmail.com","avatar":null},"body":"Some more 2.12.2 testing on Solaris 11.3 x86_64:\n\n    ...\n    CC ident.o\n    CC kwset.o\n    CC line-log.o\n    CC levenshtein.o\n    CC line-range.o\n    CC list-objects.o\nIn file included from revision.h:5:0,\n                 from line-log.c:10:\ngrep.h:5:18: fatal error: pcre.h: No such file or directory\n #include <pcre.h>\n                  ^\ncompilation terminated.\ngmake: *** [line-log.o] Error 1\n\n\nConfigure has an option for libpcre, but its not clear to me how to\nfine tune it for libpcre2:\n\n$ ./configure --help | /usr/gnu/bin/grep -A 2 -i pcre\n  --with-libpcre          support Perl-compatible regexes (default is NO)\n                          ARG can be also prefix for libpcre library and\n                          headers\n\nIs it possible to use PCRE2 with Git? If so, how do I tell Git to use PCRE2?\n\nThanks in advance.\n\n**********\n\n$ ls /usr/local/include/pcre*\n/usr/local/include/pcre2.h       /usr/local/include/pcre2posix.h\n\n$ ls /usr/local/lib64/libpcre*\n/usr/local/lib64/libpcre2-16.a\n/usr/local/lib64/libpcre2-16.la\n/usr/local/lib64/libpcre2-16.so\n/usr/local/lib64/libpcre2-16.so.0\n/usr/local/lib64/libpcre2-16.so.0.5.0\n/usr/local/lib64/libpcre2-32.a\n/usr/local/lib64/libpcre2-32.la\n/usr/local/lib64/libpcre2-32.so\n/usr/local/lib64/libpcre2-32.so.0\n/usr/local/lib64/libpcre2-32.so.0.5.0\n/usr/local/lib64/libpcre2-8.a\n/usr/local/lib64/libpcre2-8.la\n/usr/local/lib64/libpcre2-8.so\n/usr/local/lib64/libpcre2-8.so.0\n/usr/local/lib64/libpcre2-8.so.0.5.0\n/usr/local/lib64/libpcre2-posix.a\n/usr/local/lib64/libpcre2-posix.la\n/usr/local/lib64/libpcre2-posix.so\n/usr/local/lib64/libpcre2-posix.so.1\n/usr/local/lib64/libpcre2-posix.so.1.0.1\n"},{"id":"315833","messageId":"20170330212206.42mv7rvwzvakenr3@sigill.intra.peff.net","threadId":"45554","inReplyTo":"CAH8yC8kOeuVjvoeg0WsSfDeakJh_es2xhYK_O_bM87DEBVcB1w@mail.gmail.com","subject":"Re: Git and PCRE2 vs PCRE?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-03-30T21:22:06Z","receivedAt":"2017-03-30T21:22:13Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Mar 30, 2017 at 04:59:27PM -0400, Jeffrey Walton wrote:\n\n> Configure has an option for libpcre, but its not clear to me how to\n> fine tune it for libpcre2:\n> \n> $ ./configure --help | /usr/gnu/bin/grep -A 2 -i pcre\n>   --with-libpcre          support Perl-compatible regexes (default is NO)\n>                           ARG can be also prefix for libpcre library and\n>                           headers\n> \n> Is it possible to use PCRE2 with Git? If so, how do I tell Git to use PCRE2?\n\nNo, I don't think so. According to the release announcement for pcre2,\nthe API is not compatible with the original:\n\n  https://lists.exim.org/lurker/message/20150105.162835.0666407a.en.html\n\nSo even if you could tweak the build to use it, it would not do the\nright thing. Somebody would have to add code for the new library, and\nprobably have a USE_LIBPCRE2 flag.\n\nI don't know offhand if there are compelling reasons to do that work.\n\n-Peff\n"},{"id":"315834","messageId":"xmqq60iq31dk.fsf@gitster.mtv.corp.google.com","threadId":"45554","inReplyTo":"CAH8yC8kOeuVjvoeg0WsSfDeakJh_es2xhYK_O_bM87DEBVcB1w@mail.gmail.com","subject":"Re: Git and PCRE2 vs PCRE?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-03-30T21:23:19Z","receivedAt":"2017-03-30T21:23:27Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeffrey Walton <noloader@gmail.com> writes:\n\n> Is it possible to use PCRE2 with Git? If so, how do I tell Git to use PCRE2?\n\nGiven that pcre2's symbols are all prefixed with pcre2_ (I only\nchecked http://www.pcre.org/current/doc/html/pcre2api.html) and we\ndo not see any hits from \"git grep pcre2\", I do not think you can\njust \"configure\" Git to use it.  Unless pcre2 library has a drop-in\nreplacement backward compatibility mode with pcre library, that is.\n\nIt probably is possible to use PCRE2 with Git by adding similar\namount of code to grep.[ch] as we have support for pcre and that\nwould be the way you tell Git to use PCRE2, but I think that is\nprobably not the questino you are asking.\n"},{"id":"315839","messageId":"CAH8yC8kEzK0seNj9GK8h5mnMDvyG9=PnChmseSuvSfvb5h+uDQ@mail.gmail.com","threadId":"45554","inReplyTo":"xmqq60iq31dk.fsf@gitster.mtv.corp.google.com","subject":"Re: Git and PCRE2 vs PCRE?","fromName":"Jeffrey Walton","fromEmail":"noloader@gmail.com","sentAt":"2017-03-30T22:04:23Z","receivedAt":"2017-03-30T22:04:29Z","isPatch":false,"sender":{"key":"noloader@gmail.com","avatar":null},"body":"On Thu, Mar 30, 2017 at 5:23 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Jeffrey Walton <noloader@gmail.com> writes:\n>\n>> Is it possible to use PCRE2 with Git? If so, how do I tell Git to use PCRE2?\n>\n> Given that pcre2's symbols are all prefixed with pcre2_ (I only\n> checked http://www.pcre.org/current/doc/html/pcre2api.html) and we\n> do not see any hits from \"git grep pcre2\", I do not think you can\n> just \"configure\" Git to use it.  Unless pcre2 library has a drop-in\n> replacement backward compatibility mode with pcre library, that is.\n>\n> It probably is possible to use PCRE2 with Git by adding similar\n> amount of code to grep.[ch] as we have support for pcre and that\n> would be the way you tell Git to use PCRE2, but I think that is\n> probably not the questino you are asking.\n\nAck, thanks Jeff and Junio. Its no big deal to me.\n\nI'm not a PCRE user, so I'm not familiar with the extra gyrations\nneeded for the migration.\n\nI'll get the original PCRE installed.\n\nThanks again.\n"}]}