From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: MinGW build fixes Date: Sat, 27 Jun 2009 18:21:23 +0100 Message-ID: <87r5x54mp8.fsf@arudy.ossau.uklinux.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1246123308 24707 80.91.229.12 (27 Jun 2009 17:21:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Jun 2009 17:21:48 +0000 (UTC) Cc: guile-devel To: "carlo.bramix" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Jun 27 19:21:40 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MKbau-0004Rv-EP for guile-devel@m.gmane.org; Sat, 27 Jun 2009 19:21:40 +0200 Original-Received: from localhost ([127.0.0.1]:58256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKbat-0007ck-L2 for guile-devel@m.gmane.org; Sat, 27 Jun 2009 13:21:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MKbam-0007bt-PE for guile-devel@gnu.org; Sat, 27 Jun 2009 13:21:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MKbai-0007Sa-BP for guile-devel@gnu.org; Sat, 27 Jun 2009 13:21:32 -0400 Original-Received: from [199.232.76.173] (port=43833 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKbai-0007SS-7h for guile-devel@gnu.org; Sat, 27 Jun 2009 13:21:28 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]:49192) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MKbag-00041h-Nv for guile-devel@gnu.org; Sat, 27 Jun 2009 13:21:27 -0400 Original-Received: from arudy (host86-152-99-133.range86-152.btcentralplus.com [86.152.99.133]) by mail3.uklinux.net (Postfix) with ESMTP id DF85B1F82F5; Sat, 27 Jun 2009 18:21:23 +0100 (BST) Original-Received: from arudy.ossau.uklinux.net (arudy [127.0.0.1]) by arudy (Postfix) with ESMTP id 6DA4138021; Sat, 27 Jun 2009 18:21:23 +0100 (BST) In-Reply-To: (carlo bramix's message of "Sat\, 27 Jun 2009 12\:22\:59 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:8785 Archived-At: "carlo.bramix" 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