* Git bug. "make [all]" does not use USE_LIBPCRE when "configure --with-libpcre" was previously run
@ 2013-08-14 12:48 Alexey Shumkin
2013-08-14 16:09 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Shumkin @ 2013-08-14 12:48 UTC (permalink / raw)
To: Stefano Lattarini; +Cc: Junio C Hamano, Git mailing list
Hello, Stefan!
I'll begin from afar.
>From time to time, I use `git grep -P` to search text in sources using PCRE.
Today I was suprised when that command gave me the error
"fatal: cannot use Perl-compatible regexes when not compiled with
USE_LIBPCRE"
As far as I always use
./configure --with-libpcre
make all
to build my Cygwin version of Git that was a VERY sudden error for me.
(but this is not a Cygwin-specific error, I've reproduced it on my Linux
box).
I've found out that `make` "does not know" anymore about USE_LIBPCRE=YesPlease
even `./configure --with-libpcre` was run before it. But I do remember
that it worked in some versions before (currently I use latest - v1.8.3.4).
So, I've got armed with the following test script:
---8<---
#!/bin/sh
set -e
./configure --with-libpcre
make
set +e
./bin-wrappers/git grep -qIP das+
# if "cannot use Perl-compatible regexes" error occurs
# then Git exits with an error code 128 (but `git bisect run` fails to
# expect this exit code).
if test $? -eq 128
then
exit 1
fi
---8<---
and `git bisect run` to find out where Git was broken.
That gave me:
---8<---
40bfbde9da5c6cbc85f49a755f27162dc966fd89 is the first bad commit
commit 40bfbde9da5c6cbc85f49a755f27162dc966fd89
Author: Stefano Lattarini <stefano.lattarini@gmail.com>
Date: Tue Sep 11 17:45:30 2012 +0200
build: don't duplicate substitution of make variables
Thanks to our 'GIT_CONF_SUBST' layer in configure.ac, a make variable 'VAR'
can be defined to a value 'VAL' at ./configure runtime in our build system
simply by using "GIT_CONF_SUBST([VAR], [VAL])" in configure.ac, rather than
having both to call "AC_SUBST([VAR], [VAL])" in configure.ac and adding the
'VAR = @VAR@' definition in config.mak.in. Less duplication, less margin
for error, less possibility of confusion.
While at it, fix some formatting issues in configure.ac that unnecessarily
obscured the code flow.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
:100644 100644 802d34223a2859ee1341d94ee722d7939b7276aa 69d48382fe69b8699eb350949fff04975db923f8 M config.mak.in
:100644 100644 450bbe7f1020711b4af2ad6ea52d717651c30b0b da1f41f58871b2102a9ed5eaeff7df3c9623f4bd M configure.ac
bisect run success
---8<---
I'm not a C programmer to fix that, so I ask you to.
--
Alexey Shumkin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Git bug. "make [all]" does not use USE_LIBPCRE when "configure --with-libpcre" was previously run
2013-08-14 12:48 Git bug. "make [all]" does not use USE_LIBPCRE when "configure --with-libpcre" was previously run Alexey Shumkin
@ 2013-08-14 16:09 ` Junio C Hamano
2013-08-14 16:39 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2013-08-14 16:09 UTC (permalink / raw)
To: Alexey Shumkin; +Cc: Stefano Lattarini, Git mailing list
Alexey Shumkin <alex.crezoff@gmail.com> writes:
>>From time to time, I use `git grep -P` to search text in sources using PCRE.
> Today I was suprised when that command gave me the error
> "fatal: cannot use Perl-compatible regexes when not compiled with
> USE_LIBPCRE"
>
> As far as I always use
> ./configure --with-libpcre
> make all
> to build my Cygwin version of Git that was a VERY sudden error for me.
> (but this is not a Cygwin-specific error, I've reproduced it on my Linux
> box).
>
> I've found out that `make` "does not know" anymore about USE_LIBPCRE=YesPlease
> even `./configure --with-libpcre` was run before it.
> ...
> and `git bisect run` to find out where Git was broken.
> That gave me:
>
> ---8<---
> 40bfbde9da5c6cbc85f49a755f27162dc966fd89 is the first bad commit
> commit 40bfbde9da5c6cbc85f49a755f27162dc966fd89
> Author: Stefano Lattarini <stefano.lattarini@gmail.com>
> Date: Tue Sep 11 17:45:30 2012 +0200
>
> build: don't duplicate substitution of make variables
>
> Thanks to our 'GIT_CONF_SUBST' layer in configure.ac, a make variable 'VAR'
> can be defined to a value 'VAL' at ./configure runtime in our build system
> simply by using "GIT_CONF_SUBST([VAR], [VAL])" in configure.ac, rather than
> having both to call "AC_SUBST([VAR], [VAL])" in configure.ac and adding the
> 'VAR = @VAR@' definition in config.mak.in. Less duplication, less margin
> for error, less possibility of confusion.
>
> While at it, fix some formatting issues in configure.ac that unnecessarily
> obscured the code flow.
>
> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
>
> :100644 100644 802d34223a2859ee1341d94ee722d7939b7276aa 69d48382fe69b8699eb350949fff04975db923f8 M config.mak.in
> :100644 100644 450bbe7f1020711b4af2ad6ea52d717651c30b0b da1f41f58871b2102a9ed5eaeff7df3c9623f4bd M configure.ac
> bisect run success
>
> ---8<---
>
> I'm not a C programmer to fix that, so I ask you to.
Yikes and thanks for reporting.
This does not have anything to do with C, but is a breakage in our
autoconf script. It appears that anything that is meant to be
appended at end via $config_appended_defs mechanism is missing from
the end result.
In fact, symbols whose explicit substitution the above patch
removes, e.g. CC_LD_DYNPATH, TCLTK_PATH, NEEDS_SSL_WITH_CRYPTO,
etc. are all missing.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Git bug. "make [all]" does not use USE_LIBPCRE when "configure --with-libpcre" was previously run
2013-08-14 16:09 ` Junio C Hamano
@ 2013-08-14 16:39 ` Junio C Hamano
2013-08-15 6:51 ` Alexey Shumkin
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2013-08-14 16:39 UTC (permalink / raw)
To: Alexey Shumkin; +Cc: Stefano Lattarini, Git mailing list
Junio C Hamano <gitster@pobox.com> writes:
> This does not have anything to do with C, but is a breakage in our
> autoconf script. It appears that anything that is meant to be
> appended at end via $config_appended_defs mechanism is missing from
> the end result.
>
> In fact, symbols whose explicit substitution the above patch
> removes, e.g. CC_LD_DYNPATH, TCLTK_PATH, NEEDS_SSL_WITH_CRYPTO,
> etc. are all missing.
Wait, I spoke too soon.
$ rm -f configure config.status &&
make configure &&
./configure --with-libpcre &&
grep USE_LIBPCRE config.mak.autogen
USE_LIBPCRE=YesPlease
no longer reproduces for me (even though I _thought_ I tried and saw
the breakage). Hmmmmmm.....
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Git bug. "make [all]" does not use USE_LIBPCRE when "configure --with-libpcre" was previously run
2013-08-14 16:39 ` Junio C Hamano
@ 2013-08-15 6:51 ` Alexey Shumkin
0 siblings, 0 replies; 4+ messages in thread
From: Alexey Shumkin @ 2013-08-15 6:51 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Stefano Lattarini, Git mailing list
On Wed, Aug 14, 2013 at 09:39:10AM -0700, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
> > This does not have anything to do with C, but is a breakage in our
> > autoconf script.
I've meant C-programmers does understand autoconf, too. But I do not :(.
> > It appears that anything that is meant to be
> > appended at end via $config_appended_defs mechanism is missing from
> > the end result.
> >
> > In fact, symbols whose explicit substitution the above patch
> > removes, e.g. CC_LD_DYNPATH, TCLTK_PATH, NEEDS_SSL_WITH_CRYPTO,
> > etc. are all missing.
>
> Wait, I spoke too soon.
>
> $ rm -f configure config.status &&
> make configure &&
> ./configure --with-libpcre &&
> grep USE_LIBPCRE config.mak.autogen
> USE_LIBPCRE=YesPlease
>
> no longer reproduces for me (even though I _thought_ I tried and saw
> the breakage). Hmmmmmm.....
Oh! That have worked for me, too. No more error occured.
Thank you!
--
Alexey Shumkin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-15 6:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-14 12:48 Git bug. "make [all]" does not use USE_LIBPCRE when "configure --with-libpcre" was previously run Alexey Shumkin
2013-08-14 16:09 ` Junio C Hamano
2013-08-14 16:39 ` Junio C Hamano
2013-08-15 6:51 ` Alexey Shumkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).