[mercury-users] Wow! It worked on Mingw [was: Many data elements...]

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Feb 10 17:42:49 AEDT 2003

On 10-Feb-2003, Douglas Auclair <dauclair at msn.com> wrote:
> The mingw system is great! 

Thanks ;-)

> I've run into a few issues:
> 1) mmc --make seems not to work.  On whatever module I try it, it complains 
> that it cannot find builtin.m (whether it's a single module that produces 
> an executable or a group of modules).  mmc does not have this problem.  So, 
> I'm currently using mmake <module>.depend and mmake <module> to deliver my 
> executables for groups of modules and mmc <module> for a single-module 
> executable.

That sounds like a bug.  However, I can't reproduce it here.
For me, `mmc --make' works OK (except that on Windows it always relinks,
even if relinking is not needed -- this is a known issue in 0.11.0
which IIRC is fixed in our CVS repository).

Do you have the file
and the symbolic link
which should link to ".."?

What's the output of `mmc --make --verbose --debug-make hello'?

> 2) The generated executable needs cygwin1.dll to run, which seems to 
> indicate a cygwin dependency, even when using mercury_compile.mingw (which 
> is not a problem, but should I then include cygwin1.dll with my 
> deliveries?).

Ouch!  That is definitely not supposed to happen.

Ah, I see...  I've just had a look at that one, and I see what is causing
the problem.  On Cygwin, `gcc -mno-cygwin ... -lm' results in cygwin1.dll
being linked in.  The solution is to not use `-lm'.  Fortunately there
is a simple work-around: set the MERCURY_MATH_LIB environment variable
to the empty string.  I am currently testing a patch which should avoid
the need for this.

> 3) There's a hard-coded path dependency:  I installed the compiler into 
> h:\languages\mercury (aka /cygdrive/h/languages/mercury), but when I did 
> that, mmc complained that it could not find 
> /usr/local/mercury-0.11.0-mingw/bin/i686-pc-cygwin/mercury-compile[.mingw], 

There is a hard-coded path dependency, but it's only a hard-coded
dependency on the Cygwin path, not the Windows path.  So if you
want to install it on h:\languages\mercury, that's OK, but you
need to use the Cygwin "mount" command to mount that directory
to /usr/local/mercury-0.11.0-mingw.  Or alternatively you could
use a symbolic link, e.g. "ln -s /cygdrive/h/languages/mercury

> even though I had my MERCURY_HOME environmental variable set.

I'm not sure where you got the idea that setting MERCURY_HOME
would help.  As far as I can tell, neither the Mercury documentation
nor the source code mention "MERCURY_HOME".


Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  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