From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.user Subject: Re: Unable to compile Guile Date: Tue, 11 Nov 2014 11:31:39 -0500 Message-ID: <87h9y5itqs.fsf@yeeloong.lan> References: <83d28vnxlk.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1415723607 28703 80.91.229.3 (11 Nov 2014 16:33:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Nov 2014 16:33:27 +0000 (UTC) Cc: guile-user@gnu.org, jeremy chen To: Eli Zaretskii Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Nov 11 17:33:22 2014 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XoENc-00025N-4O for guile-user@m.gmane.org; Tue, 11 Nov 2014 17:33:20 +0100 Original-Received: from localhost ([::1]:49622 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoENb-0007hh-Mv for guile-user@m.gmane.org; Tue, 11 Nov 2014 11:33:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoENL-0007dc-Ov for guile-user@gnu.org; Tue, 11 Nov 2014 11:33:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoENF-0003Xn-RL for guile-user@gnu.org; Tue, 11 Nov 2014 11:33:03 -0500 Original-Received: from world.peace.net ([96.39.62.75]:43041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoENF-0003XL-OU; Tue, 11 Nov 2014 11:32:57 -0500 Original-Received: from c-24-62-95-23.hsd1.ma.comcast.net ([24.62.95.23] helo=yeeloong.lan) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XoEN8-0001ch-Ot; Tue, 11 Nov 2014 11:32:50 -0500 In-Reply-To: <83d28vnxlk.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 10 Nov 2014 12:44:55 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 96.39.62.75 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11633 Archived-At: Eli Zaretskii writes: >> Date: Sun, 9 Nov 2014 23:30:07 -0500 >> From: jeremy chen >> >> Hi, I am trying to compile guile on windows with Mingw-w64. >> The file libguile/numbers.c signal an error in this function: >> >> static SCM >> scm_i_inum2big (scm_t_inum x) >> { >> /* Return a newly created bignum initialized to X. */ >> SCM z = make_bignum (); >> #if SIZEOF_VOID_P == SIZEOF_LONG >> mpz_init_set_si (SCM_I_BIG_MPZ (z), x); >> #else >> /* Note that in this case, you'll also have to check all mpz_*_ui and >> mpz_*_si invocations in Guile. */ >> #error creation of mpz not implemented for this inum size >> #endif >> return z; >> } >> >> sizeof(void*) is 8 and sizeof(long) is 4 on my machine. >> Anyway to get around this? Thanks. > > This is a bug in Guile: it assumes the LP64 data model, where both > 'long' and a pointer are 64-bit wide. But 64-bit Windows uses the > LLP64 model, where 'long' is a 32-bit data type, and the 64-bit > integer data type is 'long long' or '__int64'. Indeed. I've filed a ticket for this issue: http://bugs.gnu.org/19019 It will take some time to find and fix all the places where this assumption is made, but I will make an effort to do so in the coming months. Thanks, Mark