-
Notifications
You must be signed in to change notification settings - Fork 115
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
Error Encountered When Building Native Image with Spring Boot Maven Plugin #756
Comments
Apologies, it seems official arm64 support isn't available at this time. Closing this issue. Note: For those interested in running on arm64, please refer to this project: https://github.com/dashaun/paketo-arm64 |
This is not true. ARM64 support has been available since paketo-buildpacks/java-native-image version 9.2.0, see https://github.com/paketo-buildpacks/java-native-image/releases/tag/v9.2.0. |
I noticed some similar crashes when I build on my MBP M-series laptop but on an AMD64 builder. This is probably because of the emulation layer. Rosetta does this sometimes. When I build using ARM64, no problems. So my guess is that your build didn't actually run on ARM64, which wouldn't normally fail, but occasionally has problems with Rosetta. You can turn off Rosetta in Docker -> Settings, but it'll be super slow (still slow with Rosetta, but not as slow). You can see what I changed in this PR -> #757 or wait till it's merged and retry. |
Hi @dmikusa, thank you for the information.
You're correct. Even after aligning the build configuration (
By following your suggestion, it did resolve the issue. However, as you said, the process remains excessively slow. Initially, using the emulator took Thanks again for clarifying and providing all the necessary information. |
That doesn't sound right. If you update and pull in the changes from that PR, when you run If that's not working, then please include the full build output so I can see what's happening. |
The issue was due to docker using of the Rosetta layer. Following your suggestion to turn it off, everything is now functioning correctly. Here's the information you provided.
|
@kcsurapaneni Right, but if you pulled the latest sample code and are running it on an M-series Mac, it should pull ARM64 images and there shouldn't be any emulation, Rosetta or crashes. The Paketo Java buildpacks have support for ARM64. You can do native builds without emulation or Rosetta on an M-Series MBP. The trick is that you need to use a specific builder, That's the expectation anyway. If you're not seeing that, I'm curious to know more so we can make this a good experience. |
@dmikusa, It looks like I made an error when copying the configuration from your PR earlier. I’ve just pulled the code again since the PR has been merged, and everything appears to be correct now. I'm not sure what I missed before, but I believe our If you still want to see what is the error I was getting earlier, even after configuration update, please find the log here. I've created a repository for the log file since it's too large to include here. |
Ok, no worries. Glad it's working for you now! That's what's important. |
I encountered an error while attempting to run the spring-boot-native-image-maven sample project using the Spring Boot Maven Plugin command (
./mvnw -Dmaven.test.skip=true spring-boot:build-image -Pnative
).Here are the details of the error:
Here is the
java -version
outputDocker Resources Allocation
If you have any suggestions or need additional information to help resolve this issue, I would greatly appreciate it.
The text was updated successfully, but these errors were encountered: