unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel@gnu.org
Subject: Re: Problem with removing <config.h> from gen-scmconfig when cross-compiling
Date: Thu, 13 Mar 2014 16:47:09 +0100	[thread overview]
Message-ID: <878useumma.fsf@gnu.org> (raw)
In-Reply-To: <877g7y6sdx.fsf@yeeloong.lan> (Mark H. Weaver's message of "Thu,  13 Mar 2014 11:16:26 -0400")

Mark H Weaver <mhw@netris.org> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Mark H Weaver <mhw@netris.org> skribis:
>>
>>> Commit 8cb0d6d7fa9aaac316c29a64c541336b51b6f93d "build: Don't include
>>> <config.h> in native programs when cross-compiling." apparently broke
>>> cross-compiling.  Madsy on #guile, who successfully cross-compiled
>>> e1bb79f for mingw, ran into this problem with 21a7ba9:
>>>
>>> make[1]: Entering directory `/home/madsy/mingw/home/madsy/test/guile-2.0.9.f239-21a7b-dirty/libguile'
>>>   GEN      gen-scmconfig.o
>>> gen-scmconfig.c: In function 'main':
>>> gen-scmconfig.c:245:39: error: 'SIZEOF_CHAR' undeclared (first use in this function)
>>> gen-scmconfig.c:245:39: note: each undeclared identifier is reported only once for each function it appears in
>>
>> Arrgggh, indeed, sorry!
>>
>> We should revert that patch, but then I’m not sure how to properly fix
>> the initial problem, which is that gen-scmconfig.c ends up using
>> Gnulib’s <stdio.h> etc.
>
> Madsy told me that the only problem he had when cross-compiling e1bb79f
> was in c-tokenize.c.  He worked around it by simply removing "#include
> <config.h>" from that file.  gen-scmconfig.c was not a problem.
>
> The specific problem was that c-tokenize.c includes <stdlib.h>,
> but gen-scmconfig.c doesn't include <stdlib.h>.
>
> I agree that this is fragile and should be reworked somehow, but for
> 2.0.10, I wonder if we could just revert the part of 8cb0d6d having to
> do with gen-scmconfig.c.
>
> What do you think?

You’re right.  So for 2.0.10, just revert, and then remove #include
<config.h> altogether in c-tokenize.lex with a comment saying why.

Could you do that?

> Didn't hydra.nixos.org do MinGW cross-builds of Guile in the past?
> If so, what happened to those?

Yes, we had that, but I removed it in
<http://git.sv.gnu.org/cgit/hydra-recipes.git/commit/?id=aea7182a62f8c6f7a04a7e89fbdd59155d5f34ff>
because the MinGW cross toolchain in Nixpkgs had bitrot.  :-/

(BTW, we can test cross-compilation to GNU/Linux with
guix build guile --with-source=guile-2.0.9.xyz.tar.xz --target=mips64el-linux-gnu.)

Ludo’.



  reply	other threads:[~2014-03-13 15:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13  1:23 Problem with removing <config.h> from gen-scmconfig when cross-compiling Mark H Weaver
2014-03-13 13:37 ` Ludovic Courtès
2014-03-13 15:16   ` Mark H Weaver
2014-03-13 15:47     ` Ludovic Courtès [this message]
2014-03-13 16:37       ` Mark H Weaver
2014-03-13 18:05         ` Ludovic Courtès
2014-03-14 21:43           ` Mark H Weaver
2014-03-17  6:48           ` Doug Evans
2014-03-17 20:32             ` Ludovic Courtès
2014-03-18  1:45               ` Doug Evans
2014-03-13 17:00       ` Mark H Weaver
2014-03-13 18:23         ` Ludovic Courtès

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://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=878useumma.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.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).