[m-dev.] /usr/bin/ld: Undefined symbols:_MR_global_pointer _GC_register_dynamic_libraries ___data_start __end _data_start
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Apr 10 23:53:27 AEST 2001
On 01-May-2001, Terrence Brannon <princepawn at earthlink.net> wrote:
> Fergus Henderson writes:
> > `MR_global_pointer' is supposed to be defined in runtime/mercury_dummy.o,
> > which should get linked into runtime/libmer_rt.a.
> > Try `nm' on runtime/mercury_dummy.o.
>
> Ok, I took a close look at Boehm's changelog and it appears that the
> change to support os x occurred in 5.0. So I got that release and took
> a look at gcconfig.h, put #define macosx at the top and then make test
> worked perfectly.
>
> so then I copied dyn_load.c and gcconfig.h from the 5.0 distribution
> into the Mercury tree and made it through the compilation of boehm_gc
> directory.
Hmm, OK... but there were some changes to the Mac OS X support in
gc6.0alpha2. I've merged in gc6.0alpha6 and committed that to the
Mercury cvs repository now. So you might want to try that.
However, I don't think that has anything to do with your other problem:
> However, the final link is still not finding MR_global_pointer
>
> nm on libmr_rt.a yields:
>
> libmer_rt.a(mercury_dummy.o):
> 00000000 T _MR_dummy_function_call
> 00000004 T _MR_dummy_identify_function
> 00000004 C _MR_global_pointer
> 00000004 C _MR_global_pointer_2
>
> nm on mercury_dummy.o yields:
>
> 00000000 T _MR_dummy_function_call
> 00000004 T _MR_dummy_identify_function
> 00000004 C _MR_global_pointer
> 00000004 C _MR_global_pointer_2
They both look correct.
> so I don't know how to fix this final problem.
Nor do I.
It might be a linker bug.
Is the libmer_rt.a file being linked in?
You could try putting
EXTRA_MLFLAGS=-v
or
EXTRA_MLFLAGS=-v -- -v
in a file named Mmake.params in the top-level mercury directory --
that should give you a bit more verbose information about exactly
how the linker is being invoked.
--
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