prismmodelchecker / prism

The main development version of the PRISM model checker.
http://www.prismmodelchecker.org/
GNU General Public License v2.0
157 stars 73 forks source link

Problems building with Eclipse on MacOS with M1 #252

Open rpgoldman opened 2 months ago

rpgoldman commented 2 months ago

I checked out a copy of the PRISM repo, and built it with gmake. The build completed successfully.

Then I installed eclipse using brew install eclipse-java.

I started up Eclipse following the instructions here.

The last step was to do "Project > Clean" as instructed:

You probably now want to re-compile PRISM's Java code using Eclipse (select "Project | Clean...") to check that everything is working and to make sure that the code gets compiled with debugging info.

When I did so, though, Eclipse gave me 9,221 errors!

I wonder if there is a simple configuration problem, since the errors I have looked at involve being unable to resolve type references:

image

I feel confident that this is a stupid error on my part, and apologize in advance.

rpgoldman commented 2 months ago

Partial solution: switch to use JRE System Library with JavaSE-1.8 in the PRISM project settings > Java Build Path > Libraries.

That resolves all the "cannot be resolved" errors -- probably because Java 23 has a much more restricted set of libraries.

But now there are a smaller set of errors because PRISM uses syntax constructs that are not in 1.8.

image

I tried switching to 9, but when I do version 9 comes from Java 23 which has the smaller set of libraries and so goes back to the "cannot be resolved" errors.

We note that the Oracle web site says to use 1.8 on Mac.