[m-users.] Trouble building on MSYS2 Win10

Mark Green mgreen at brookes.ac.uk
Thu Apr 29 06:01:58 AEST 2021


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?

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!

Mark


On Wed, 28 Apr 2021 at 16:15, Julien Fischer <jfischer at opturion.com> wrote:

>
> 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.
> >
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20210428/7fb90dd1/attachment.html>


More information about the users mailing list