Coder Social home page Coder Social logo

Comments (3)

ruromero avatar ruromero commented on May 29, 2024

Hey @larrycai
The error is telling you that the target/cloudevent-player-1.1-SNAPSHOT-runner file does not exist. You could run the mvn clean install -native that generates the native binary and then it runs the docker/podman build locally.

the ubi-minimal:8.3 image is multi-arch and you should be able to build your arm64 image locally with this same command.

If you don't want to do the build locally, you can try the multi-stage build that I have provided in PR #22 (but I haven't tested it properly)

from cloudevents-player.

larrycai avatar larrycai commented on May 29, 2024

I thought the build was inside the container build as well (I haven't touched java for a while)

tried below

$ brew install maven
$ mvn clean install -Pnative
...
[INFO] Finished at: 2022-12-20T13:43:38+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:2.0.1.Final:build (default) on project cloudevent-player: 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: Cannot find the `native-image` in the GRAALVM_HOME, JAVA_HOME and System PATH. Install it using `gu install native-image`
[ERROR]         at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.getNativeImageBuildRunner(NativeImageBuildStep.java:260)
[ERROR]         at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:155)
[ERROR]         at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:578)
[ERROR]         at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
[ERROR]         at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR]         at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2442)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1476)
[ERROR]         at java.base/java.lang.Thread.run(Thread.java:1589)
[ERROR]         at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[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

Maybe it is simple to fix by java developers, but not me now ;-)

And pull with latest (after PR #22) and

$ mvn clean install -Pnative -Dquarkus.native.container-build=true
...
INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   MessageResourceTest.getAll:32 1 expectation failed.
Expected status code <200> but was <500>.

[ERROR]   MessageResourceTest.sendEvent:47 1 expectation failed.
Expected status code <202> but was <500>.

[INFO] 
[ERROR] Tests run: 2, Failures: 2, Errors: 0, Skipped: 0
[INFO] 

Skip the testing to have image ready

$ mvn package -Pnative -Dquarkus.native.container-build=true -Dmaven.test.skip=true
... 
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] podman run --env LANG=C --rm -v /Users/RDCCAIY/git/github/cloudevents-player/target/cloudevent-player-1.2-SNAPSHOT-native-image-source-jar:/project:z --name build-native-zWVzc quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17 -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dlogging.initial-configurator.min-level=500 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Duser.language=en -J-Duser.country=SE -J-Dfile.encoding=UTF-8 --features=io.quarkus.websockets.client.runtime.DisableLoggingFeature,io.quarkus.runner.Feature,io.quarkus.runtime.graal.ResourcesFeature,io.quarkus.runtime.graal.DisableLoggingFeature,io.quarkus.hibernate.validator.runtime.DisableLoggingFeature -J--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED -J--add-opens=java.base/java.text=ALL-UNNAMED -J--add-opens=java.base/java.io=ALL-UNNAMED -J--add-opens=java.base/java.lang.invoke=ALL-UNNAMED -J--add-opens=java.base/java.util=ALL-UNNAMED -H:+CollectImageBuildStatistics -H:ImageBuildStatisticsFile=cloudevent-player-1.2-SNAPSHOT-runner-timing-stats.json -H:BuildOutputJSONFile=cloudevent-player-1.2-SNAPSHOT-runner-build-output-stats.json -H:+AllowFoldMethods -J-Djava.awt.headless=true --no-fallback --link-at-build-time -H:+ReportExceptionStackTraces -H:-AddAllCharsets --enable-url-protocols=http,https -H:-UseServiceLoaderFeature -H:+StackTrace -J--add-exports=org.graalvm.sdk/org.graalvm.nativeimage.impl=ALL-UNNAMED -J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED cloudevent-player-1.2-SNAPSHOT-runner -jar cloudevent-player-1.2-SNAPSHOT-runner.jar
Error: preparing container cd91198ef40ddefb42ff2600a1550d884c10bef17ec4c33a99d687e6219c4e4d for attach: lsetxattr /Users/guest/git/github/cloudevents-player/target/cloudevent-player-1.2-SNAPSHOT-native-image-source-jar/lib: operation not supported
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
...

Try to make it work locally in Mac (also for folder sharing in qemu), give up. But will try to find other ways like multi-arch

from cloudevents-player.

ruromero avatar ruromero commented on May 29, 2024

I have fixed an issue with the integrationTests and I've also created a GitHub action to perform a multi-arch build. You can check quay.io/ruben/cloudevents-player:v1.2

from cloudevents-player.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.