From unknown Thu Jun 19 14:13:22 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#13386 <13386@debbugs.gnu.org> To: bug#13386 <13386@debbugs.gnu.org> Subject: Status: Fwd: bug#13342: Errors trying to build Guile 2.0.7 Reply-To: bug#13386 <13386@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:13:22 +0000 retitle 13386 Fwd: bug#13342: Errors trying to build Guile 2.0.7 reassign 13386 guile submitter 13386 Peter Teeson severity 13386 normal tag 13386 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 08 11:09:03 2013 Received: (at submit) by debbugs.gnu.org; 8 Jan 2013 16:09:03 +0000 Received: from localhost ([127.0.0.1]:56953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TsbjZ-0005H1-Nj for submit@debbugs.gnu.org; Tue, 08 Jan 2013 11:09:02 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43512) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TsbjV-0005Gb-7R for submit@debbugs.gnu.org; Tue, 08 Jan 2013 11:08:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsbjD-0006ad-9N for submit@debbugs.gnu.org; Tue, 08 Jan 2013 11:08:47 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HTML_FONT_FACE_BAD, HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:49853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsbjD-0006aZ-5U for submit@debbugs.gnu.org; Tue, 08 Jan 2013 11:08:39 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsbjA-0003dJ-4f for bug-guile@gnu.org; Tue, 08 Jan 2013 11:08:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tsbj7-0006a7-04 for bug-guile@gnu.org; Tue, 08 Jan 2013 11:08:36 -0500 Received: from nk11p08mm-asmtpout002.mac.com ([17.158.58.247]:57803 helo=nk11p08mm-asmtp002.mac.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tsbj6-0006Zy-Lq for bug-guile@gnu.org; Tue, 08 Jan 2013 11:08:32 -0500 MIME-version: 1.0 Content-type: multipart/alternative; boundary="Boundary_(ID_3bAMNUcD/+iMf2CCwDpcNg)" Received: from [192.168.2.10] (bas4-toronto21-1176476140.dsl.bell.ca [70.31.153.236]) by nk11p08mm-asmtp002.mac.com (Oracle Communications Messaging Server 7u4-26.01(7.0.4.26.0) 64bit (built Jul 13 2012)) with ESMTPSA id <0MGB00MHVE5X7T70@nk11p08mm-asmtp002.mac.com> for bug-guile@gnu.org; Tue, 08 Jan 2013 16:08:28 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8327,1.0.431,0.0.0000 definitions=2013-01-08_06:2013-01-08, 2013-01-08, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=6 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1301080118 From: Peter Teeson Subject: Fwd: bug#13342: Errors trying to build Guile 2.0.7 Date: Tue, 08 Jan 2013 11:08:22 -0500 References: <895C23AD-DD0D-40FC-AD5F-6CEF52365444@me.com> To: bug-guile@gnu.org Message-id: <8C684CFE-2E0A-48B1-8763-259109433D23@me.com> X-Mailer: Apple Mail (2.1283) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) --Boundary_(ID_3bAMNUcD/+iMf2CCwDpcNg) Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: quoted-printable Begin forwarded message: > From: Peter Teeson > Subject: Re: bug#13342: Errors trying to build Guile 2.0.7 > Date: 7 January, 2013 8:21:59 PM EST > To: Ludovic Court=E8s >=20 > Hi Ludo: >=20 > On 2013-01-04, at 12:23 PM, Ludovic Court=E8s wrote: >>>>> bad return from expression `(f-sum -1 2000 -30000 40000000000)': = expected 39999971999; got 39999972255 >>>>> FAIL: test-ffi >>>>=20 >>>> This is a known issue when building Guile with LLVM/Clang: >>>>=20 >>>> http://bugs.gnu.org/10015 >>>> http://bugs.gnu.org/10681 >>>>=20 >>>> It would be great if you could investigate. >=20 > Here is the result of my investigation - do you agree? > My hypothesis is that the scheme interpreter is not calculating the = sum correctly based on the following: >=20 > (0) First observe this > "In Apple's version of GCC, both cc and gcc are actually symbolic = links to the llvm-gcc compiler. Similarly, c++ and g++ are links to = llvm-g++." >=20 > (1) Also we note that 39999972255 - 39999971999 =3D 256! >=20 > (2) This program > // > // main.c > // testffi > // > // Created by Peter Teeson on 13-01-07. > // Copyright (c) 2013 PHT Software. All rights reserved. > // >=20 > #include > #include >=20 > int64_t test_ffi_sum (int8_t a, int16_t b, > int32_t c, int64_t d); > int64_t test_ffi_sum (int8_t a, int16_t b, > int32_t c, int64_t d) > { > printf("int64 d %" PRId64 " %#llX \n", d,d); > printf("int32 c %" PRId32 " %#X \n", c,c); > printf("int16 b %" PRId16 " %#X \n", b,b); > printf("int08 a %" PRId8 " %#X \n", a,a); >=20 > int64_t sum =3D d + c + b + a; > printf("int64 sum %" PRId64 " %#llX \n", sum,sum); >=20 > return sum; > } > int main(int argc, const char * argv[]) > { > test_ffi_sum(-1, 2000, -30000, 40000000000); > return 0; > } >=20 > (3) produces this output >=20 > int64 d 40000000000 0X9502F9000=20 > int32 c -30000 0XFFFF8AD0=20 > int16 b 2000 0X7D0=20 > int08 a -1 0XFFFFFFFF=20 > int64 sum 39999971999 0X9502F229F=20 >=20 > (4) This function in /guile-2.0.7/test-suite/standalone/test-ffi=20 > ;; > ;; Multiple int args of differing types > ;; > (define f-sum > (pointer->procedure int64 (dynamic-func "test_ffi_sum" lib) > (list int8 int16 int32 int64))) > (test (f-sum -1 2000 -30000 40000000000) > (+ -1 2000 -30000 40000000000)) >=20 > might be the culprit and I am guessing that it is this expression >=20 > (+ -1 2000 -30000 40000000000)=20 >=20 > which the scheme interpreter is calculating incorrectly. Probably = related to -1; >=20 > Since I am not familiar with the scheme/guile language I can't go any = further than this without help. > Let me know if I can do more. >=20 > respect=85.. >=20 > Peter --Boundary_(ID_3bAMNUcD/+iMf2CCwDpcNg) Content-type: text/html; charset=windows-1252 Content-transfer-encoding: quoted-printable
From: Peter Teeson <pteeson@me.com>
Subject: = Re: bug#13342: Errors trying to build Guile = 2.0.7
Date: 7 January, 2013 8:21:59 PM EST
To: Ludovic Court=E8s = <ludo@gnu.org>

