[m-rev.] diff: fix bug #339: --restricted-command-line broken with recent Java compilers

Sebastian Godelet sebastian.godelet at outlook.com
Wed Jul 15 14:26:58 AEST 2015


Hi,

The compiler is compiled in a msys environment,
But I tested it in a normal Windows command shell.
In my Mercury.config file I have --env-type windows.
Nevertheless, if I open an msys shell and use:

$ mmc --use-grade-subdirs --env-type msys -s java -m fmt_bug
cp: cannot stat `Mercury\\java\\i686-pc-mingw32\\Mercury\\bin\\fmt_bug': No such file or directory
Made symlink/copy of Mercury\java\i686-pc-mingw32\Mercury\jars\fmt_bug.jar
mercury_compile.exe: error copying `Mercury\java\i686-pc-mingw32\Mercury\bin\fmt_bug' to `fmt_bug', can't open input file: No such file or directory

The same problem applies. Again, without the --use-grade-subdirs the correct file gets copid.
I should mention that in the former case (Windows cmd), the subdir
Mercury\java\i686-pc-mingw32\Mercury\bats
Does contain the bat file, just it seems that the `cp' command is not looking in that folder.

On a side note, if I use --env-type msys, the java class path still uses the c:/ Windows path convention in the
Shell script and thus cannot be executed (though I think that is a different problem).

> -----Original Message-----
> From: Julien Fischer [mailto:jfischer at opturion.com]
> Sent: Wednesday, July 15, 2015 12:14 PM
> To: Sebastian Godelet
> Cc: Julien Fischer; reviews at lists.mercurylang.org
> Subject: RE: [m-rev.] diff: fix bug #339: --restricted-command-line broken with
> recent Java compilers
> 
> 
> Hi Sebastian,
> 
> On Wed, 15 Jul 2015, Sebastian Godelet wrote:
> 
> > I've compiled Mercury on Windows 8.1 with Java 1.8 and mmc now is able to
> invoke the
> > Java compiler. However, there seems to be a bug in the batch file creation,
> > When I use --use-grade-subdirs, the <name>.bat file cannot be found, since
> > It is not looking in the grade specific directory, i.e.:
> > Mercury\java\i686-pc-mingw32\Mercury\bats
> > Invoking without --use-grade-subdirs works however
> >
> > mmc --use-grade-subdirs -s java -m fmt_bug
> > cp: cannot stat `Mercury\\java\\i686-pc-
> mingw32\\Mercury\\bin\\fmt_bug.bat': No such file or directory
> > Made symlink/copy of Mercury\java\i686-pc-
> mingw32\Mercury\jars\fmt_bug.jar
> > mercury_compile.exe: error copying `Mercury\java\i686-pc-
> mingw32\Mercury\bin\fmt_bug.bat' to `fmt_bug.bat', can't open input file: No
> such file or directory
> 
> Are you running the compiler under MSYS, or Cygwin or directly on the
> Windows command line?
> 
> Cheers,
> Julien.




More information about the reviews mailing list