From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.devel Subject: Re: Compiling guile-2.2.4 for mingw Date: Tue, 20 Nov 2018 09:45:05 -0800 Message-ID: <20181120174505.GA23955@joshua.dnsalias.com> References: <20181120155813.GA20667@joshua.dnsalias.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1542735824 13125 195.159.176.226 (20 Nov 2018 17:43:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 20 Nov 2018 17:43:44 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: guile-devel@gnu.org To: Christoph Buck Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Nov 20 18:43:40 2018 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPA3n-0003K4-C5 for guile-devel@m.gmane.org; Tue, 20 Nov 2018 18:43:39 +0100 Original-Received: from localhost ([::1]:35070 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPA5t-0000l4-Qb for guile-devel@m.gmane.org; Tue, 20 Nov 2018 12:45:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPA5V-0000jJ-Fp for guile-devel@gnu.org; Tue, 20 Nov 2018 12:45:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPA5P-00036H-FX for guile-devel@gnu.org; Tue, 20 Nov 2018 12:45:23 -0500 Original-Received: from sonic302-22.consmr.mail.ne1.yahoo.com ([66.163.186.148]:38728) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gPA5O-00033G-Ra for guile-devel@gnu.org; Tue, 20 Nov 2018 12:45:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1542735915; bh=EBBym8TmXkiCpJlxdOywTAtgfalVn0/d1pe0GBL38PA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=Xiiy6CGoZJs0lV/8BmfPefUXHUDaRxzFpeflB+J8EXR7fDn31OMNapcuBYvHNx8nuvkthcbF2REILGFytK6K3PR7PgHPoedym7m9y7uqkRXK1EICdvguOc6Ams3DotV6ZF26fMKgj1N/+nYx7q7gPSjD+UZ+H7bi/oztUs7Li7g6n9nX5OLANorVOzektuCKnZGKznmpKDLFHK+RmyQVu6atFoNDkmI6PyZWDd8hPULTPfXrPZlyNOC7wV1kC7AkLeet9CCrXdxvfjlIk34ht1AHMuCeWACF3wp4gF8wAu9A4M1XDyf4bdCvOjPctJp9Ik5IcWom7iS2VTMwGee9wA== X-YMail-OSG: 05hfJvUVM1ndGY_KQHdgWgSysFw3XpXlpmFRqezBUqba4ty8Is8H7Y8y56TnA6p _wN1eETG45k6MYygyr7xW9R1JC73HsmBRrnQisnaM__ylbOXdjlwb6XYGJ1gp7BvBl9gZ3J.tSkw Dztoxjkd7qm3I62u9OY6qDv1Vq0Z0_cT4xBW1RJkC2.UpOiHhC13j0FT0r2tBHPzwSsUKM3fPUpP LrcTAU8YRf8QVstmWyVVTv9GRv4qNRoxlhQ61Rtwvd4BXOWIbdK8dNNyUNGy4r.Ox6g6Y0kH8KFi Wuy8nmNEflBicsk5UinF.6NvQQ4VGHPdIHENy3liqX432t5FbpffcLCjxrpVFThmA7vjrcublO8L S3A02mkDSs7KNkSMpFauRBrsPB880tVEWNukZKbWlYQ5rN__ZGME8_dYOCn0aRraM8ojno0xDDhj tWsN7Ss3OFKy9L0mf8yx4_PEKQgGky0ebg39tYuZS29MrMXLDdGeuxCr.WVon1AHBGIyaN5dqjkU qvqaRsnMrrdWE9zCV7LN9jm1M3f3gpzlXHt3Sb9SLSgljJngYvSMj..oyOQ.ev686vrp2PN3y9Ef Usrqd0uuyRDDG83WuPI7GqSmTWUkow8xAvc6y.amXf03cdqPFwSpwYV0Wa6ro6SLeA.ckZYOkxYp kbuzbc_02srOymCBIuuRJ_gSQDGdrjyTLKjPyOxlKnqiTo6KfwPZsvaG71.isFZotq3jk8z2De35 ePSGOmleFeoYYxRbT.V.OKcs8AREb2ngfNVTcXfcU8qsCtDc8NZN5hcyNLNxAmF0nTulMzKLNPYU uXYTm3Vf0c8YCCnhV1CN8kbyzQcFtmJUuqpJl4qp9J Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ne1.yahoo.com with HTTP; Tue, 20 Nov 2018 17:45:15 +0000 Original-Received: from 162-197-224-133.lightspeed.irvnca.sbcglobal.net (EHLO joshua.dnsalias.com) ([162.197.224.133]) by smtp409.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 40d9d82298a9559a01ae0361325a4972; Tue, 20 Nov 2018 17:45:13 +0000 (UTC) Content-Disposition: inline In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 66.163.186.148 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19754 Archived-At: On Tue, Nov 20, 2018 at 06:16:32PM +0100, Christoph Buck wrote: > Mike Gran writes: > > > Hey Chris, > > > > This is one of two errors. One problem is that Guile makes assumptions > > about the size of long vs the size of a pointer, as do some the > > libraries on which Guile depends. In practice, your Guile needs to be > > compiled under MinGW 32-bit where sizeof(void *) == sizeof(long) > > Ok that makes sense. > > > There is another error that causes similar problems to the one you are > > seeing. That error is because there is an error in Guile that under > > MinGW where it saves temporary files generated by 'mkstemp!' using the > > text encoding, so you end up with random carriage returns in your > > compiled scheme files. > > I already wondered why my file-pathes were messed up. > > > I do have a working mostly working MinGW Guile on my system. You can > > check out the patches I did on a branch of the repo called > > wip-mingw-guile-2.2 > > > > git.savannah.gnu.org/cgit/guile.git/log/?h=wip-mingw-guile-2.2 > > > > At the beginning of the year, I think I submitted the first of these > > patches upstream, but, I got around to submitting the rest of them. > > > Ok i checked out your branch and it indeed seems to compile under > mingw32. However, I needed to comment out the pollfd struct definition in > lib/poll.in.h to prevent a collusion in the winsock2.h header (see > attached patch file). I guess this can be fixed more adequate somewhere > in the configure scripts? OK. I don't remember running into that, but, I'll double check when I get a chance. > > > Also note that the MinGW threading library (winpthreads) almost works > > with garbage collection, but, it isn't 100%, so you may need to only > > compile the single-threaded version of Guile. > > Ok good to know. > > Is there currently no way to get guile running under mingw-64bit? My plan > was to integrate guile in a project of mine which currently only builds > under 64bit. Well anything is possible, of course. Here is a list of my recollections, but it has been a few months since I looked at it. First, as Eli Z mentions in his email, GMP may need to be fixed to not make incorrect assumptions about the sizeof(long) and int, etc. Second, the Guile numbers infrastructure should probably be rejiggered to keep using 32-bit INum immediate number types even under 64-bit builds if long == 32-bit, or to always use int64_t instead of int. Third, there are a few of the Guile Virtual Machine opcodes that need to disambiguate if it means sizeof(void *) or size of an integer type. Sorry that is pretty vague. I can't recall the details. I think it might be a tricky business overall. I only fixed that MinGW build enough to enter a game jam with Guile, so I haven't put too much effort into it, really. But I came in 10th place, so hooray. Regards, Mike Gran