From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Christoph Buck Newsgroups: gmane.lisp.guile.devel Subject: Re: Compiling guile-2.2.4 for mingw Date: Tue, 20 Nov 2018 18:16:32 +0100 Message-ID: References: <20181120155813.GA20667@joshua.dnsalias.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1542734119 1333 195.159.176.226 (20 Nov 2018 17:15:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 20 Nov 2018 17:15:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (windows-nt) Cc: guile-devel@gnu.org To: Mike Gran Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Nov 20 18:15:15 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 1gP9cJ-0000ET-4W for guile-devel@m.gmane.org; Tue, 20 Nov 2018 18:15:15 +0100 Original-Received: from localhost ([::1]:34899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gP9eP-0000Sa-FM for guile-devel@m.gmane.org; Tue, 20 Nov 2018 12:17:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gP9dm-0000QG-Q1 for guile-devel@gnu.org; Tue, 20 Nov 2018 12:16:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gP9dl-0004MY-9A for guile-devel@gnu.org; Tue, 20 Nov 2018 12:16:46 -0500 Original-Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::11]:21768) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gP9dk-0004En-4H for guile-devel@gnu.org; Tue, 20 Nov 2018 12:16:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1542734201; s=strato-dkim-0002; d=smartoptics.de; h=Message-ID:In-Reply-To:Date:References:Subject:CC:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=IhilKntAmRHZBW1KHlphcDrikcdJDeq34xRv2clAdns=; b=fsAn/W91RsaVCBFUZJWY8p5p4Gipg5ear0t1G7lrez1xoq5nVCYCLPiornIuX8i+B2 NmmA2F//qZSIF3sAFnEXq5AgEVlc6ajQcvnaqn5t5WUulkMNFVlb419jxXnib/PHof9f epvxUSHAPRaBQt8rEZMNVIaSL9B/YN3BBqHZ5Xy2XqOZG1g62Zccn0fu5Y2CHWVW11W5 qmRF2k8assoS93mnU8TkMrF/gp4Rbfhc1AQjXzzKL+oun8OihsPK9FkZYLrhpuj3kBfn 8gTp3xEWlBmp6c9wLaYHm0gC3ivF2QZLuC2TxF1lY3Hs5qulutbcLgk2o4dpo/K5akHe F7iw== X-RZG-AUTH: ":IW0WYUmmNfRzsJtoLeQgMD9xbRDWKFbZYk+h/F4y09qNuxdyiDZmDf3UtSr5GJPEtS5Rcw/NHz/MjLQs" X-RZG-CLASS-ID: mo00 Original-Received: from mail.smartoptics.de by smtp.strato.de (RZmta 44.4 AUTH) with ESMTPSA id n02a92uAKHGfQ17 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Tue, 20 Nov 2018 18:16:41 +0100 (CET) Original-Received: from [192.168.0.34] (port=62864 helo=mail.smartoptics.de) by mail.smartoptics.de with esmtps (TLSv1.2:AES256-GCM-SHA384:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1gP9dZ-0000b1-0M; Tue, 20 Nov 2018 18:16:33 +0100 Original-Received: from DESKTOP-I20T94P (192.168.0.184) by exchange.smart-optics.local (192.168.0.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Tue, 20 Nov 2018 18:16:32 +0100 X-CTCH-RefID: str=0001.0A0B0201.5BF44171.0026, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 In-Reply-To: <20181120155813.GA20667@joshua.dnsalias.com> (Mike Gran's message of "Tue, 20 Nov 2018 07:59:44 -0800") X-ClientProxiedBy: exchange.smart-optics.local (192.168.0.34) To exchange.smart-optics.local (192.168.0.34) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::11 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:19753 Archived-At: --=-=-= Content-Type: text/plain 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? > 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. > Good luck, > > Mike > Thanks Christoph --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="poll.in.h.patch" --- lib/poll.in.h.orig 2018-11-20 17:58:03.317863600 +0100 +++ lib/poll.in.h 2018-11-20 17:58:35.920887000 +0100 @@ -55,12 +55,12 @@ # if !GNULIB_defined_poll_types -struct pollfd -{ - int fd; /* which file descriptor to poll */ - short events; /* events we are interested in */ - short revents; /* events found on return */ -}; +/* struct pollfd */ +/* { */ +/* int fd; /\* which file descriptor to poll *\/ */ +/* short events; /\* events we are interested in *\/ */ +/* short revents; /\* events found on return *\/ */ +/* }; */ typedef unsigned long nfds_t; @@ -75,28 +75,28 @@ #endif -#if @GNULIB_POLL@ -# if @REPLACE_POLL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef poll -# define poll rpl_poll -# endif -_GL_FUNCDECL_RPL (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); -_GL_CXXALIAS_RPL (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); -# else -# if !@HAVE_POLL@ -_GL_FUNCDECL_SYS (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); -# endif -_GL_CXXALIAS_SYS (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); -# endif -_GL_CXXALIASWARN (poll); -#elif defined GNULIB_POSIXCHECK -# undef poll -# if HAVE_RAW_DECL_POLL -_GL_WARN_ON_USE (poll, "poll is unportable - " - "use gnulib module poll for portability"); -# endif -#endif +/* #if @GNULIB_POLL@ */ +/* # if @REPLACE_POLL@ */ +/* # if !(defined __cplusplus && defined GNULIB_NAMESPACE) */ +/* # undef poll */ +/* # define poll rpl_poll */ +/* # endif */ +/* _GL_FUNCDECL_RPL (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); */ +/* _GL_CXXALIAS_RPL (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); */ +/* # else */ +/* # if !@HAVE_POLL@ */ +/* _GL_FUNCDECL_SYS (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); */ +/* # endif */ +/* _GL_CXXALIAS_SYS (poll, int, (struct pollfd *pfd, nfds_t nfd, int timeout)); */ +/* # endif */ +/* _GL_CXXALIASWARN (poll); */ +/* #elif defined GNULIB_POSIXCHECK */ +/* # undef poll */ +/* # if HAVE_RAW_DECL_POLL */ +/* _GL_WARN_ON_USE (poll, "poll is unportable - " */ +/* "use gnulib module poll for portability"); */ +/* # endif */ +/* #endif */ #endif /* _@GUARD_PREFIX@_POLL_H */ --=-=-=--