[mercury-users] mdb default settings

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Sep 11 10:19:57 AEST 2006

On Sat, 9 Sep 2006, Peter Wang wrote:

> Then in dirB you'd run:
>    mmc -m mainmodule -I../dirA -L../dirA -R../dirA -lmoduleA \
> 	--linkage static
> Wrapping that up in a normal makefile might be easier than dealing with
> Mmake.  The --linkage static should not be necessary, but there seems to
> be a bug in mmc --make at the moment.  You can also use --linkage shared.

No.  mmc --make is working fine.  The problem is that linking Mercury 
libraries with `-l' as opposed to `--ml' as you have done above is that
it is causing the compiler to invoke the linker in such a way that it
uses the shared versions of the Mercury libraries.  The resulting mixture
of PIC and non-PIC code doesn't work on x86 machines because of the way
the register %ebx is used.  (It works fine on other architectures).

Note, using `--ml' probably won't work in the above example either since
that option assumes that the Mercury library in question has been 
installed (which is not the case here).

mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au

More information about the users mailing list