[m-dev.] /usr/bin/ld: Undefined symbols:_MR_global_pointer _GC_register_dyn

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Apr 10 10:48:01 AEST 2001


On 09-Apr-2001, Terrence Brannon <princepawn at earthlink.net> wrote:
> On 30-Apr-2001, you wrote (and I quote _in full_):
> > Fergus Henderson writes:
> >  > On 30-Apr-2001, Terrence Brannon <princepawn at earthlink.net> wrote:
> >  > > On Mac OS X, in what appears to be the final link state, I get some undefined symbols:
> >  > > /usr/bin/ld: Undefined symbols:
> >  > > _MR_global_pointer
> 
> doing a rm runtime/*.o and remaking everything seemed to eliminate this undefined symbol

OK, great.
Probably that was a transient problem, perhaps caused by the
earlier errors during the build.

> >  > > _GC_register_dynamic_libraries
> 
> this symbol is in dyn_load.c. However, for some reason the 
> #if ... #else /* !PCR */ was not executing the else, so I deleted the entire
> file except for the else part in order to get this symbol to resolve.

That's not the right fix, at least not if you want to support shared libraries.

> >  > > ___data_start
> >  > > __end
> >  > > _data_start

These symbols are supposed to be defined by the linker.

> In gcconfig.h, I added the following two symbols:
> #define LINUX
> #define powerpc
> 
> but looking at the #ifdefs in this code, something else needs to be #defined
> but I don't know what. Can you make a suggestion for the Mac OS X
> architecture on this?

Before we get down to hacking it ourselves, it's probably best to see if
someone else has already ported the Boehm collector to Mac OS X.

Looking at
http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/recent_changes,
it looks like someone has; the changes are included in gc6.0alpha2.
These changes have not yet been merged into the Mercury distribution,
which is still using gc5.2.

I'll update the version of the Boehm collector in the Mercury CVS
repository with Hans Boehm's latest snapshot, i.e. gc6.0alpha6.
When I've done that, I'll let you know, and you can do a `cvs update -A'
in the boehm_gc directory and then try again.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list