[mercury-users] Problem with mmake

Fergus Henderson fjh at cs.mu.OZ.AU
Wed May 30 16:40:24 AEST 2001

On 30-May-2001, Richard A. O'Keefe <ok at atlas.otago.ac.nz> wrote:
> I have been having problems with mercury-0.10 for Sparc/Solaris, so today
> I downloaded the binary release of mercury-0.10.1 for Sparc/Solaris and
> installed that.
> Given that pipes *do* work on Solaris, it is a real pity that the installation
> script keeps on doing
> 	gunzip foobar.gz
> 	FOOBAR=$cwd/foobar && (cd somewhere && tar -xf $FOOBAR)
> 	gzip foobar

Yes, I agree.  That has been bugging me for quite a long time, and I've been
meaning to get around to changing it.  The bug in Cygwin that this code was
there to work around has been fixed quite a while ago.

I've just committed a change to make it use pipes.
This will be in our next "rotd" binary distribution.

> When I do
>     % mmake xml
> the response is
> /tmp/mmake14826-0/mmake:595: warning: NUL character seen; rest of line ignored
> /tmp/mmake14826-0/mmake:596: warning: NUL character seen; rest of line ignored
> /tmp/mmake14826-0/mmake:596: *** missing separator.  Stop.

Hmm.  The way to debug these kinds of problems is to use `mmake -v -s',
which keeps the temporary makefile around as `Mmake.makefile',
and to then do `vi +595 Mmake.makefile'.  That will show you what
line is causing the problem, and then you can figure out where
that line came from -- either from your Mmakefile,
from the Mercury Mmake.vars or Mmake.rules files,
or from the *.d *.dv and *.dep files in the directory.

My guess is that you probably have a corrupt *.d *.dv or *.dep file
in the directory.  Such files can sometimes be created if you are using
NFS and you get an NFS timeout.

It might be simplest to just try `rm -f *.d *.dv *.dep' first.

> The source file is OK:
>     % mmc xml.m
> works fine, except that
>     % xml
> =>  ld.so.1: xml: fatal: relocation error: file xml:
> 	symbol GC_stackbottom: referenced symbol not found
>     Killed
>     % mmc -s asm_fast xml.m
> works fine too, except that
>     % xml
> =>  ld.so.1: xml: fatal: relocation error: file xml:
> 	symbol MR_grade_v3_asm_fast_tags2: referenced symbol not found
>     Killed
> Does anyone know what is causing these problems?

That looks like a different problem.  I suspect that the symbol it is
complaining about is just the first one from the Mercury runtime libraries.
I think for some reason it is not finding the Mercury libraries.

What's the output of `ldd ./xml'?

Also, what arguments is the Mercury linker passing to gcc?
(You can find out using `mmc --link-flags "-v" xml.m'.)
The `-R' options passed to gcc should enable the executable
to find the Mercury libraries.

> What can I do about them?

You might be able to work around the problem by setting LD_LIBRARY_PATH to


(replacing asm_fast.gc with the appropriate grade),
or by linking statically, using `--mercury-libs static' or `--static',
either with mmc

	mmc --link-flags "--mercury-libs static" xml.m
	mmc --link-flags "--static" xml.m

or with mmake by putting

	MLFLAGS=--mercury-libs static
	MLFLAGS=--mercury-libs static

in your Mmakefile.

> By the way, *DON'T* suggest that I install this stuff in /usr/local;

That shouldn't be needed.

BTW, which version of Solaris are you using?
And which version of gcc?

P.S. Thanks for your earlier comments about floating point.
I haven't had time to consider them in depth yet.

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-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe

More information about the users mailing list