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

Terrence Brannon princepawn at earthlink.net
Tue May 1 11:22:22 AEST 2001


Fergus Henderson writes:
 > 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.

2 questions:

I sort of mucked about in several places in the root of the
distribution and a few subdirs, defining LINUX and
PPC and whatever else to keep the compilation going.

1-  What file should I have altered so that -DLINUX and -DPPC would
propagate into all the sub-directories? Also, is there something else
I should've defined for this build to propagate through all the subdirs?

2- Is there someway to do a recursive diff between what I have and
what the de facto Mercury release is so that I can log my changes?
This may be of use to others porting to Mac OS X later?

 > 
 > > >  > > ___data_start
 > > >  > > __end
 > > >  > > _data_start
 > 
 > These symbols are supposed to be defined by the linker.

But apparently they were not. Do you think they will be on the next iteration?

 > 
 > > 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.

Thank god for Andrew Stone.

 > 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.
 
I have made changes willy-nilly in that directory unfortunately. At
this point, I will untar it again from the original Mercury tarfile
and then wait for your instructions to the CVS update.

--------------------------------------------------------------------------
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