-
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 container build with debug symbols fails during copying of jar sources #13848
Comments
@machi1990 no, this is a different issue.
|
@zakkak, given the Maven build is spinning up a docker image of quay.io/quarkus/ubi-quarkus-native-image:20.2.0-java11 would that mean the debug symbol generation would be happening in the Linux environment of the container and not the Windows host? Or is this the Windows support that's still under development? |
Correct.
No the windows support that is still under development is having debug symbols for windows builds. Can you please verify that Could |
|
@aluckenbaugh I was able to reproduce the issue and I have opened #13908 with a fix. This will require building Quarkus from my branch, and editing the xml file of the quickstart example to use |
Yes, this looks like it fixes the issue. Thanks! |
Describe the bug
When trying to build a native image with debug symbols in the quarkus quickstart project the build fails. I originally spotted this in my custom project and was able to replicate the same problem in the hibernate-orm-quickstart. Maybe I'm doing something wrong, or maybe this is actually a bug?
Expected behavior
The build should succeed.
Actual behavior
The following error message is logged as the build fails:
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.10.3.Final:native-image (default) on project hibernate-orm-quickstart: Failed to generate native image: 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: Unable to copy from C:\path\to\mvn\repo\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5-sources.jar to C:\path\to\quarkus-quickstarts\hibernate-orm-quickstart\target\hibernate-orm-quickstart-1.0-SNAPSHOT-native-image-source-jar\lib\jakarta.annotation.jakarta.annotation-api-1.3.5-sources.jar
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.copyJarSourcesToLib(NativeImageBuildStep.java:423)
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:93)
[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:972)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] Caused by: java.nio.file.NoSuchFileException: C:\path\to\mvn\repo\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5-sources.jar -> C:\path\to\quarkus-quickstarts\hibernate-orm-quickstart\target\hibernate-orm-quickstart-1.0-SNAPSHOT-native-image-source-jar\lib\jakarta.annotation.jakarta.annotation-api-1.3.5-sources.jar
[ERROR] at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
[ERROR] at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
[ERROR] at java.base/sun.nio.fs.WindowsFileCopy.copy(WindowsFileCopy.java:202)
[ERROR] at java.base/sun.nio.fs.WindowsFileSystemProvider.copy(WindowsFileSystemProvider.java:283)
[ERROR] at java.base/java.nio.file.Files.copy(Files.java:1294)
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.copyJarSourcesToLib(NativeImageBuildStep.java:421)
[ERROR] ... 13 more
[ERROR] -> [Help 1]
To Reproduce
Run this as recommended on https://quarkus.io/guides/building-native-image#debugging-native-executable to download the sources jars (this doesn't seem to make any difference):
mvn dependency:sources
Run:
mvn clean install -DskipTests -Pnative -Dquarkus.native.container-build=true -Dquarkus.native.debug.enabled=true
In project: https://github.com/quarkusio/quarkus-quickstarts/tree/master/hibernate-orm-quickstart
Environment:
uname -a
orver
:ver
Microsoft Windows [Version 10.0.19041.388]
java -version
:java -version
openjdk version "11.0.7" 2020-04-14 LTS
OpenJDK Runtime Environment Corretto-11.0.7.10.1 (build 11.0.7+10-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.7.10.1 (build 11.0.7+10-LTS, mixed mode)
mvnw --version
orgradlew --version
):mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\ProgramData\chocolatey\lib\maven\apache-maven-3.6.3\bin..
Java version: 11.0.7, vendor: Amazon.com Inc., runtime: C:\Program Files\Amazon Corretto\jdk11.0.7_10
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
The text was updated successfully, but these errors were encountered: