[mercury-users] mdb default settings

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Sep 11 15:24:23 AEST 2006


On Mon, 11 Sep 2006, Peter Wang wrote:

> On 2006-09-11, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>>
>> 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).
>
> Ok.  You'd probably want to statically link convenience libraries
> anyway.  In dirA you'd run:
>
>    mmc -m libmoduleA --lib-linkage static
>
>> 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).
>
> Working with uninstalled libraries is not very convenient at the moment.

I agree.

> What about an option like `--mld' but for non-installed library
> directories?  `--search-all <dir>' (or whatever you want to call it)
> would be equivalent to
>
>    --search-directory <dir>	--library-directory <dir>
>    --init-file-directory <dir> --c-include-directory <dir>
>
> i.e. the same as --mld.  If you used the command-line above, you could
> now use this command in dirB:
>
>    mmc -m mainmodule --search-all ../dirA --ml moduleA

Wouldn't work on OS X where it would also have to set at least one environment
variable for that to work :(  (I'm not saying that it's not worth implementing
though.)

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