Graal: Document static linking more precisely

Created on 11 Jun 2020  路  7Comments  路  Source: oracle/graal

As detailed in my recent blog post, a key use cases for server-side applications is to be able to use minimal (FROM scratch) Docker images via --static flag.

When I try to use this option with any Spring Boot sample, even basic ones like commandlinerunner, I got a segmentation fault.

If I try to compile a simple app with just System.out.println("Hello"); it works.

To reproduce just add --static to the compile options then try to run the executable (fails even in a regular Ubuntu).

Could you please fix that for upcoming 20.1.1 and tag this issue with the spring label?

bug native-image spring

Most helpful comment

Static native-image support has been documented at https://github.com/oracle/graal/blob/master/substratevm/StaticImages.md

All 7 comments

This is probably due to a bug in glibc @gradinac will work on documenting native-image musl c integration

With the right instructions, we were able to make it work. I am closing this issue since we are going to open a more specific one on allowing distroless support via more flexybility on GCC linking flags.

Maybe better to let it open with an up to date title after all.

Static native-image support has been documented at https://github.com/oracle/graal/blob/master/substratevm/StaticImages.md

Static native-image support has been documented at https://github.com/oracle/graal/blob/master/substratevm/STATIC-IMAGES.md

This link results in a 404. The correct link is: https://github.com/oracle/graal/blob/master/substratevm/StaticImages.md

@mipastgt Thank you for pointing that out :) It has been moved there, I will also edit the original comment

I think we can close this issue now.

Was this page helpful?
0 / 5 - 0 ratings