GNU bug report logs - #51144
GNU grep 3.7 fails to build on FreeBSD

Previous Next

Package: grep;

Reported by: Alexey Dokuchaev <danfe <at> nsu.ru>

Date: Tue, 12 Oct 2021 03:13:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Alexey Dokuchaev <danfe <at> nsu.ru>
Cc: Gnulib bugs <bug-gnulib <at> gnu.org>, 51144 <at> debbugs.gnu.org, Bruno Haible <bruno <at> clisp.org>
Subject: bug#51144: GNU grep 3.7 fails to build on FreeBSD
Date: Thu, 14 Oct 2021 10:34:55 -0700
On 10/14/21 7:02 AM, Alexey Dokuchaev wrote:

> All we do is
> use our pre-built templates for config.{guess,site,sub} and pass the
> --build=amd64-portbld-freebsd$(version) argument to configure scripts
> if they are generated by GNU autotools.

Surely this doesn't work if there's a configure.ac or m4/*.m4 file that 
does something like this:

  if "$host_os" = x86_64; then
    ...
  fi

and I see examples of this in gnulib/m4's float_h.m4, host-cpu-c-abi.m4, 
lib-prefix.m4, multiarch.m4, printf.m4, stack-direction.m4. In general 
don't you need to also edit these files and re-run Autoconf?


> I can't remember when was the last time I've been
> bitten by this. :-)

Often Gnulib code will guess the right value anyway. Not always, though. 
You ran into a case where Gnulib didn't guess and aborted. Some other 
times, the guess may differ from what it would be if you did a plain 
'configure; make' from a tarball. You might want to test for that, given 
the above list of potential problem files.

There may well be similar problems in configure.ac or *.m4 files 
maintained in GNU projects other than Gnulib. Autoconf itself has 
"x86_64" hardwired into AC_C_BIGENDIAN; I don't know whether this 
affects FreeBSD compilers.


> would you also consider
> adding "amd64" as a synonym to "x86_64" in that switch/case check?

Yes I suppose we could do that. Bruno, what do you think? You wrote most 
of those "x86_64"s.


>> Otherwise "result: unknown" should result in STACK_DIRECTION being 0,
>> which gnulib/lib/stackvma.h does not support (perhaps it should?).
> 
> Are you sure "result: unknown" should result in 0, not empty value as
> in my first email?

Not at this point, no.




This bug report was last modified 3 years and 178 days ago.

Previous Next


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