bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51457: grep - fails to compile after following steps in README-hacki


From: Duncan Roe
Subject: bug#51457: 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@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]