GNU bug report logs - #51457
grep - fails to compile after following steps in README-hacking

Previous Next

Package: grep;

Reported by: Duncan Roe <duncan_roe <at> optusnet.com.au>

Date: Thu, 28 Oct 2021 08:20:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51457 in the body.
You can then email your comments to 51457 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#51457; Package grep. (Thu, 28 Oct 2021 08:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Duncan Roe <duncan_roe <at> optusnet.com.au>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Thu, 28 Oct 2021 08:20:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Duncan Roe <duncan_roe <at> optusnet.com.au>
To: bug-grep <at> gnu.org
Cc: Duncan Roe <duncan_roe <at> optusnet.com.au>
Subject: grep - fails to compile after following steps in README-hacking
Date: Thu, 28 Oct 2021 18:14:44 +1100
Hi,

I downloaded grep commit f0d97db2. Bypassed export GNULIB_SRCDIR. Did
./bootstrap, git submodule..., git commit...., ./configure and make -j17.

Got this error:
>   CC       dirname-lgpl.o
> In file included from basename-lgpl.c:25:
> ./string.h:624:5: error: token "@" is not valid in preprocessor expressions
>   624 | #if @GNULIB_FREE_POSIX@
Also:
> make[3]: *** Waiting for unfinished jobs....
> In file included from ./localeinfo.h:24,
>                  from localeinfo.c:24:
> ./wchar.h:687:5: error: token "@" is not valid in preprocessor expressions
>   687 | #if @GNULIB_FREE_POSIX@

s/@GNULIB_FREE_POSIX@/1/ in string.h and wchar.h. Now:
>   CC       malloc/dynarray_at_failure.o
> In file included from basename-lgpl.c:25:
> ./string.h:625:7: error: token "@" is not valid in preprocessor expressions
>   625 | # if (@REPLACE_FREE@ && !defined free \
Also:
> In file included from ./localeinfo.h:24,
>                  from localeinfo.c:24:
> ./wchar.h:688:7: error: token "@" is not valid in preprocessor expressions
>   688 | # if (@REPLACE_FREE@ && !defined free \

s/@REPLACE_FREE@/0/ in string.h and wchar.h. Now grep builds.

I went back to the clone and tried ./bootstrap &c. but without updating gnulib.
That builds.

Ran `git bisect` in gnulib. The problem starts with commit a4a2d039:
> Author: Paul Eggert <eggert <at> cs.ucla.edu>
> Date:   Tue Sep 7 17:51:39 2021 -0700
>
>     string, wchar: avoid some namespace pollution
>
>     * lib/string.in.h, lib/wchar.in.h:
>     (free): Declare by hand instead of including stdlib.h.
>     This avoids some namespace pollution.  It should also avoid some
>     nested-include problems described by Lucy Phipps in:
>     https://lists.gnu.org/r/bug-gnulib/2021-09/msg00018.html
>     * modules/string, modules/wchar:
>     (Depends-on): Add stdlib, so that REPLACE_FREE has the right value.
>     (Makefile.am): Replace @REPLACE_FREE@ when creating the include file.

Diffed with previous version but my grasp of autotools is inadequate to figure
out what needs to be done.

Over to you,

Cheers ... Duncan.




Information forwarded to bug-grep <at> gnu.org:
bug#51457; Package grep. (Thu, 28 Oct 2021 17:50:01 GMT) Full text and rfc822 format available.

Message #8 received at 51457 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Duncan Roe <duncan_roe <at> optusnet.com.au>
Cc: 51457 <at> debbugs.gnu.org
Subject: Re: bug#51457: grep - fails to compile after following steps in
 README-hacking
Date: Thu, 28 Oct 2021 10:48:39 -0700
[Message part 1 (text/plain, inline)]
Thanks for reporting the problem. I updated the grep master on savannah 
to use the latest Gnulib, which has fixes in this area, by installing 
the attached patch. Please give it a try and let us know how it goes. 
You may need to run './bootstrap' from a fresh checkout (no caches from 
the previous build).
[0001-build-update-gnulib-submodule-to-latest.patch (text/x-patch, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#51457; Package grep. (Fri, 29 Oct 2021 20:28:01 GMT) Full text and rfc822 format available.

Message #11 received at 51457 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Duncan Roe <duncan_roe <at> optusnet.com.au>
Cc: 51457 <at> debbugs.gnu.org
Subject: Re: bug#51457: grep - fails to compile after following steps in
 README-hacking
Date: Fri, 29 Oct 2021 13:27:23 -0700
On 10/28/21 23:32, Duncan Roe wrote:
> I can't believe those changes were done on purpose. Would it be helpful if I
> submitted a bug report?

That file is taken verbatim from texinfo, so the proper place to file a 
bug report is bug-texinfo <at> gnu.org. I suggest using "git format-patch" to 
format your patch. Although I reported this problem earlier and got 
rebuffed:

https://lists.gnu.org/archive/html/bug-texinfo/2012-02/msg00061.html

... Karl Berry is no longer actively maintaining this file so perhaps 
the current texinfo maintainers would be open to removing the trailing 
whitespace of this particular file, if they knew how much trouble it was 
causing downstream.




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Wed, 24 Nov 2021 02:42:02 GMT) Full text and rfc822 format available.

Notification sent to Duncan Roe <duncan_roe <at> optusnet.com.au>:
bug acknowledged by developer. (Wed, 24 Nov 2021 02:42:02 GMT) Full text and rfc822 format available.

Message #16 received at 51457-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Duncan Roe <duncan_roe <at> optusnet.com.au>
Cc: 51457-done <at> debbugs.gnu.org
Subject: Re: bug#51457: grep - fails to compile after following steps in
 README-hacking
Date: Tue, 23 Nov 2021 18:41:12 -0800
The original bug reported in 51457 seems to have been fixed, so I'm 
closing the bug report.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 22 Dec 2021 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 125 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.