Hi = Ludo:

On 2013-01-04, at 12:23 PM, Ludovic = Court=E8s wrote:
bad = return from expression `(f-sum -1 2000 -30000 40000000000)': expected = 39999971999; got = 39999972255
FAIL: = test-ffi

This is a known issue when = building Guile with LLVM/Clang:

http://bugs.gnu.org/10015
http://bugs.gnu.org/10681

It would be great if you could = investigate.

Her= e is the result of my investigation - do you agree?
My hypothesis is = that the scheme interpreter is not calculating the sum correctly = based on the following:

(0) First observe = this
"In Apple's version of GCC, both cc and gcc are = actually symbolic links to the llvm-gcc compiler.  Similarly, c++ = and g++ are links to = llvm-g++."

(1) Also we note = that 39999972255 - 39999971999 =3D = 256!

(2) This program
//  main.c
//  testffi
//
//  Created by Peter Teeson on = 13-01-07.
//  Copyright (c) 2013 = PHT Software. All rights reserved.
//

#include = <stdio.h>
#include = <inttypes.h>

int64_t test_ffi_sum (int8_t a, int16_t b,
          =                 int32_t c, int64_t d);
int64_t test_ffi_sum (int8_t a, int16_t = b,
int32_t c, int64_t d)
{
    printf("int64 d = %" PRId64 " %#llX = \n", d,d);
    = printf("int32 c %" PRId32 = " %#X \n", c,c);
    = printf("int16 b %" PRId16 = " %#X \n", b,b);
    = printf("int08 a %" PRId8 = " %#X \n", a,a);

  =   int64_t sum =3D d + c + b + = a;
    = printf("int64 sum %" = PRId64 " %#llX \n", = sum,sum);

    return sum;
}
int main(int argc, = const char * argv[])
{
    test_ffi_sum(-1, 2000, -30000, = 40000000000);
  =   return 0;
}

(3) produces this = output

int64 d 40000000000 = 0X9502F9000 
int32 c -30000 0XFFFF8AD0 
int08 a -1 = 0XFFFFFFFF 
int64 sum 39999971999 = 0X9502F229F 

(4) This function in =  /guile-2.0.7/test-suite/standalone/test-ffi 
;;
;; Multiple int args of differing types
;;
(define f-sum
  (pointer->procedure int64 = (dynamic-func "test_ffi_sum" lib)
            =           (list int8 int16 int32 = int64)))
(test (f-sum -1 2000 -30000 40000000000)
    =   (+ -1 2000 -30000 40000000000))

might be the culprit and I am guessing that it is = this expression

(+ -1 2000 -30000 = 40000000000) 
which the scheme interpreter is calculating = incorrectly. Probably related to -1;

Since I am not familiar with the = scheme/guile language I can't go any further than this without = help.
Let me know if I can do = more.

respect=85..

Peter
<= br>= --Boundary_(ID_3bAMNUcD/+iMf2CCwDpcNg)-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 28 07:57:13 2013 Received: (at control) by debbugs.gnu.org; 28 Jan 2013 12:57:14 +0000 Received: from localhost ([127.0.0.1]:52204 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TzoGv-0006HL-IH for submit@debbugs.gnu.org; Mon, 28 Jan 2013 07:57:13 -0500 Received: from mail1-relais-roc.national.inria.fr ([192.134.164.82]:15747) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TzoGs-0006H7-JK; Mon, 28 Jan 2013 07:57:12 -0500 X-IronPort-AV: E=Sophos;i="4.84,551,1355094000"; d="scan'208";a="191643330" Received: from unknown (HELO pluto) ([193.50.110.227]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 28 Jan 2013 13:56:43 +0100 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mark H Weaver Subject: Re: bug#13342: [PARTIALLY SOLVED] bug#13342: Errors trying to build Guile 2.0.7 References: <548C7791-6E30-43A9-9E38-05BEC03CEF8B@me.com> <87r4m22swf.fsf@gnu.org> <69FAB6BC-CFB2-49AC-B103-D57E454091F0@me.com> <877gnsvp49.fsf@gnu.org> <895C23AD-DD0D-40FC-AD5F-6CEF52365444@me.com> <7C7443E9-9DA7-493D-8321-F5859170BAB5@me.com> <87a9ru7m23.fsf@gnu.org> <87r4l6krkh.fsf@tines.lan> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 =?utf-8?Q?Pluvi=C3=B4se?= an 221 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Mon, 28 Jan 2013 13:56:43 +0100 In-Reply-To: <87r4l6krkh.fsf@tines.lan> (Mark H. Weaver's message of "Sun, 27 Jan 2013 20:46:22 -0500") Message-ID: <87libdea9g.fsf@gnu.org> User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: control Cc: 13342@debbugs.gnu.org, control@debbugs.gnu.org, Peter Teeson X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) retitle 13342 Clang, the FFI, and 8-bit signed integers merge 13342 13386 thanks Hello! Mark H Weaver skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: [...] >> I looked at Section 3.2.3 (=E2=80=9CParameter Passing=E2=80=9D) of the S= ysV ABI x86_64 >> PS but couldn=E2=80=99t find any evidence as to what the correct behavio= r is. > > I read the same section, and although it is not as clear as I'd prefer, > my interpretation is that the caller is responsible for sign-extending > signed chars to ints. What exactly in that section makes you think so? > Clang strictly requires callers to sign-extend, whereas GCC is tolerant > of callers who fail to do so. IMO, both behaviors are permitted by the > ABI. > > The problem is that libffi does *not* sign-extend arguments passed in > registers when making calls, which is IMO a bug that has gone (mostly) > unnoticed because of the tolerance and ubiquity of GCC. Oh, I see. >> However, on the caller side, both compilers emit the same code. This >> program: >> >> #include >> >> extern int64_t test_sum (int8_t a, int64_t b); >> >> int64_t >> foo (void) >> { >> return test_sum (-1, 123132); >> } >> >> leads to the following assembly with both compilers: >> >> foo: # @foo >> .cfi_startproc >> movl $-1, %edi >> movl $123132, %esi # imm =3D 0x1E0FC >> jmp test_sum # TAILCALL >> >> (And as we=E2=80=99ve seen, libffi does the same.) > > No, libffi does *not* do the same. Take a look at the relevant code: > > https://github.com/atgreen/libffi/blob/master/src/x86/ffi64.c#L488 Indeed! [...] > In summary, I think this is a bug in libffi. > > Note that it has already been reported that the libffi testsuite shows > many failures on OS X Lion, and the failures appear to be related to > this precise issue: Note that it=E2=80=99s not just Darwin: I tested with Clang on GNU/Linux. > http://sourceware.org/ml/libffi-discuss/2012/msg00162.html > > The libffi maintainer wrote "I'm going to chalk this up to compiler > bugs", based on his observation that the tests worked properly when > compiled with -O0. I think it's time to raise this issue again on the > libffi-discuss mailing list. Would you like to email them? Anyway, thanks for the thorough investigation! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 30 16:37:51 2013 Received: (at control) by debbugs.gnu.org; 30 Jan 2013 21:37:52 +0000 Received: from localhost ([127.0.0.1]:56333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0fLr-0005dR-Cf for submit@debbugs.gnu.org; Wed, 30 Jan 2013 16:37:51 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:16740) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0fLo-0005dD-K1; Wed, 30 Jan 2013 16:37:50 -0500 X-IronPort-AV: E=Sophos;i="4.84,572,1355094000"; d="scan'208";a="552661" Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 30 Jan 2013 22:36:06 +0100 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mark H Weaver Subject: Re: bug#13342: Errors trying to build Guile 2.0.7 References: <548C7791-6E30-43A9-9E38-05BEC03CEF8B@me.com> <877gmvjchx.fsf@tines.lan> Date: Wed, 30 Jan 2013 22:37:07 +0100 In-Reply-To: <877gmvjchx.fsf@tines.lan> (Mark H. Weaver's message of "Wed, 30 Jan 2013 03:34:02 -0500") Message-ID: <87622egxoc.fsf@gnu.org> User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: control Cc: 13342-done@debbugs.gnu.org, control@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) tags 13342 notabug thanks Hello! Mark H Weaver skribis: > FYI, I've posted about this to the libffi-discuss mailing list. > > http://sourceware.org/ml/libffi-discuss/2013/msg00012.html Thanks! So, according to , this is an LLVM bug. Peter: would you like to report it over at LLVM? Anyway, closing this bug now. Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 30 17:13:57 2013 Received: (at 13386) by debbugs.gnu.org; 30 Jan 2013 22:13:57 +0000 Received: from localhost ([127.0.0.1]:56371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0ful-0007QY-IQ for submit@debbugs.gnu.org; Wed, 30 Jan 2013 17:13:57 -0500 Received: from nk11p08mm-asmtpout002.mac.com ([17.158.58.247]:36567 helo=nk11p08mm-asmtp002.mac.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0fui-0007QL-UA; Wed, 30 Jan 2013 17:13:53 -0500 MIME-version: 1.0 Content-type: text/plain; charset=windows-1252 Received: from [192.168.2.10] (bas4-toronto21-1176476140.dsl.bell.ca [70.31.153.236]) by nk11p08mm-asmtp002.mac.com (Oracle Communications Messaging Server 7u4-26.01(7.0.4.26.0) 64bit (built Jul 13 2012)) with ESMTPSA id <0MHG004IZLPSTAC0@nk11p08mm-asmtp002.mac.com>; Wed, 30 Jan 2013 22:13:05 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8327,1.0.431,0.0.0000 definitions=2013-01-30_07:2013-01-30, 2013-01-30, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=38 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1301300180 From: Peter Teeson Content-transfer-encoding: quoted-printable Subject: bug#13342: closed (Re: bug#13342: Errors trying to build Guile 2.0.7) , bug#13386: closed (Re: bug#13342: Errors trying to build Guile 2.0.7) Date: Wed, 30 Jan 2013 17:13:05 -0500 Message-id: <50A70C8C-2AC1-47C9-8D5F-724C60DED6D4@me.com> To: 13342@debbugs.gnu.org, 13386@debbugs.gnu.org, Mark H Weaver , =?iso-8859-1?Q?Ludovic_Court=E8s?= X-Mailer: Apple Mail (2.1283) X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 13386 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Hi guys: Thanks for closing off those bugs. I have read all the emails you linked in your close emails and=20 completely understand the conversation.=20 Specially the comment by Michael Matz. That clearly confirms that it is an LLVM compiler bug. Good job both of you for digging down deeper and making things so clear. At least now we know. Would you please report this over at LLVM since you did the work to = discover it. Thanks again for your great patience and kindness in helping my fumbling = efforts. respect=85.. Peter From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 31 15:21:43 2013 Received: (at 13386) by debbugs.gnu.org; 31 Jan 2013 20:21:43 +0000 Received: from localhost ([127.0.0.1]:58101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U10dj-0000U6-AL for submit@debbugs.gnu.org; Thu, 31 Jan 2013 15:21:43 -0500 Received: from world.peace.net ([96.39.62.75]:57294) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U10df-0000Tt-OX; Thu, 31 Jan 2013 15:21:41 -0500 Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1U10cq-0003V9-RB; Thu, 31 Jan 2013 15:20:49 -0500 From: Mark H Weaver To: Peter Teeson Subject: Re: bug#13342: closed (Re: bug#13342: Errors trying to build Guile 2.0.7) , bug#13386: closed (Re: bug#13342: Errors trying to build Guile 2.0.7) References: <50A70C8C-2AC1-47C9-8D5F-724C60DED6D4@me.com> Date: Thu, 31 Jan 2013 15:20:39 -0500 In-Reply-To: <50A70C8C-2AC1-47C9-8D5F-724C60DED6D4@me.com> (Peter Teeson's message of "Wed, 30 Jan 2013 17:13:05 -0500") Message-ID: <87y5f9f6js.fsf@tines.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13386 Cc: 13342@debbugs.gnu.org, Ludovic =?utf-8?Q?Cour?= =?utf-8?Q?t=C3=A8s?= , 13386@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.0 (/) Hi Peter, Peter Teeson writes: > Would you please report this over at LLVM since you did the work to > discover it. Okay, I'll take care of it. I'm also working with the libffi folks to work around this problem in the interim. The next libffi release (due out fairly soon) will interface properly with the existing LLVM-compiled code on your system. Thanks again for helping us track this down. Regards, Mark From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 31 21:06:22 2013 Received: (at 13386) by debbugs.gnu.org; 1 Feb 2013 02:06:22 +0000 Received: from localhost ([127.0.0.1]:58307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U161G-0000q8-5I for submit@debbugs.gnu.org; Thu, 31 Jan 2013 21:06:22 -0500 Received: from nk11p08mm-asmtp002.mac.com ([17.158.58.247]:50714) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U161A-0000ps-9C; Thu, 31 Jan 2013 21:06:17 -0500 MIME-version: 1.0 Content-type: text/plain; charset=windows-1252 Received: from [192.168.2.10] (bas4-toronto21-1176476140.dsl.bell.ca [70.31.153.236]) by nk11p08mm-asmtp002.mac.com (Oracle Communications Messaging Server 7u4-26.01(7.0.4.26.0) 64bit (built Jul 13 2012)) with ESMTPSA id <0MHI002D8R4RCC60@nk11p08mm-asmtp002.mac.com>; Fri, 01 Feb 2013 02:05:17 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8327,1.0.431,0.0.0000 definitions=2013-01-31_06:2013-01-31, 2013-01-31, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=3 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1301310206 Subject: Re: bug#13342: closed (Re: bug#13342: Errors trying to build Guile 2.0.7) , bug#13386: closed (Re: bug#13342: Errors trying to build Guile 2.0.7) From: Peter Teeson In-reply-to: <87y5f9f6js.fsf@tines.lan> Date: Thu, 31 Jan 2013 21:05:14 -0500 Content-transfer-encoding: quoted-printable Message-id: <934DF4BA-B61B-49DE-895A-7B6CB7031E82@me.com> References: <50A70C8C-2AC1-47C9-8D5F-724C60DED6D4@me.com> <87y5f9f6js.fsf@tines.lan> To: Mark H Weaver X-Mailer: Apple Mail (2.1283) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13386 Cc: 13342@debbugs.gnu.org, =?iso-8859-1?Q?Ludovic_Court=E8s?= , 13386@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Hi Mark: I read the thread on libffi-discuss. When you think things are ready to test I'll be glad to do so on my Mac = setup. At present my boot system is MacOS 10.7.5 Lion. But I can boot into previous versions (Leopard 10.5, Snow Leopard 10.6) Just so you know=85. Peter On 2013-01-31, at 3:20 PM, Mark H Weaver wrote: > I'm also working with the libffi folks to work around this problem in > the interim. The next libffi release (due out fairly soon) will > interface properly with the existing LLVM-compiled code on your = system. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 02 08:12:38 2013 Received: (at 13386) by debbugs.gnu.org; 2 Feb 2013 13:12:39 +0000 Received: from localhost ([127.0.0.1]:60509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U1cta-0004qN-Cm for submit@debbugs.gnu.org; Sat, 02 Feb 2013 08:12:38 -0500 Received: from world.peace.net ([96.39.62.75]:59010) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U1ctY-0004qB-6r; Sat, 02 Feb 2013 08:12:37 -0500 Received: from c-98-217-64-74.hsd1.ma.comcast.net ([98.217.64.74] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1U1csZ-0001SW-Pm; Sat, 02 Feb 2013 08:11:36 -0500 From: Mark H Weaver To: Peter Teeson Subject: Re: bug#13342: closed (Re: bug#13342: Errors trying to build Guile 2.0.7) , bug#13386: closed (Re: bug#13342: Errors trying to build Guile 2.0.7) References: <50A70C8C-2AC1-47C9-8D5F-724C60DED6D4@me.com> <87y5f9f6js.fsf@tines.lan> <934DF4BA-B61B-49DE-895A-7B6CB7031E82@me.com> Date: Sat, 02 Feb 2013 08:11:26 -0500 In-Reply-To: <934DF4BA-B61B-49DE-895A-7B6CB7031E82@me.com> (Peter Teeson's message of "Thu, 31 Jan 2013 21:05:14 -0500") Message-ID: <871ucydfnl.fsf@tines.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13386 Cc: 13342@debbugs.gnu.org, Ludovic =?utf-8?Q?Cour?= =?utf-8?Q?t=C3=A8s?= , 13386@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) --=-=-= Content-Type: text/plain Hi Peter, Peter Teeson wrote: > When you think things are ready to test I'll be glad to do so on my > Mac setup. I believe that this libffi patch will fix the problem. Would you like to test it? It would also be helpful if you could run "make check" on both libffi and Guile and let us know of any failures. There's no need to test on older versions of the OS. Thanks again! Mark --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=SIGN_EXTEND_SINT_ARGS.patch Content-Description: SIGN_EXTEND_SINT_ARGS.patch diff --git a/src/x86/ffi64.c b/src/x86/ffi64.c index b8a823d..2014af2 100644 --- a/src/x86/ffi64.c +++ b/src/x86/ffi64.c @@ -484,8 +484,25 @@ ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) { case X86_64_INTEGER_CLASS: case X86_64_INTEGERSI_CLASS: - reg_args->gpr[gprcount] = 0; - memcpy (®_args->gpr[gprcount], a, size < 8 ? size : 8); + /* Sign-extend integer arguments passed in general + purpose registers, to cope with the fact that + LLVM incorrectly assumes that this will be done + (the x86-64 PS ABI does not specify this). */ + switch (arg_types[i]->type) + { + case FFI_TYPE_SINT8: + *(SINT64 *)®_args->gpr[gprcount] = (SINT64) *((SINT8 *) a); + break; + case FFI_TYPE_SINT16: + *(SINT64 *)®_args->gpr[gprcount] = (SINT64) *((SINT16 *) a); + break; + case FFI_TYPE_SINT32: + *(SINT64 *)®_args->gpr[gprcount] = (SINT64) *((SINT32 *) a); + break; + default: + reg_args->gpr[gprcount] = 0; + memcpy (®_args->gpr[gprcount], a, size < 8 ? size : 8); + } gprcount++; break; case X86_64_SSE_CLASS: --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 02 19:06:21 2013 Received: (at 13386) by debbugs.gnu.org; 3 Feb 2013 00:06:21 +0000 Received: from localhost ([127.0.0.1]:33325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U1n6C-0003OA-I7 for submit@debbugs.gnu.org; Sat, 02 Feb 2013 19:06:21 -0500 Received: from nk11p08mm-asmtp001.mac.com ([17.158.58.246]:57025) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U1n69-0003Nw-Cf; Sat, 02 Feb 2013 19:06:18 -0500 MIME-version: 1.0 Content-type: multipart/alternative; boundary="Boundary_(ID_T/LVmTN9a6FG0pasHGVPzw)" Received: from [192.168.2.10] (bas4-toronto21-1176476140.dsl.bell.ca [70.31.153.236]) by nk11p08mm-asmtp001.mac.com (Oracle Communications Messaging Server 7u4-26.01(7.0.4.26.0) 64bit (built Jul 13 2012)) with ESMTPSA id <0MHM00DJPAWU0S20@nk11p08mm-asmtp001.mac.com>; Sun, 03 Feb 2013 00:05:20 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8327,1.0.431,0.0.0000 definitions=2013-02-02_05:2013-02-01, 2013-02-02, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=3 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1302020231 Subject: Re: bug#13342: closed (Re: bug#13342: Errors trying to build Guile 2.0.7) , bug#13386: closed (Re: bug#13342: Errors trying to build Guile 2.0.7) From: Peter Teeson In-reply-to: <871ucydfnl.fsf@tines.lan> Date: Sat, 02 Feb 2013 19:05:17 -0500 Message-id: <9928B119-802A-4C4E-A38F-00779C1A8CFA@me.com> References: <50A70C8C-2AC1-47C9-8D5F-724C60DED6D4@me.com> <87y5f9f6js.fsf@tines.lan> <934DF4BA-B61B-49DE-895A-7B6CB7031E82@me.com> <871ucydfnl.fsf@tines.lan> To: Mark H Weaver X-Mailer: Apple Mail (2.1283) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13386 Cc: 13342@debbugs.gnu.org, =?iso-8859-1?Q?Ludovic_Court=E8s?= , 13386@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --Boundary_(ID_T/LVmTN9a6FG0pasHGVPzw) Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: quoted-printable Hi Mark: The short answer is: make check-am =85... make check-TESTS PASS: test-system-cmds =85... PASS: test-asmobs PASS: test-ffi PASS: test-list =85=85 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D All 29 tests passed =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D In more detail the following steps: Unzipped libffi-3.0.11.tar.gz Downloaded libffi-3.0.11-includedir-1.patch Applied that patch Had to manually apply your diff file patch (I'll explain in more detail if you wish) Built and installed libffi in the usual manner. Then did the same process for guile-2.0.7.tar.gz did ./configure && make && make check got the above results. Here's the summary Totals for this test run: passes: 35268 failures: 0 unexpected passes: 0 expected failures: 6 unresolved test cases: 34 untested test cases: 1 unsupported test cases: 9 errors: 0 PASS: check-guile Anything else I can do to help? Peter --Boundary_(ID_T/LVmTN9a6FG0pasHGVPzw) Content-type: text/html; charset=windows-1252 Content-transfer-encoding: quoted-printable Hi = Mark:
The short answer is:
make =  check-am
=85...
make =  check-TESTS
PASS: = test-system-cmds
=85...
PASS: = test-asmobs
PASS: test-ffi
PASS: = test-list
=85=85
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D
All 29 tests = passed
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=


In more detail the = following = steps:
Unzipped libffi-3.0.11.tar.gz
Downloaded&n= bsp;libffi-3.0.11-includedir-1.patch
Applied that = patch
Had to manually apply your diff file = patch

(I'll explain in more detail if you = wish)

Built and installed libffi in the usual = manner.

Then did the same process = for guile-2.0.7.tar.gz
did ./configure && make = && make check
got the above = results.

Here's the = summary
Totals for this test run:
passes:       =           35268
failures:       =         0
unexpected passes:   =    0
expected failures:     =  6
unresolved test cases:  34
untested test cases:   =  1
unsupported test cases: 9
errors:       =           0

PASS: = check-guile


Anything = else I can do to = help?

Peter




= --Boundary_(ID_T/LVmTN9a6FG0pasHGVPzw)-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 02 22:23:33 2013 Received: (at 13386) by debbugs.gnu.org; 3 Feb 2013 03:23:33 +0000 Received: from localhost ([127.0.0.1]:33420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U1qB2-0000y8-Al for submit@debbugs.gnu.org; Sat, 02 Feb 2013 22:23:32 -0500 Received: from world.peace.net ([96.39.62.75]:59729) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U1qAz-0000xv-Uu; Sat, 02 Feb 2013 22:23:30 -0500 Received: from c-98-217-64-74.hsd1.ma.comcast.net ([98.217.64.74] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1U1q9x-0003kd-T9; Sat, 02 Feb 2013 22:22:26 -0500 From: Mark H Weaver To: Peter Teeson Subject: Re: bug#13342: closed (Re: bug#13342: Errors trying to build Guile 2.0.7) , bug#13386: closed (Re: bug#13342: Errors trying to build Guile 2.0.7) References: <50A70C8C-2AC1-47C9-8D5F-724C60DED6D4@me.com> <87y5f9f6js.fsf@tines.lan> <934DF4BA-B61B-49DE-895A-7B6CB7031E82@me.com> <871ucydfnl.fsf@tines.lan> <9928B119-802A-4C4E-A38F-00779C1A8CFA@me.com> Date: Sat, 02 Feb 2013 22:22:16 -0500 In-Reply-To: <9928B119-802A-4C4E-A38F-00779C1A8CFA@me.com> (Peter Teeson's message of "Sat, 02 Feb 2013 19:05:17 -0500") Message-ID: <87boc2axp3.fsf@tines.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13386 Cc: 13342@debbugs.gnu.org, Ludovic =?utf-8?Q?Cour?= =?utf-8?Q?t=C3=A8s?= , 13386@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Peter Teeson writes: > =E2=80=A6... > PASS: test-asmobs > PASS: test-ffi > PASS: test-list > =E2=80=A6=E2=80=A6 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > All 29 tests passed > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Excellent! We can now submit the libffi patch upstream. Thanks, Mark From unknown Thu Jun 19 14:13:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 03 Mar 2013 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator