Closed phdoerfler closed 3 years ago
@olafurpg Do you require any more info on this?
@olafurpg Do you require any more info on this?
I think, you should install "visual studio 2019 build tools" or another build tools such as MinGW, Cygwin. There is "cl.exe" in there. If "visual studio 2019" has been installed in your pc, you do not need to install "visual studio 2019 build tools".
(fwiw: As far as I am concerned this issue is not so much about "How to run native-image on Windows?" but rather that about the plugin reporting a success where there isn't.)
This being said: @terdong Thanks for the suggestion! Sounds like even more ways for obtaining cl.exe and / or required header files (more on that later)! Including your suggestions this is what I've come up with so far:
In fact I have (after filing this issue) installed the Visual Studio Redistributable which also contains cl.exe. However, I then ran into the problem of missing header files. I haven't had time to investigate this matter further but it seems that the Windows SDK would provide them. Worthy of note: They can apparently be installed selectively so they won't take up too much space.
I'd love for this plugin to automatically download (to somewhere local) cl.exe and required header files to further the out-of-the-box experience and if a miracle happened and I had some spare time on my hands I'd work on a pull request but that ain't likely in the next months.
Thank you for reporting!
(fwiw: As far as I am concerned this issue is not so much about "How to run native-image on Windows?" but rather that about the plugin reporting a success where there isn't.)
This plugin reports the exit code from native-image
so there's not much we can on this side to address that particular issue.
I'd love for this plugin to automatically download (to somewhere local) cl.exe and required header files to further the out-of-the-box experience and if a miracle happened and I had some spare time on my hands I'd work on a pull request but that ain't likely in the next months.
I'm happy to review/merge a PR that adds extra installation steps on Windows. The plugin automatically installs the correct JVM version, which seems to be sufficient to build binaries on the provided Windows images on GitHub Actions.
Closing this issue with "working as intended" since it's not clear how this plugin should be able to detect a problem when native-image
returns a successful exit code.
Describe the bug
It says the native image was ready even though there was an error:
To Reproduce Steps to reproduce the behavior:
build.sbt
plugins.sbt
Run task
nativeImage
in sbt.The tasks succeeds but fails to produce a binary. The reported path where said binary supposedly resides does not exist.
Expected behavior
I expect no error but if there is one I expect the task to fail and not be successful in the eyes of sbt.
Screenshots
Installation: