quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

Upx exception under windows

Open TheBlindM opened this issue 2 years ago • 4 comments

Describe the bug

Produced artifacts: D:\study\demo1\target\demo1-1.0-SNAPSHOT-native-image-source-jar\demo1-1.0-SNAPSHOT-runner.build_artifacts.txt (txt) D:\study\demo1\target\demo1-1.0-SNAPSHOT-native-image-source-jar\demo1-1.0-SNAPSHOT-runner.exe (executable)

Finished generating 'demo1-1.0-SNAPSHOT-runner' in 2m 19s. [ERROR] [io.quarkus.deployment.pkg.steps.UpxCompressionBuildStep] Unable to compress the native executable. Either install upx from https://upx.github.io/ on your machine, or enable in-container build using -Dquarkus.native.container-build=true.

Environment variables have been declared

image

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

Java version info: '17.0.4+11-LTS-jvmci-22.2-b05'

GraalVM version (if different from Java)

GraalVM 22.2.0 Java 17 EE'

Quarkus version or git rev

2.10.3.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: C:\Users\NINGMEI.m2\wrapper\dists\apache-maven-3.8.6-bin\67568434\apache-maven-3.8.6 Java version: 17.0.4, vendor: Oracle Corporation, runtime: C:\Users\NINGMEI.jdks\graalvm-ee-java17-22.2.0 Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Additional information

No response

TheBlindM avatar Aug 08 '22 09:08 TheBlindM

Is upx part of the PATH variable?

geoand avatar Aug 08 '22 12:08 geoand

Is upx part of the PATH variable?

I successfully executed upx after restarting the idea,But the generated exe cannot be started, image

TheBlindM avatar Aug 09 '22 01:08 TheBlindM

What's wrong with it?

geoand avatar Aug 09 '22 04:08 geoand

What's wrong with it?

When I double-click the exe, the windows cmd flashes by, and the exe double-click can run normally when upx is not used

TheBlindM avatar Aug 09 '22 04:08 TheBlindM

When I double-click the exe, the windows cmd flashes by, and the exe double-click can run normally when upx is not used

Do you see any stacktrace when running the .exe in the CMD?

gastaldi avatar Aug 23 '22 00:08 gastaldi

When I double-click the exe, the windows cmd flashes by, and the exe double-click can run normally when upx is not used

Do you see any stacktrace when running the .exe in the CMD?

no output

TheBlindM avatar Aug 23 '22 02:08 TheBlindM

Can you provide a reproducer project? Or fill in the steps to reproduce?

gastaldi avatar Aug 23 '22 02:08 gastaldi

ok, i'm working now, sorry for the wait

TheBlindM avatar Aug 23 '22 02:08 TheBlindM

ok, i'm working now, sorry for the wait Sorry, my vpn doesn't work now image

It is the simplest code-with-quarkus project, and then set native.compression.level

quarkus.native.compression.level=5

TheBlindM avatar Aug 24 '22 04:08 TheBlindM

I encountered the same problem (.exe was generated but there's not output when starting it) today.

This issue is caused by a new feature in GraalVM 22 (see https://github.com/oracle/graal/issues/4340).

n-kremer avatar Oct 27 '22 12:10 n-kremer

Thanks a lot for the link @n-kremer!

In light of this information, I'll close this issue as an upstream issue

geoand avatar Oct 27 '22 12:10 geoand