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

Creating a native container image with quarkus-container-image-docker fails when using Podman on macOS #29701

Open
josephearl opened this issue Dec 6, 2022 · 4 comments

Comments

@josephearl
Copy link

josephearl commented Dec 6, 2022

Describe the bug

Building a native container image with quarkus-container-image-docker on macOS with alias docker=podman results in a failure

Error: preparing container e1fa001f03ebcda62e17dfd0d36b3ca9fa6a39e0c91153be99fb757f5f3bb2ad for attach: lsetxattr /Users/<snip>/build/<snip>-1.0-SNAPSHOT-native-image-source-jar/lib: operation not supported

> Task :quarkusBuild FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':quarkusBuild'.
> io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: io.quarkus.deployment.pkg.steps.NativeImageBuildStep$ImageGenerationFailureException: Image generation failed. Exit code: 126
        at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:421)
        at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:262)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
        at java.base/java.lang.Thread.run(Thread.java:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)

The container builds successfully when using Docker directly.

Possibly related containers/podman#13631

Expected behavior

Building a native container image with podman works on macOS

Actual behavior

Building a native container image with podman fails on macOS

How to Reproduce?

No response

Output of uname -a or ver

Darwin MacBook-Pro 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64 x86_64

Output of java -version

openjdk version "17.0.5" 2022-10-18 OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8) OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.14.2.Final

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

Gradle 7.6

Additional information

No response

@berkanaslan
Copy link

Same issue here.

@josephearl
Copy link
Author

josephearl commented Dec 22, 2022

Tried upgrading to Quarkus 2.15.1.Final after seeing #29850 was included, I now get a different error (exit code 125 instead of 126):

Error: statfs /Users/<snip>/build/<snip>-1.0-SNAPSHOT-native-image-source-jar: no such file or directory

* What went wrong:
Execution failed for task ':quarkusBuild'.
> io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: io.quarkus.deployment.pkg.steps.NativeImageBuildStep$ImageGenerationFailureException: Image generation failed. Exit code: 125

which is strange because if I then run ls build/<snip>-1.0-SNAPSHOT-native-image-source-jar the directory does exist and contains a jar and a lib directory:

ls build/<snip>-1.0-SNAPSHOT-native-image-source-jar 
<snip>-1.0-SNAPSHOT-runner.jar lib

so I'm guessing that is not getting mounted into the native image build container or something like that...

@danielbjorkholm
Copy link

I've got the same Error: statfs issue. On MacOS Intel.
Tried Quarkus 2.15.3.Final and 2.9.2.Final. Issue persists regardless of using -Dquarkus.native.builder-image=mandrel or just default.

@danielbjorkholm
Copy link

danielbjorkholm commented Jan 24, 2023

Solved the "no such file" by upgrading podman (4.1.1 -> 4.3.1), deleted the machine and reinitiated it.

So now, I'm at your original issue:
Error: preparing container dade691ac58e577a525a09d06209bf6feea4edf4a5f401595e1d9159ccd4fd42 for attach: lsetxattr /Users/[redacted]/target/[redacted]-2.14.0-SNAPSHOT-native-image-source-jar/lib: operation not supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants