From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hans Aberg Newsgroups: gmane.lisp.guile.bugs Subject: Re: Guile 2.0.1: scm_init_guile() broken on Mac OS X 10.6.7 Date: Sat, 21 May 2011 14:58:24 +0200 Message-ID: References: <87aafb2w68.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1305982721 32113 80.91.229.12 (21 May 2011 12:58:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 21 May 2011 12:58:41 +0000 (UTC) Cc: bug-guile bug To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat May 21 14:58:36 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QNllL-0003Sq-KF for guile-bugs@m.gmane.org; Sat, 21 May 2011 14:58:35 +0200 Original-Received: from localhost ([::1]:37133 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNllK-0003HC-RH for guile-bugs@m.gmane.org; Sat, 21 May 2011 08:58:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNllI-0003Gq-7V for bug-guile@gnu.org; Sat, 21 May 2011 08:58:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNllH-00034q-3X for bug-guile@gnu.org; Sat, 21 May 2011 08:58:32 -0400 Original-Received: from smtp-out11.han.skanova.net ([195.67.226.200]:35641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNllG-00034Z-Ld for bug-guile@gnu.org; Sat, 21 May 2011 08:58:31 -0400 Original-Received: from [10.0.1.2] (217.210.127.13) by smtp-out11.han.skanova.net (8.5.133) (authenticated as u26619196) id 4D6512CA021AC348; Sat, 21 May 2011 14:58:26 +0200 In-Reply-To: X-Mailer: Apple Mail (2.1084) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.67.226.200 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5600 Archived-At: On 20 May 2011, at 12:11, Andy Wingo wrote: >> On Mac OS X 10.6.7, compiled using Xcode Version 3.2.6 64-bit, >> i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1, scm_init_guile() gives the >> error: >>=20 >> Failed to get stack base for current thread. >=20 > The code in question does this: >=20 > void > scm_init_guile () > { > struct GC_stack_base stack_base; >=20 > if (GC_get_stack_base (&stack_base) =3D=3D GC_SUCCESS) > scm_i_init_thread_for_guile (&stack_base, > scm_i_default_dynamic_state); > else > { > fprintf (stderr, "Failed to get stack base for current = thread.\n"); > exit (1); > } > } >=20 > As you can see we rely on libgc here, and so this is a libgc bug. In the file libguile/threads.c, there is a GC_get_stack_base() defined, = always returning GC_SUCCESS, if HAVE_PTHREAD_GET_STACKADDR_NP is = defined. I changed both occurrences to GC_get_stack_base0, and get a = linker error. So what happens is that the linker gets hold of another = GC_get_stack_base() in the bdwgc-7_2alpha5-20110107 package. Hans