-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Native Build Fails, when Reusing Existing Executable with Compression Enabled #41373
Comments
@gcw-it Fancy trying to implement this yourself? |
@galderz I could tackle this in the next few days, when I find some spare time (Probably on the weekend). But first and foremost we should come to an understanding, what the expected behaviour should be. Probably simplest and least surprising would be, to leave an existing artifact alone and skip the compression step. If we go down the road to compress an existing uncompressed executable, if the compression settings have changed between builds, then we have to consider some other situations:
In my opinion, the cleanest approach would be to take Reuse Existing Executable literally and leave the existing artifact alone. |
…Executable with Compression Enabled
…Executable with Compression Enabled
…Executable with Compression Enabled
Describe the bug
Building a native executable with
<quarkus.native.reuse-existing>true</quarkus.native.reuse-existing>
set, and compression enabled, leads to a failing build, when the artifact already exists.Expected behavior
The plugin skips the compression step for the already compressed executable, and the build is finished without error.
Actual behavior
The build fails with:
Build step io.quarkus.deployment.pkg.steps.UpxCompressionBuildStep#compress threw an exception: java.lang.IllegalStateException: Unable to compress the native executable
How to Reproduce?
<quarkus.native.container-build>true</quarkus.native.container-build>
<quarkus.native.reuse-existing>true</quarkus.native.reuse-existing>
<quarkus.native.compression.level>1</quarkus.native.compression.level>
mvn package -DskipTests -Dnative
mvn package -DskipTests -Dnative
) the build fails, because the plugin tries to recompress the already compressed executable.Output of
uname -a
orver
Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_X86_64 x86_64
Output of
java -version
java 22.0.1 2024-04-16
Mandrel or GraalVM version (if different from Java)
quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21
Quarkus version or git rev
3.11.3
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Additional information
No response
The text was updated successfully, but these errors were encountered: