Skip to content
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

[GR-40305] Provide shared libraries required by image as part of produced artifacts #4796

Open
java71 opened this issue Aug 5, 2022 · 3 comments

Comments

@java71
Copy link

java71 commented Aug 5, 2022

Hi,
I have just generated an 'exe' file using GraalVM native-image.
Program works well when 'jsound.dll' is located in same execution directory.

Is it possible to enforce native-image to generate an executable that encapsulate the dll ?
Any option ?
Thanks for your advice.

@olpaw
Copy link
Member

olpaw commented Aug 8, 2022

What we are currently missing in native-image is a step where we copy the dynamic libraries the built image depends on, to the directory where the image got built into. Also the list of Produced artifacts: that we output at the end of an image-build should list them. Something like:

Produced artifacts:
 /home/user/my_sound_using_image.exe (executable)
 /home/user/jsound.dll (shared library required by image)

This way the user sees that the resulting image requires an additional shared library to function correctly. This is will also be useful for applications that use UI frameworks that we can only support properly via loading their shared libraries components at image-runtime (e.g. AWT/Swing applications). cc @pejovica

@olpaw olpaw added feature and removed bug labels Aug 8, 2022
@olpaw olpaw changed the title Native image generated program cannot run without "jsound.dll" is in same directory Provide shared libraries required by image as part of produced artifacts Aug 8, 2022
@java71
Copy link
Author

java71 commented Aug 8, 2022

Hi,
thanks for your answer.
I hope that this new feature will become available soon.
It is much much easier to deliver a product as one single file!

@olpaw
Copy link
Member

olpaw commented Aug 8, 2022

It is much much easier to deliver a product as one single file!

Unfortunately that's not always feasible. While we do support single file awt images in Linux at the moment it causes many problems and limitations. At some point in the future awt images on Linux will also require awt as shared library instead of linking it in statically.

@wirthi wirthi changed the title Provide shared libraries required by image as part of produced artifacts [GR-40305] Provide shared libraries required by image as part of produced artifacts Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants