Skip to content
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 command fails for devworkspace Quarkus Che sample #21145

Closed
Tracked by #21395
dkwon17 opened this issue Feb 9, 2022 · 3 comments
Closed
Tracked by #21395

Native build command fails for devworkspace Quarkus Che sample #21145

dkwon17 opened this issue Feb 9, 2022 · 3 comments
Assignees
Labels
area/devfile-spec Issues related to Devfile v2 area/plugins area/samples kind/bug Outline of a bug - must adhere to the bug report template. severity/P2 Has a minor but important impact to the usage or development of the system.
Milestone

Comments

@dkwon17
Copy link
Contributor

dkwon17 commented Feb 9, 2022

Describe the bug

The package-native command does not work for the devfile v2 Quarkus quick start Che sample project, because the tools container does not have GraalVM installed.

Workaround

It can be installed by running sdk install java 20.3.5.r11-grl && gu install native-image in the tools container, but it would be great if the package-native command worked out-of-the-box (like the devfile v1 Quarkus sample).

Che version

next (development version)

Steps to reproduce

  1. On the latest version of Che (with devworkspace engine), create a new devworkspace with the Quarkus sample:
    image

  2. Run the package-native command:
    image

  3. This results in the following error in the output:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  12.990 s
[INFO] Finished at: 2022-02-09T00:12:52Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.13.3.Final:build (default) on project getting-started: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image
[ERROR]         at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:209)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR]         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR]         at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
[ERROR]         at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR]         at java.base/java.lang.Thread.run(Thread.java:829)
[ERROR]         at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] Caused by: java.lang.RuntimeException: Image generation failed. Exit code: 125
[ERROR]         at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:350)
[ERROR]         at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:181)
[ERROR]         ... 10 more
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Full output here: https://gist.github.com/dkwon17/51e312188a05ba407916c57400ec788e

Expected behavior

Would have expected the native build to be successful, similar to the devfile v1 Quarkus sample.

Runtime

OpenShift

Screenshots

No response

Installation method

OperatorHub

Environment

Linux

Eclipse Che Logs

No response

Additional context

No response

@dkwon17 dkwon17 added the kind/bug Outline of a bug - must adhere to the bug report template. label Feb 9, 2022
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Feb 9, 2022
@dkwon17 dkwon17 added area/plugins severity/P2 Has a minor but important impact to the usage or development of the system. labels Feb 9, 2022
@ibuziuk
Copy link
Member

ibuziuk commented Feb 9, 2022

@svor could you please take a look?

@ibuziuk
Copy link
Member

ibuziuk commented Feb 9, 2022

Just for the context, we are using the same image for the https://github.com/che-incubator/quarkus-api-example that we are going to use in the PR review blog post, and want to show case all quarkus capabilities including native builds. This issue is also related to #18587

@svor svor added area/samples team/plugins area/devfile-spec Issues related to Devfile v2 and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Feb 9, 2022
@svor svor mentioned this issue May 18, 2022
49 tasks
@svor svor self-assigned this May 23, 2022
@svor
Copy link
Contributor

svor commented Jun 6, 2022

New UDI with mandrel was built in quay.io/devfile/universal-developer-image:ubi8-3055e6d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues related to Devfile v2 area/plugins area/samples kind/bug Outline of a bug - must adhere to the bug report template. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

No branches or pull requests

4 participants