unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
To: "carlo.bramix" <carlo.bramix@libero.it>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: MinGW build fixes
Date: Sat, 27 Jun 2009 18:21:23 +0100	[thread overview]
Message-ID: <87r5x54mp8.fsf@arudy.ossau.uklinux.net> (raw)
In-Reply-To: <KLW7IB$F924183D953C2FA6B2E8964087A44999@libero.it> (carlo bramix's message of "Sat\, 27 Jun 2009 12\:22\:59 +0200")

"carlo.bramix" <carlo.bramix@libero.it> writes:

> Hello!

Hi Carlo!

>>> I don't understand why this fixes anything, since the `_ptr'
>>> variables are declared as `SCM_API' just like the non-`_ptr'
>>> variables.
>>  Indeed.  My guess is that it's because the DLL import/export
>> mechanism works for atomic data - i.e. chars, ints, pointers etc -
>> but not for structs.
>
> False.  A DLL can export functions, variables, structures, unions and
> classes.  After few fixes that I'm preparing to share, guile already
> compiles and it works perfectly in cygwin, which uses DLL too:

Great!  I know there are already several emails from you that I
haven't responded to yet; please be assured that I do plan to.

> although it virtualizes a lot, cygwin cannot do miracles, it's always
> windows based and if you add -mno-cygwin it becames identical to
> mingw.

I think you mean when compiling in Cygwin, and that the -mno-cygwin is
a GCC flag; is that right?

>  What we could suspect about it is the implementation of
> -export-dynamic under your mingw: which version are you using?

I'm using the MinGW cross compiler on GNU/Linux (Debian lenny):

neil@arudy:~$ i586-mingw32msvc-gcc --version
i586-mingw32msvc-gcc (GCC) 4.2.1-sjlj (mingw32-2)

The configure invocation is:

    CPPFLAGS=-I/usr/local/i586-mingw32msvc/include \
    LDFLAGS=-L/usr/local/i586-mingw32msvc/lib \
    GUILE_FOR_BUILD=/usr/local/bin/guile \
    ./configure --prefix=/usr/local/i586-mingw32msvc --host=i586-mingw32msvc

You can see the logs of my builds, for the Guile master and
branch_release-1-8 branches, at
http://www.ossau.uklinux.net/guile/snapshots, or at
http://autobuild.josefsson.org/guile/.

>  I'm
> using the latest maintenance releases of gcc 3.4.5 and binutils
> 2.18.50 without troubles.  Actually the troubles with mingw are
> elsewhere... may I ask how you made it working?  Unless it has been
> committed recently, guile cannot be even compiled well because it is
> missing the support for CreateFileMapping(), plus other fixes around
> the code!

What version of Guile have you been trying to build?  My attempt to
build the master branch (i.e. similar to the 1.9.0 pre-release)
currently fails at

./guile-snarf -o objcodes.x objcodes.c -DHAVE_CONFIG_H -DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -I/usr/local/i586-mingw32msvc/include -g -O2
objcodes.c:26:22: error: sys/mman.h: No such file or directory

which I guess might be the same problem as "missing the support for
CreateFileMapping".

The branch_release-1-8 branch (i.e. similar to 1.8.x releases) seems
fine. though.

>  Are you using another posix compatibility layer? But I
> could not see any change in your patch for configure script...

I hope my answers above cover this; let me know if not.

> Anyways, I would not corrupt guile because an isolated compiler bug
> (my opinion).

Worst case is that I'll put the MinGW changes in #ifdef __MINGW32__.
That's still corruption in a sense, but only a very little.

Regards,
        Neil




  reply	other threads:[~2009-06-27 17:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-27 10:22 MinGW build fixes carlo.bramix
2009-06-27 17:21 ` Neil Jerram [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-06-26 23:38 Neil Jerram
2009-06-27  0:03 ` Ludovic Courtès
2009-06-27  9:29   ` Neil Jerram

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=87r5x54mp8.fsf@arudy.ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=carlo.bramix@libero.it \
    --cc=guile-devel@gnu.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).