From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.lisp.guile.user Subject: Re: Unable to compile Guile Date: Mon, 10 Nov 2014 12:44:55 +0200 Message-ID: <83d28vnxlk.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1415616351 15236 80.91.229.3 (10 Nov 2014 10:45:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Nov 2014 10:45:51 +0000 (UTC) Cc: guile-user@gnu.org To: jeremy chen Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Nov 10 11:45:44 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 1XnmTc-0004qi-Kh for guile-user@m.gmane.org; Mon, 10 Nov 2014 11:45:40 +0100 Original-Received: from localhost ([::1]:41879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnmTc-0001XP-A3 for guile-user@m.gmane.org; Mon, 10 Nov 2014 05:45:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnmTE-0001WT-Ro for guile-user@gnu.org; Mon, 10 Nov 2014 05:45:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XnmT6-0006RR-Cp for guile-user@gnu.org; Mon, 10 Nov 2014 05:45:16 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:41191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnmT6-0006Oq-53 for guile-user@gnu.org; Mon, 10 Nov 2014 05:45:08 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NET00300KGOKH00@a-mtaout21.012.net.il> for guile-user@gnu.org; Mon, 10 Nov 2014 12:45:06 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NET003KXKJ5K800@a-mtaout21.012.net.il>; Mon, 10 Nov 2014 12:45:06 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 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:11628 Archived-At: > 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'. You need to fix Guile to support the LLP64 model, at least in this module, and probably elsewhere as well.