bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Alexey Dokuchaev via Gnulib discussion list <bug-gnulib@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 51144@debbugs.gnu.org, Gnulib bugs <bug-gnulib@gnu.org>,
	Bruno Haible <bruno@clisp.org>,
	tijl@FreeBSD.org
Subject: Re: bug#51144: GNU grep 3.7 fails to build on FreeBSD
Date: Fri, 15 Oct 2021 14:32:54 +0700	[thread overview]
Message-ID: <20211015073254.GA82090@regency.nsu.ru> (raw)
In-Reply-To: <594312a4-d474-d2f0-1358-e4ff19f8b4e7@cs.ucla.edu>

On Thu, Oct 14, 2021 at 10:34:55AM -0700, Paul Eggert wrote:
> On 10/14/21 7:02 AM, Alexey Dokuchaev wrote:
> > On Wed, Oct 13, 2021 at 11:47:34AM -0700, Paul Eggert wrote:
> > > On 10/12/21 9:02 PM, Alexey Dokuchaev wrote:
> > > > Ports framework does several things which affect GNU configure
> > > > scripts, particularly, it replaces build-aux/config.guess file
> > > > with our own, where host/build tuples are derived from.
> > > > 
> > > > x86_64 is spelled as amd64 in FreeBSD
> > > 
> > > Ouch. When porting, does this mean you need to look for places where
> > > GNU source code says "x86_64" and replace many of these places with
> > > "amd64" before building? That sounds error-prone.
> > 
> > No, of course not, typically we don't replace anything.  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?

In general, we don't edit those files, and typically we only run autoconf
when there's no pre-generated configure script, or there's something so
very wrong about it, or generated Makefiles, that patching isn't feasible
and we have to rebootstrap the whole thing.

About why this x86_64 vs amd64 thing does not cause massive fallout for
us, I better ask our Autotools expert.  Tijl, can you shed some light
here?  I've added back omitted context to the quoted parts of this email,
I hope Paul wouldn't mind.

./danfe

> > 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.


  reply	other threads:[~2021-10-15  7:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211012025300.GA43189@regency.nsu.ru>
     [not found] ` <a24e453e-9e54-b5f2-61df-2fe64bb49aec@cs.ucla.edu>
     [not found]   ` <20211013040258.GA99982@regency.nsu.ru>
2021-10-13 18:47     ` bug#51144: GNU grep 3.7 fails to build on FreeBSD Paul Eggert
2021-10-14 14:02       ` Alexey Dokuchaev via Gnulib discussion list
2021-10-14 17:34         ` Paul Eggert
2021-10-15  7:32           ` Alexey Dokuchaev via Gnulib discussion list [this message]
2021-10-16 16:40             ` Tijl Coosemans
2021-10-16 16:53               ` Paul Eggert
2021-10-16 21:06                 ` Jeffrey Walton
2021-10-16 21:54                   ` Paul Eggert
2021-10-17 21:20         ` Bruno Haible
2021-10-18  2:03           ` Alexey Dokuchaev via Gnulib discussion list
2021-10-18  5:18             ` Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211015073254.GA82090@regency.nsu.ru \
    --to=bug-gnulib@gnu.org \
    --cc=51144@debbugs.gnu.org \
    --cc=bruno@clisp.org \
    --cc=danfe@nsu.ru \
    --cc=eggert@cs.ucla.edu \
    --cc=tijl@FreeBSD.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).