[m-users.] Trouble building on MSYS2 Win10

Julien Fischer jfischer at opturion.com
Thu Apr 29 01:15:26 AEST 2021


Hi Mark,

On Tue, 27 Apr 2021, Mark Green wrote:

> Sorry, I should have clarified, the JDK is already on the MSYS2 path
> and javac and java run fine from the prompt, which is why the
> non-matching "not found" message made me think it wasn't running
> through that prompt. 

When you run javac it is from the MSYS2 shell; when the Mercury compiler
runs it (as it does when building the library in the Java grades), it
will be from the Windows command shell.  (More specifically, it will be
from whatever shell that C's system() function invokes on Windows --
the one pointed to by the environment variable COMSPEC, which is usually
cmd.exe.)

Julien.

> On Tue, 27 Apr 2021 at 18:49, Julien Fischer <jfischer at opturion.com> wrote:
>
>       Hi Mark,
>
>       On Tue, 27 Apr 2021, Mark Green wrote:
>
>       > I'm having two awkward problems on MSYS2 (other than the amazing amount of time it takes to build!)
>
>       The build system for Mercury relies heavily on GNU make which is known to
>       be quite slow on MinGW.
>
>       > 1. During the make process, it tells me that documentation could not
>       > be built "probably due to a missing info" and "probably due to a
>       > missing perl". Thing is, I explicitly installed info with pacman and
>       > perl is built into MSYS2.
>
>       The "probably" bit is important there's no way for the Mmakefile in the
>       doc directory to know exactly what the problem is.  At a guess, you are
>       missing some of the tools required to build the documentation, most
>       likely makeinfo and texi2dvi.
>
>       Installing the packages "texinfo" and "texinfo-tex" using pacman should
>       provide the above. (I haven't tested this, since attempting to update
>       my rather out-of-date msys2 installation just killed pacman completely
>       :-( )
>
>       > 2. When it tries to make the Java grade, it builds a bunch of .java
>       > file, outputs "making class files", then produces "The system cannot
>       > find the file specified." - the Windows shell "file not found"
>       > message, not the MSYS2 one. This seems to imply that it might be
>       > looking on the Windows path for Java rather than the MSYS2 one and
>       > therefore not finding it. Is there a way to fix this?
>
>       It is usually sufficient to include the JDK's bin directory on the MSYS
>       PATH (as per README.MinGW).  External commands invoked by the Mercury
>       compiler will run on the Window shell (i.e. whatever the enviroment
>       variable COMSPEC is pointing at, typically cmd.exe).  This should
>       inherit the MSYS PATH when the Mercury compiler is invoked in the MSYS
>       shell.
>
>       Julien.
> 
> 
>


More information about the users mailing list