[m-users.] Java grade missing!!?!?

Julien Fischer jfischer at opturion.com
Wed Jul 31 20:29:45 AEST 2019


On Wed, 31 Jul 2019, emacstheviking wrote:

> I have a github build running:
> 
> Mercury Compiler, version DEV, on x86_64-pc-linux-gnu
> Copyright (C) 1993-2012 The University of Melbourne
> Copyright (C) 2013-2019 The Mercury team
> Usage: mmc [<options>] <arguments>
> Use `mmc --help' for more information.
> 
> mmc --make --target java gives me:
> Use of Boehm GC is incompatible with target language Java

You probably don't want to use the --target option directly.
The above has set the target language to Java, but left the --gc option
at its default value (e.g. boehm, it needs to be "automatic" for the
non-C grades).  Just use the --grade option and it will set all the
appropriate options for you.

> but using
> mmc --make --grade java j1

The compiler should be giving an error message about the Java grade not
being installed.   (It's possible if there are files left over from a
previous broken installation that error won't be detected however.)

...

> So I don't know if I have not got the Java grade or there is some
> other issue. The man page doesn't seem to mention a "list all the
> available grades".

It is:

     --output-libgrades
         Print the list of compilation grades in which a library
         to be installed should be built to the standard output.

If you do:

    $ mmc --output-libgrades

with no other options, then it will print the list of installed grades.

> I just git pulled the latest from the repo so I am
> ready to build again and I would like to have:
>   - hlc
>   - erlang
>   - java
>   - c#
> 
> My configuration incantation the last time I built was:
> ./configure --enable-libgrades=hlc.gc,none.gc.stseg,none.gc.debug.stseg

And that would install exactly the grades listed.  If you want to
install the non-C grades just include them in that list, e.g.

      --enable-libgrades=hlc.gc,none.gc.stseg,none.gc.debug.stseg,java,csharp,erlang

> I am not sure what options to pass for erlang, java and c# as they
> probably don't use the Boehm GC either...

As I mentioned above, setting the gc is usually handled implicitly.

Julien.


More information about the users mailing list