-
Notifications
You must be signed in to change notification settings - Fork 3
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
How to compile with musl support for Spring Boot #507
Comments
It may just be a matter of making sure that muls-gcc is installed. I'm pretty certain, it won't be in the tiny/base stacks, but it might be in the full stack, so you could give that a try. Set the builder to If that doesn't work, you'd need to install the builder. There are a handful of options for doing that, which are outlined here. I would suggest option #4 first and see if you can make that work. If you add the apt-buildpack to the beginning of your buildpack list, that should allow it to install deps before any other buildpacks run. Hope that helps! |
Hi @dmikusa, I was testing the first idea and it is not working: <plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<imageName>jibber-benchmark:buildpacks-native.0.0.1-SNAPSHOT</imageName>
<image>
<builder>paketobuildpacks/builder:full</builder>
<buildpacks>
<buildpack>gcr.io/paketo-buildpacks/bellsoft-liberica:9.10</buildpack>
<buildpack>gcr.io/paketo-buildpacks/java-native-image</buildpack>
</buildpacks>
<env> <BP_BINARY_COMPRESSION_METHOD>upx</BP_BINARY_COMPRESSION_METHOD>
<BP_NATIVE_IMAGE_BUILD_ARGUMENTS>--static --libc=musl</BP_NATIVE_IMAGE_BUILD_ARGUMENTS>
</env>
</image>
</configuration>
</plugin> Error:
In relation to the second option: I have few questions:
GraalVM Demos has a script to add in the PATH the library but how to use with the buildpacks? Can you provide and example with |
The apt-buildpack README has an example, https://github.com/fagiani/apt-buildpack. You basically just add an
The key thing about making this work is that you'd need to have access to an apt repo from which you can get the software or When you build, you should see the apt-buildpack being pulled down and running first. It'll install the additional software. Give that a try and let me know how far you get. |
Hi @dmikusa, I followed your instructions, but the build failed:
I put the file But the script from the builbpack doesn´t see the file
Behaviour:
In what location, I need to put the Aptfile file? I am testing this idea in the following repo: Juan Antonio |
Hi,
I am reviewing the native features from Spring Boot 3 but I am not able to compile with
musl
support.If you compile a Spring Boot application without the buildpack support, it is possible to do it if you add in your project:
pom.xml configuration:
but you have to have in the
PATH
musl
libraries. In that way, when you compile, you will see that the compiler changes:But If I add the following configuration in the pom.xml and having in the
PATH
themusl
library:then I receive an error:
How to compile with
musl
support?Many thanks in advance
Juan Antonio
The text was updated successfully, but these errors were encountered: