Closed vokounjan closed 8 months ago
Which version of IKVM is this with?
And can you run dotnet --info and show the output here?
Sorry, should have mentioned it - I'm using the currently latest version 8.6.4.
Unfortunately I don't have access to the machine right now (will have on Monday) but there is no .NET installed on it therefore I'm using the self-contained version. I'll paste the output here once I'm able to.
Ahh. What I think is going on is the RuntimeIdentifier that .NET is returning to IKVM isn't actually present in .NET's RID graph file at: https://github.com/dotnet/runtime/blob/main/src/libraries/Microsoft.NETCore.Platforms/src/runtime.json
The idea here is IKVM uses .NET's runtime identifier to figure out which native Java library versions it should load. I've seen this come up a few other times, with OS X. For instance, .NET might report RID 'ol.9.0-x64'.... because it's running on Oracle Linux 9, but Microsoft left off on 'ol.8.0-x64' or something in their RID document, and never added 9. This IKVM gets version 9, and cant find it in the runtime.json file.
This will change quite a bit in .NET 8, as MS is dropping the distribition specific RID values in favor of ONLY win-arch, linux-arch, osx-arch, etc. But, we're not there yet.
So, yeah, looks like 8.6.4 is broken on your specific version of Oracle Linux.
I'm preparing a patch to generate a 'fallback rid' if the version returned by .NET itself isn't known.
One workaround you can use is to set the environment variable DOTNET_RUNTIME_ID to something specific. Which should skip consulting .NET. For instance, set it to linux-x64.
Thank you for confirming my assumption (RID problem). Publishing the application in .NET 8 was actually my next step.
Also thanks for the DOTNET_RUNTIME_ID hint, I'll try that first.
I have an application (targeting .NET 7, built with .NET 8 SDK) using IKVM that I run successfully on Windows and Debian. However, if I try to run it on Oracle Linux Server, I get the following error message:
I am building the application as self-contained on Windows machine as follows:
And contents of /etc/os-release and and /etc/redhat-release on OLS machine are following
Is Oracle Linux Server supported? If so, what am I doing wrong? Thanks in advance for your help.