<div dir="ltr">I did try starting MSYS from a Windows Command Prompt, having updated the PATH in that Windows Command Prompt to include javac, but that also did not work, which implies that Mercury ignores the environment it was started in? There seems therefore to be no way to get this to work other than adding java to the default PATH for Windows which is a security risk. Is it necessary to do that?<div><br></div><div>Also, is there a way to tell make install to go ahead directly to the Java install? As it is it spends several hours building all the other grades, then throws them away because the already installed files are identical!</div><div><br></div><div>Mark</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 28 Apr 2021 at 16:15, Julien Fischer <<a href="mailto:jfischer@opturion.com">jfischer@opturion.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Hi Mark,<br>
<br>
On Tue, 27 Apr 2021, Mark Green wrote:<br>
<br>
> Sorry, I should have clarified, the JDK is already on the MSYS2 path<br>
> and javac and java run fine from the prompt, which is why the<br>
> non-matching "not found" message made me think it wasn't running<br>
> through that prompt. <br>
<br>
When you run javac it is from the MSYS2 shell; when the Mercury compiler<br>
runs it (as it does when building the library in the Java grades), it<br>
will be from the Windows command shell. (More specifically, it will be<br>
from whatever shell that C's system() function invokes on Windows --<br>
the one pointed to by the environment variable COMSPEC, which is usually<br>
cmd.exe.)<br>
<br>
Julien.<br>
<br>
> On Tue, 27 Apr 2021 at 18:49, Julien Fischer <<a href="mailto:jfischer@opturion.com" target="_blank">jfischer@opturion.com</a>> wrote:<br>
><br>
> Hi Mark,<br>
><br>
> On Tue, 27 Apr 2021, Mark Green wrote:<br>
><br>
> > I'm having two awkward problems on MSYS2 (other than the amazing amount of time it takes to build!)<br>
><br>
> The build system for Mercury relies heavily on GNU make which is known to<br>
> be quite slow on MinGW.<br>
><br>
> > 1. During the make process, it tells me that documentation could not<br>
> > be built "probably due to a missing info" and "probably due to a<br>
> > missing perl". Thing is, I explicitly installed info with pacman and<br>
> > perl is built into MSYS2.<br>
><br>
> The "probably" bit is important there's no way for the Mmakefile in the<br>
> doc directory to know exactly what the problem is. At a guess, you are<br>
> missing some of the tools required to build the documentation, most<br>
> likely makeinfo and texi2dvi.<br>
><br>
> Installing the packages "texinfo" and "texinfo-tex" using pacman should<br>
> provide the above. (I haven't tested this, since attempting to update<br>
> my rather out-of-date msys2 installation just killed pacman completely<br>
> :-( )<br>
><br>
> > 2. When it tries to make the Java grade, it builds a bunch of .java<br>
> > file, outputs "making class files", then produces "The system cannot<br>
> > find the file specified." - the Windows shell "file not found"<br>
> > message, not the MSYS2 one. This seems to imply that it might be<br>
> > looking on the Windows path for Java rather than the MSYS2 one and<br>
> > therefore not finding it. Is there a way to fix this?<br>
><br>
> It is usually sufficient to include the JDK's bin directory on the MSYS<br>
> PATH (as per README.MinGW). External commands invoked by the Mercury<br>
> compiler will run on the Window shell (i.e. whatever the enviroment<br>
> variable COMSPEC is pointing at, typically cmd.exe). This should<br>
> inherit the MSYS PATH when the Mercury compiler is invoked in the MSYS<br>
> shell.<br>
><br>
> Julien.<br>
> <br>
> <br>
></blockquote></div>