-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document deployment dependencies for native image #7747
Comments
Hi @anthonyvdotbe Could you please share a reproducer with me? Could you also share with me the version of graalVM, the host, and the OS version? |
Hi @anthonyvdotbe I have just tested on a fresh installation of windows and it worked just fine for me. On my end having Microsoft Visual C++ 2015-2022 Redistributable is not a requirement to run the executable. |
So either our executables are different, or your installation of Windows somehow already contains the redistributable. This is my executable (renamed to .zip because GitHub doesn't allow uploading .exe files): And below is a screencast of me reproducing the issue. The initial terminal window is on the host, to show the commands I ran to create the executable. Everything else is in a fresh Windows Sandbox (the only customization I did, is to make the host's Downloads folder accessible within the Windows Sandbox). PS: mentions result in a notification on my smartphone, so please only mention me if you need an urgent response (which is unlikely) or if I'm not yet participating in the thread (as the author of this issue, I'm notified of any comments already), thanks output.mp4 |
Actually your issue is indeed normal. You are required to have Visual Studio and Microsoft Visual C++(MSVC) installed on windows to run your application. It is also mentioned in the documentation. If you go to the windows section of the documentation You'll find that it is mentioned there. |
I understand that Visual Studio et al. are required to build an application with native image. What is not documented, is that the resulting .exe is not self-sufficient. In other words: I cannot just send executables built with GraalVM to other people. I'll need to explain them how to install the Visual C++ Redistributable or create an installer to do it for them (and in that case, I could just as well use JDK's jlink and jpackage instead of GraalVM Native Image). This fact is not documented in the docs, so please reopen this issue. |
I get you now. I'll keep investigating on my end and I'll keep you posted. Thank you! |
Could you please specify if the environment you shared with me in the beginning is the one where you try to run your executable? if yes then could you share info of the environment where you built your native image? |
No.
To reproduce: open a Windows Sandbox, download the executable I attached above and change its extension to |
|
In my case, following the instructions to build a helloworld executable from a class, it doesn't.
Let me clarify what I mean with "freshly installed Windows machine": a Windows installation using this ISO or a Windows Sandbox instance.
I'm just using the one from the guide:
|
The issue you're facing is pretty much the same as This one. |
@selhagani closing this as expected, not a bug, and a new feature at the same time is not the right resolution if the entire premise of the issue is to point out that this is not documented anywhere. |
Describe the issue
On Windows, I had to install the Microsoft Visual C++ 2015-2022 Redistributable to get my native image working on a host other than the one I built the image on. I assumed native images didn't have any deployment dependencies. It would be good to mention these in Getting Started with Native Image.
Steps to reproduce the issue
Expected: prints the hello world message
Actual: exits with code -1073741515 and doesn't print anything
Describe GraalVM and your environment:
More details
@selhagani I've updated with the requested info
The text was updated successfully, but these errors were encountered: