[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guile 2.0.1: scm_init_guile() broken on Mac OS X 10.6.7
From: |
Hans Aberg |
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 |
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:
>>
>> Failed to get stack base for current thread.
>
> The code in question does this:
>
> void
> scm_init_guile ()
> {
> struct GC_stack_base stack_base;
>
> if (GC_get_stack_base (&stack_base) == 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);
> }
> }
>
> 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
Re: Guile 2.0.1: scm_init_guile() broken on Mac OS X 10.6.7,
Hans Aberg <=
Re: Guile 2.0.1: scm_init_guile() broken on Mac OS X 10.6.7, Hans Aberg, 2011/05/21