unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Volker Grabsch <vog@notjusthosting.com>
To: Andy Wingo <wingo@pobox.com>
Cc: bug-guile@gnu.org, guile-devel@gnu.org
Subject: Re: Guile with win32 cross compiling
Date: Fri, 1 Apr 2011 20:50:20 +0200	[thread overview]
Message-ID: <20110401185020.GC13643@flap> (raw)
In-Reply-To: <m3hbaiuuhp.fsf@unquote.localdomain>

Andy Wingo schrieb:
> On Sat 26 Mar 2011 23:06, Volker Grabsch <vog@notjusthosting.com> writes:
> 
> > The first issue is the "#include <uniconv.h>" in gen-scmconfig,
> > which has already been discussed in the past and for which I
> > already provided a clean, working solution. I forward-ported
> > my patch to guile-2.0.0 and it seems to work. This patch is
> > attached to this email, please consider applying it.
> 
> I don't know what discussion you are referring to here; best to link.

I'm referring to:

    "Portability fixes for win32 cross compiling"
    http://www.mail-archive.com/guile-devel@gnu.org/msg05308.html

> In any case, I don't understand the mechanism here, but I believe the
> point was to make it so that #include <libguile.h> would not pull in
> iconv headers.  gen-scmconfig looks up the value of the constants for
> iconv conversion handlers, and writes them into scmconfig.h.  Your patch
> undoes that.
> 
> What problem are you working around here?

The problem is that this mechanism works completely against the
nature of cross compiling.

The issue exists in all attempts to cross compile guile, but they
become extreme when cross compiling on a Unix system for MinGW,
as those systems are very different.

Gen-scmconfig is a code generator, so it has to be built using
the native toolchain. However, it is supposed to write take its
values from the <uniconv.h> of the cross tool chain. Thus, the
"/usr/include" equivalent of the cross tool chain is added to
the include path when compiling gen-scmconfig. And here the
trouble starts, because mixing headers of various toolchains
is never a good idea. Among others, basic headers like <stdio.h>
are now taken from the cross toolchain, referring to objects that
don't even exist in the native toolchain, causing the build to
fail with all kinds of strange error messages.

> > The other open issue is also a known one: the missing mmap()
> > function under Windows. After some research, I found a promising
> > mmap()/munmap() implementation for Windows in a free software
> > project:
> >
> > http://code.google.com/p/flvmeta/source/browse/trunk/src/mmap.h?r=74
> > http://code.google.com/p/flvmeta/source/browse/trunk/src/mmap.c?r=74
> >
> > Maybe this is worth integrating into guile?
> 
> You know, not only do we not rely on MAP_SHARED -- I switched it to use
> PRIVATE, just now -- we didn't actually need mmap at all.  I just
> changed it to use read(2) if mmap is not available, and it seems to work
> fine, just a little (5-10%) slower to start up.  That should help our
> unfortunate friends working on Windows :)

That's good news. Maybe this will enable me to include the next guile
release in mingw-cross-env - a project dedicated to all those unfortunate
friends. :-)  Using mingw-cross-env and Wine, they at least don't have
to actually run Windows just to build and test their project's Windows
port. ;-)


Greets,
Volker

-- 
Volker Grabsch
---<<(())>>---



  reply	other threads:[~2011-04-01 18:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-26 22:06 Guile with win32 cross compiling Volker Grabsch
2011-04-01 10:38 ` Andy Wingo
2011-04-01 18:50   ` Volker Grabsch [this message]
2011-04-12 11:14     ` Andy Wingo
2011-04-23 16:10       ` Volker Grabsch
2011-04-24 10:42         ` Andy Wingo
2011-05-16 23:01           ` Volker Grabsch
2011-05-20 10:32             ` Andy Wingo
2011-05-20 12:25               ` Volker Grabsch
2011-05-20 12:48                 ` Jan Nieuwenhuizen
2011-05-20 13:25                   ` Andy Wingo
2011-05-20 22:19                   ` Volker Grabsch
2011-06-17  9:03                     ` Andy Wingo
2011-07-01 13:52                       ` Andy Wingo
2011-04-24 20:22       ` Ludovic Courtès
2011-04-28 21:03         ` Andy Wingo
2011-06-19 14:42           ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2011-04-05 19:43 Mike Gran
2011-04-06  1:38 ` Volker Grabsch
2011-04-06 12:46   ` Ludovic Courtès
2011-03-26 22:04 Volker Grabsch

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=20110401185020.GC13643@flap \
    --to=vog@notjusthosting.com \
    --cc=bug-guile@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=wingo@pobox.com \
    /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).