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

add -H:+AddAllCharsets to native-image.properties file #1716

Closed
avierr opened this issue May 24, 2019 · 2 comments
Closed

add -H:+AddAllCharsets to native-image.properties file #1716

avierr opened this issue May 24, 2019 · 2 comments
Assignees

Comments

@avierr
Copy link

avierr commented May 24, 2019

Steps to Reproduce

  1. use the hello-world app and use the popular okHttp library

Expected Behaviour

No errors

Actual Behaviour

...
Caused by: java.nio.charset.UnsupportedCharsetException: UTF-32BE
at java.nio.charset.Charset.forName(Charset.java:531)
at okhttp3.internal.Util.(Util.java:75)
at com.oracle.svm.core.hub.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:347)
at com.oracle.svm.core.hub.ClassInitializationInfo.initialize(ClassInitializationInfo.java:267)

Environment Information

  • Operating System: Mac
  • Micronaut Version: 1.1.2
  • JDK Version: graal 19

Also see, oracle/graal#1294
Adding the -H:+AddAllCharsets to the native-image.properties file will sort a ton of issues with third party libraries.

@ilopmar
Copy link
Contributor

ilopmar commented May 29, 2019

I've tested with our basic app: https://github.com/micronaut-graal-tests/micronaut-basic-app and using -H:+AddAllCharsets flag makes the final images size gets increased in 6 MB.

-rwxr-xr-x  1 ivan ivan 62135568 May 29 15:49 basic-app.all-charsets
-rwxr-xr-x  1 ivan ivan 55837792 May 29 15:44 basic-app.19

So I'm not really sure if it is worth it to enable it by default.

@graemerocher thoughts?

@graemerocher
Copy link
Contributor

Yeah I don't think this should be there by default.

@ilopmar ilopmar closed this as completed Jun 3, 2019
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

3 participants