Compiling the latest clojure-clr in the latest VS2022 I get an error, with Clojure.Compile.exe exiting with code -532462766. This occurred while compiling the core libraries. There are also 44 actual compiler warnings, most of them related to obsolete API calls.
What can I do to figure out the actual nature of the error code? I should note that it fails with Project "Clojure.Compile (net462)" - I'm trying to determine if all the other targets compiled OK.
OK so after successfully compiling clojure.repl.deps in 2 milliseconds, an exception is thrown:
Unhandled Exception: System.TypeInitializaitonException: the type initializer for 'clojure.lang.RT' threw an exception: ---> clojure.lang.Compiler+CompilerException: Syntax error at ...
The rest of the stack trace does not help me understand where it happened.It might be helpful for me to see the rest of the stack trace. clojure.lang.Compiler+CompilerException is usually wrapping a nested exception. Even the rest of that very long line would be helpful. "Syntax error" is not one I would expect. Particularly if compiles for other platforms are working. Easiest way to see if the compiles for other platforms are working is to look in Clojure.Compile\bin\Debug\ (or Release instead of Debug, depending), go into the platform directory and see if there are *.clj.dll files in there. Most references I find for that error code relate to missing dlls or configuration problems. If you are compiling the current configuration, you need net462, net481, net6.0, net8.0, net9.0. You can check your VS install for those. Another thing is to clear out your nuget cache. The compiler warnings for obsolete API calls has to do with the deprecation of binary serialization. I've rescued it for now by including a library that can be used to do binary serialization on net8.0 and net9.0. The real solution, if we are to follow Microsoft's recommendation, is to get rid of binary serialization. That is going to force me to write serialization code for something like 75 classes. Not something I'm looking forward to. For your purposes, if you don't need one or more the .net platforms and other attempts fail, you could edit the TargetFramework definitions in each .csproj file down to what you actually need.