[mercury-users] Building Mercury on Windows

Julien Fischer juliensf at cs.mu.OZ.AU
Wed Feb 9 17:31:05 AEDT 2005


On Sun, 6 Feb 2005, Sergey Khorev wrote:

> Hi, I'd like to share some experience with building ROTD on latest
> Cygwin (1.5.12-1).

Thanks!

>
> 1) scripts/ml hangs when trying to demangle (so I've set
> demangle=false by hands in ml :)
> I guess it arises from poor Cygwin FIFOs. Also I wonder whether latest
> Mercury is tested under Cygwin.
> Either this is latest Cygwin "feature" or Mercury team uses cross-gcc :)
>
Mercury is occasionally tested under Cygwin but not with any great
regularity.  We're approaching the next release so we'll certainly
testing it on Cygwin/MinGW more throughly.

> 2) gcc-3.3.x issues internal error during compilation , so I used gcc 3.4.1-1.
>
If it's not too much trouble could you let us know what the internal error
was.

> 3) java grade build fails (unfortunately, I didn't write down Mercury error :(
>
The java grade is fairly broken at the moment.  The best thing to do is
just disable it.  e.g. pass the option --disable-java grade to configure.

> Also I tried to build Mercury for MinGW (with -mno-cygwin)
>
> 1) trace/mercury_trace contains error at line 489:
>     jumpaddr = MR_trace_event_internal(cmd, interactive, &event_info);
>
...
Yes, that would be a bug.

>
> 2) Also SIFPROF is not defined and should be removed (of #ifdef'ed)
> from boehm_gc/if_not_there.c
>
> 3) It seems that instruction in README.MS-Windows is slightly
> incorrect, when it says about
> replacing mercury_compile.exe. I think that mercury_compile.exe should
> be replaced with Cygwin versions
> after `make` but before `make install` and then `touched` to prevent
> its rebuild. If not replaced, MinGW Mercury
> will look for /cygdrive/... files, (transformed into \cygdrive\...).
> Or maybe these lines should be cygpath'ed...
> Example of a such error:
>
> mmc --generate-dependencies --grade hlc.gc      --config-file /src/mercury-compi
> ler-rotd-2005-01-28-mingw/tmp_dir/scripts/Mercury.config.bootstrap --no-mercury-
> stdlib-dir -I/src/mercury-compiler-rotd-2005-01-28-mingw/tmp_dir/library --c-inc
> lude-directory /src/mercury-compiler-rotd-2005-01-28-mingw/tmp_dir/boehm_gc --c-
> include-directory /src/mercury-compiler-rotd-2005-01-28-mingw/tmp_dir/boehm_gc/i
> nclude --c-include-directory /src/mercury-compiler-rotd-2005-01-28-mingw/tmp_dir
> /mps_gc/code --c-include-directory /src/mercury-compiler-rotd-2005-01-28-mingw/t
> mp_dir/runtime -L/src/mercury-compiler-rotd-2005-01-28-mingw/tmp_dir/boehm_gc -L
> /src/mercury-compiler-rotd-2005-01-28-mingw/tmp_dir/mps_gc/code -L/src/mercury-c
> ompiler-rotd-2005-01-28-mingw/tmp_dir/runtime -L/src/mercury-compiler-rotd-2005-
> 01-28-mingw/tmp_dir/library -L/src/mercury-compiler-rotd-2005-01-28-mingw/tmp_di
> r/trace -L/src/mercury-compiler-rotd-2005-01-28-mingw/tmp_dir/mdbcomp -L/src/mer
> cury-compiler-rotd-2005-01-28-mingw/tmp_dir/browser --no-infer-all --halt-at-war
> n --no-warn-inferred-erroneous --strict-sequential --trace minimum --generate-mm
> c-deps --transitive-intermodule-optimization --no-warn-smart-recompilation --ena
> ble-termination  -R/usr/local/mercury-rotd-2005-01-28-mingw/lib/mercury/lib/hlc.
> gc/i686-pc-cygwin -R/usr/local/mercury-rotd-2005-01-28-mingw/lib/mercury/lib/i68
> 6-pc-cygwin --no-shlib-linker-use-install-name  --no-warn-nothing-exported   mer
> _std
> Error reading options file `\src\mercury-compiler-rotd-2005-01-28-mingw\tmp_dir\
> scripts\Mercury.config.bootstrap'.
> For more information, try recompiling with `-E'.
>
> 4) configure doesn't detect that hlc.par.gc couldn't be built with MinGW version
> (or, maybe, MinGW version should try to use Windows threads rather
> than pthreads?)
>
The use of pthreads is hard coded into the runtime, so it certainly
shouldn't be using Windows threads.

> 5) For some strange reason build of hl.gc grade failed in boehm_gc
> stage (it didn't find gc.a),
> It said that I can remove tmp_dir and restart the installation.
> When I removed tmp_dir and `make install` again, all goes OK. But INSTALL
> says "you may need to start from scratch again", so is tmp_dir removal safe?

Not sure about that one, the installation process with tmp_dir was only
just added.

We'll look into these problems.

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