Native image failures on Windows

1,157 views
Skip to first unread message

Rostislav Svoboda

unread,
Jul 3, 2019, 6:25:36 AM7/3/19
to Quarkus Development mailing list
Building images on Windows via Substrate VM is still experimental but I still tried :)
I see native image failures on Windows when building Quarkus quickstart (application-configuration in my case)
Generating hello world application via native-image on Windows worked well.

With Quarkus qickstart I see:

Error: Error compiling query code (in C:\Users\ROSTIS~1\AppData\Local\Temp\SVM-4366051631111389069\NativeInfoDirectives.cpp). Compiler command  CL C:\Users\ROSTIS~1\AppData\Local\Temp\SVM-4366051631111389069\NativeInfoDirectives.cpp /FeC:\Users\ROSTIS~1\AppData\Local\Temp\SVM-4366051631111389069\NativeInfoDirectives.exe output included error: [Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64, Copyright (C) Microsoft Corporation.  All rights reserved., ]
com.oracle.svm.core.util.UserError$UserException: Error compiling query code (in C:\Users\ROSTIS~1\AppData\Local\Temp\SVM-4366051631111389069\NativeInfoDirectives.cpp). Compiler command  CL C:\Users\ROSTIS~1\AppData\Local\Temp\SVM-4366051631111389069\NativeInfoDirectives.cpp /FeC:\Users\ROSTIS~1\AppData\Local\Temp\SVM-4366051631111389069\NativeInfoDirectives.exe output included error: [Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64, Copyright (C) Microsoft Corporation.  All rights reserved., ]
        at com.oracle.svm.core.util.UserError.abort(UserError.java:114)
        at com.oracle.svm.hosted.c.NativeLibraries.reportErrors(NativeLibraries.java:191)
        at com.oracle.svm.hosted.NativeImageGenerator.processNativeLibraryImports(NativeImageGenerator.java:1524)
        at com.oracle.svm.hosted.NativeImageGenerator.setupNativeLibraries(NativeImageGenerator.java:997)
        at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:829)
        at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:521)
        at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:441)
        at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Error: Image build request failed with exit status 1


Anybody else playing with native-image on Windows ?


BTW, I tried both 19.0.2 and 19.1.0:

Jeremy Schwingbeck

unread,
Jul 11, 2019, 2:52:08 PM7/11/19
to Quarkus Development mailing list
Having the same issue. Tried running through the Getting Started application and compiling with native-image and following the guide at http://karols.github.io/blog/2019/05/12/native-image-on-windows-10-x64/ without any change.
It's worth noting the guide is for Windows 10 while I am on WIndows 7. Perhaps it's an issue with Win 7?

G:\tools\graalvm-ce-19.0.2\bin>native-image -jar C:\Users\JSchwingbeck\Documents\lwshare\quarkus\target\getting-started-1.0-SNAPSHOT-runner.jar -H:+ReportExceptionStackTraces
[getting-started-1.0-SNAPSHOT-runner:6468]    classlist:   4,650.40 ms
[getting-started-1.0-SNAPSHOT-runner:6468]        (cap):     644.06 ms
[getting-started-1.0-SNAPSHOT-runner:6468]        setup:     992.42 ms
Error: Error compiling query code (in C:\Users\JSCHWI~1\AppData\Local\Temp\SVM-969489441624840116\NativeInfoDirectives.c
pp). Compiler command  CL C:\Users\JSCHWI~1\AppData\Local\Temp\SVM-969489441624840116\NativeInfoDirectives.cpp /FeC:\Use
rs\JSCHWI~1\AppData\Local\Temp\SVM-969489441624840116\NativeInfoDirectives.exe output included error: [Microsoft (R) C/C
++ Optimizing Compiler Version 16.00.30319.01 for x64, Copyright (C) Microsoft Corporation.  All rights reserved., ]
com.oracle.svm.core.util.UserError$UserException: Error compiling query code (in C:\Users\JSCHWI~1\AppData\Local\Temp\SV
M-969489441624840116\NativeInfoDirectives.cpp). Compiler command  CL C:\Users\JSCHWI~1\AppData\Local\Temp\SVM-9694894416
24840116\NativeInfoDirectives.cpp /FeC:\Users\JSCHWI~1\AppData\Local\Temp\SVM-969489441624840116\NativeInfoDirectives.ex
e output included error: [Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64, Copyright (C) Microsof
Message has been deleted

NewK

unread,
Jul 14, 2019, 11:39:08 AM7/14/19
to Quarkus Development mailing list
Having the same issue too.

Jason Greene

unread,
Jul 14, 2019, 12:04:20 PM7/14/19
to rsvo...@redhat.com, Quarkus Development mailing list
This looks like the underlying compiler error is being eaten. The best way to troubleshoot this is to use the substrate -H:TempDirectory=blah flag that saves the intermediate object files and then rerun the compiler command it generates in the log manually to see what you get. 
<Screenshot 2019-07-03 00.07.41.png><Screenshot 2019-07-03 07.11.58.png>

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
Visit this group at https://groups.google.com/group/quarkus-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/95AE33D9-6595-4F67-B9CA-DCC88812AE2C%40redhat.com.
For more options, visit https://groups.google.com/d/optout.

Jeremy Schwingbeck

unread,
Jul 15, 2019, 10:12:21 AM7/15/19
to Quarkus Development mailing list
New to this - what compiler command in the log? I opened in VS Code, can't find svm_libffi.h in LibFFIHeaderDirectives.cpp and unistd.h in NativeInfoDirectives.cpp, but I'm guessing that VS Code looks for inclusions in a different place than what native-image uses.

Console output:
G:\tools\graalvm-ce-19.1.0\bin>native-image -jar C:\Users\JSchwingbeck\Documents\lwshare\quarkus\target\getting-started-
1.0-SNAPSHOT-runner.jar -H:TempDirectory=C:\Users\JSchwingbeck\Documents\thingy
[getting-started-1.0-SNAPSHOT-runner:25380]    classlist:   7,556.94 ms
[getting-started-1.0-SNAPSHOT-runner:25380]        (cap):   1,825.51 ms
[getting-started-1.0-SNAPSHOT-runner:25380]        setup:   2,626.93 ms
Error: Error compiling query code (in C:\Users\JSchwingbeck\Documents\thingy\SVM-1563198831377\NativeInfoDirectives.cpp)
. Compiler command  CL C:\Users\JSchwingbeck\Documents\thingy\SVM-1563198831377\NativeInfoDirectives.cpp /FeC:\Users\JSc
hwingbeck\Documents\thingy\SVM-1563198831377\NativeInfoDirectives.exe output included error: [Microsoft (R) C/C++ Optimi
zing Compiler Version 16.00.30319.01 for x64, Copyright (C) Microsoft Corporation.  All rights reserved., ]
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Error: Image build request failed with exit status 1

Additionally, I ran the exe for LibFFIHeaderDirectives. Console output is below.
C:\Users\JSchwingbeck\Documents\thingy\SVM-1563198831377>LibFFIHeaderDirectives.exe
NativeCodeInfo:LibFFIHeaderDirectives:ConstantInfo:FFI_OK:PropertyInfo:size=4
NativeCodeInfo:LibFFIHeaderDirectives:ConstantInfo:FFI_OK:PropertyInfo:signedness=$UNSIGNED$
NativeCodeInfo:LibFFIHeaderDirectives:ConstantInfo:FFI_OK:PropertyInfo:value=0
NativeCodeInfo:LibFFIHeaderDirectives:ConstantInfo:FFI_DEFAULT_ABI:PropertyInfo:size=4
NativeCodeInfo:LibFFIHeaderDirectives:ConstantInfo:FFI_DEFAULT_ABI:PropertyInfo:signedness=$UNSIGNED$
NativeCodeInfo:LibFFIHeaderDirectives:ConstantInfo:FFI_DEFAULT_ABI:PropertyInfo:value=1
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_cif_data:PropertyInfo:size=40
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_cif_data:StructFieldInfo:args:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_cif_data:StructFieldInfo:args:PropertyInfo:offset=32
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_cif_data:StructFieldInfo:cif:PropertyInfo:size=32
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_cif_data:StructFieldInfo:cif:PropertyInfo:offset=0
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleThreadAPI:PropertyInfo:size=24
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleThreadAPI:StructFieldInfo:attachCurrentThread:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleThreadAPI:StructFieldInfo:attachCurrentThread:PropertyInfo:offset=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleThreadAPI:StructFieldInfo:detachCurrentThread:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleThreadAPI:StructFieldInfo:detachCurrentThread:PropertyInfo:offset=16
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleThreadAPI:StructFieldInfo:getTruffleEnv:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleThreadAPI:StructFieldInfo:getTruffleEnv:PropertyInfo:offset=0
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_cif:PropertyInfo:size=32
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_cif:StructFieldInfo:arg_types:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_cif:StructFieldInfo:arg_types:PropertyInfo:offset=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_cif:StructFieldInfo:nargs:PropertyInfo:size=4
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_cif:StructFieldInfo:nargs:PropertyInfo:offset=4
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_cif:StructFieldInfo:nargs:PropertyInfo:signedness=$UNSIGNED$
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_type:PropertyInfo:size=24
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_type:StructFieldInfo:alignment:PropertyInfo:size=2
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_type:StructFieldInfo:alignment:PropertyInfo:offset=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_type:StructFieldInfo:alignment:PropertyInfo:signedness=$UNSIGNED$
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_type:StructFieldInfo:size:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_type:StructFieldInfo:size:PropertyInfo:offset=0
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_type:StructFieldInfo:size:PropertyInfo:signedness=$UNSIGNED$
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:PropertyInfo:size=64
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:getClosureObject:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:getClosureObject:PropertyInfo:offset=56
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:getTruffleContext:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:getTruffleContext:PropertyInfo:offset=0
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:isSameObject:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:isSameObject:PropertyInfo:offset=32
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:newClosureRef:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:newClosureRef:PropertyInfo:offset=40
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:newObjectRef:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:newObjectRef:PropertyInfo:offset=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:releaseAndReturn:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:releaseAndReturn:PropertyInfo:offset=24
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:releaseClosureRef:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:releaseClosureRef:PropertyInfo:offset=48
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:releaseObjectRef:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:struct___TruffleNativeAPI:StructFieldInfo:releaseObjectRef:PropertyInfo:offset=16
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_env:PropertyInfo:size=24
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_env:StructFieldInfo:context:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_env:StructFieldInfo:context:PropertyInfo:offset=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_env:StructFieldInfo:functions:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_env:StructFieldInfo:functions:PropertyInfo:offset=0
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_env:StructFieldInfo:isolateThread:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_env:StructFieldInfo:isolateThread:PropertyInfo:offset=16
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_context:PropertyInfo:size=112
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_context:StructFieldInfo:contextHandle:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_context:StructFieldInfo:contextHandle:PropertyInfo:offset=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_context:StructFieldInfo:functions:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_context:StructFieldInfo:functions:PropertyInfo:offset=0
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_context:StructFieldInfo:isolate:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_context:StructFieldInfo:isolate:PropertyInfo:offset=16
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_context:StructFieldInfo:nativeAPI:PropertyInfo:size=64
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_context:StructFieldInfo:nativeAPI:PropertyInfo:offset=48
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_context:StructFieldInfo:threadAPI:PropertyInfo:size=24
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_truffle_context:StructFieldInfo:threadAPI:PropertyInfo:offset=24
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_closure_data:PropertyInfo:size=72
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_closure_data:StructFieldInfo:ffiClosure:PropertyInfo:size=56
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_closure_data:StructFieldInfo:ffiClosure:PropertyInfo:offset=0
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_closure_data:StructFieldInfo:isolate:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_closure_data:StructFieldInfo:isolate:PropertyInfo:offset=64
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_closure_data:StructFieldInfo:nativeClosureHandle:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:svm_closure_data:StructFieldInfo:nativeClosureHandle:PropertyInfo:offset=56
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_closure:PropertyInfo:size=56
NativeCodeInfo:LibFFIHeaderDirectives:StructInfo:ffi_arg:PropertyInfo:size=8
NativeCodeInfo:LibFFIHeaderDirectives:PointerToInfo:ffi_type_:PropertyInfo:size=8

Jason Greene

unread,
Jul 15, 2019, 10:35:44 AM7/15/19
to jeremysc...@gmail.com, Quarkus Development mailing list


Hi Jeremy,

See the inline response below.

On Jul 15, 2019, at 9:12 AM, Jeremy Schwingbeck <jeremysc...@gmail.com> wrote:

New to this - what compiler command in the log?

Right here:

Error: Error compiling query code (in C:\Users\JSchwingbeck\Documents\thingy\SVM-1563198831377\NativeInfoDirectives.cpp)

>>>>>>>

. Compiler command  CL C:\Users\JSchwingbeck\Documents\thingy\SVM-1563198831377\NativeInfoDirectives.cpp /FeC:\Users\JSc
hwingbeck\Documents\thingy\SVM-1563198831377\NativeInfoDirectives.exe

<<<<<<<<

output included error: [Microsoft (R) C/C++ Optimi
zing Compiler Version 16.00.30319.01 for x64, Copyright (C) Microsoft Corporation.  All rights reserved., ]


Ad you can see that error is incomplete, and is just a version string being spit out by CL. 

I opened in VS Code, can't find svm_libffi.h in LibFFIHeaderDirectives.cpp and unistd.h in NativeInfoDirectives.cpp, but I'm guessing that VS Code looks for inclusions in a different place than what native-image uses.

You won’t be able to compile this normally. Substrate relies on a custom linkage process ran against the platform linker.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
Visit this group at https://groups.google.com/group/quarkus-dev.

Jeremy Schwingbeck

unread,
Jul 15, 2019, 11:37:35 AM7/15/19
to Quarkus Development mailing list
Ah, got it. Was expecting something more verbose.

G:\tools\graalvm-ce-19.1.0\bin>CL C:\Users\JSchwingbeck\Documents\thingy\SVM-1563198831377\NativeInfoDirectives.cpp /FeC:\Users\JSchwingbeck\Documents\thingy\SVM-1563198831377\NativeInfoDirectives.exe

Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.


NativeInfoDirectives.cpp
C
:\Users\JSchwingbeck\Documents\thingy\SVM-1563198831377\NativeInfoDirectives.cpp(32) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory

It does appear the issue is unistd.h not being found. I downloaded a port of it from here and the getopt dependency port from here, extracted to a custom inclusion directory, and ran 

C:\Windows\system32>CL C:\Users\JSchwingbeck\Documents\thingy\SVM-1563198831377\NativeInfoDirectives.cpp /FeC:\Users\JSchwingbeck\Documents\thingy\SVM-1563198831377\NativeInfoDirectives.exe /I "C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\custom"
Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

NativeInfoDirectives.cpp
Importing getopt library
Microsoft (R) Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:C:\Users\JSchwingbeck\Documents\thingy\SVM-1563198831377\NativeInfoDirectives.exe
NativeInfoDirectives.obj

and it appears to compile the exe and obj files. So now I guess the issue is how to get the inclusion passed into the native-image command, which I don't see a way to do in the GraalVM native-image docs. Ideas?
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.

Jeremy Schwingbeck

unread,
Jul 15, 2019, 12:29:21 PM7/15/19
to Quarkus Development mailing list
Figured it out. Run the following before native-image: 

SET _CL_=/I location\of\custom\lib

But now I'm getting the following:

C:\Windows\system32>native-image -jar "C:\Users\JSchwingbeck\Documents\lwshare\quarkus runthrough\target\getting-started-1.0-SNAPSHOT-runner.jar" -H:TempDirectory=C:\Users\JSchwingbeck\Documents\thingy -H:+ReportExceptionStackTraces
[getting-started-1.0-SNAPSHOT-runner:12820]    classlist:   5,028.99 ms
[getting-started-1.0-SNAPSHOT-runner:12820]        (cap):   1,672.50 ms
[getting-started-1.0-SNAPSHOT-runner:12820]        setup:   3,448.48 ms
Warning: RecomputeFieldValue.FieldOffset automatic substitution failed. The automatic substitution registration was attempted because a call to sun.misc.Unsafe.objectFieldOffset(Field) was detected in the static initializer of io.quarkus.runtime.CleanableExecutor$Resetter. Detailed failure reason(s): The argument of Unsafe.objectFieldOffset(Field) is not a constant field., Could not determine the field where the value produced by the call to sun.misc.Unsafe.objectFieldOffset(Field) for the field offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store.
Warning: RecomputeFieldValue.FieldOffset automatic substitution failed. The automatic substitution registration was attempted because a call to sun.misc.Unsafe.objectFieldOffset(Field) was detected in the static initializer of io.quarkus.runtime.CleanableExecutor$Resetter. Detailed failure reason(s): The argument of Unsafe.objectFieldOffset(Field) is not a constant field., Could not determine the field where the value produced by the call to sun.misc.Unsafe.objectFieldOffset(Field) for the field offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store.
[getting-started-1.0-SNAPSHOT-runner:12820]     analysis:   3,536.55 ms
Error: Error encountered while parsing io.quarkus.runtime.CleanableExecutor$Resetter.run()
Parsing context:
        parsing io.quarkus.runtime.CleanableExecutor.clean(CleanableExecutor.java:50)
        parsing io.quarkus.runtime.ExecutorTemplate$1.run(ExecutorTemplate.java:47)
        parsing java.lang.Shutdown.runHooks(Shutdown.java:123)
        parsing java.lang.Shutdown.sequence(Shutdown.java:167)
        parsing java.lang.Shutdown.shutdown(Shutdown.java:234)
        parsing com.oracle.svm.core.jdk.RuntimeSupport.shutdown(RuntimeSupport.java:181)
        parsing com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:172)
        parsing com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)

com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing io.quarkus.runtime.CleanableExecutor$Resetter.run()
Parsing context:
        parsing io.quarkus.runtime.CleanableExecutor.clean(CleanableExecutor.java:50)
        parsing io.quarkus.runtime.ExecutorTemplate$1.run(ExecutorTemplate.java:47)
        parsing java.lang.Shutdown.runHooks(Shutdown.java:123)
        parsing java.lang.Shutdown.sequence(Shutdown.java:167)
        parsing java.lang.Shutdown.shutdown(Shutdown.java:234)
        parsing com.oracle.svm.core.jdk.RuntimeSupport.shutdown(RuntimeSupport.java:181)
        parsing com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:172)
        parsing com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)

        at com.oracle.graal.pointsto.util.AnalysisError.parsingError(AnalysisError.java:138)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:327)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:300)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:107)
        at com.oracle.graal.pointsto.flow.StaticInvokeTypeFlow.update(InvokeTypeFlow.java:346)
        at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:510)
        at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:171)
        at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: com.oracle.svm.hosted.analysis.flow.SVMMethodTypeFlowBuilder$UnsafeOffsetError: Field AnalysisField<CleanableExecutor$Resetter.threadLocalMapOffs accessed: false reads: true written: false> is used as an offset in an unsafe operation, but no value recomputation found.
 Wrapped field: HotSpotResolvedJavaFieldImpl<io.quarkus.runtime.CleanableExecutor$Resetter.threadLocalMapOffs long:104>
 Location: at io.quarkus.runtime.CleanableExecutor$Resetter.run(CleanableExecutor.java:190) [bci: 16]
        at com.oracle.svm.hosted.analysis.flow.SVMMethodTypeFlowBuilder$UnsafeOffsetError.report(SVMMethodTypeFlowBuilder.java:119)
        at com.oracle.svm.hosted.analysis.flow.SVMMethodTypeFlowBuilder.checkUnsafeOffset(SVMMethodTypeFlowBuilder.java:161)
        at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder$NodeIterator.node(MethodTypeFlowBuilder.java:1062)
        at org.graalvm.compiler.phases.graph.PostOrderNodeIterator.apply(PostOrderNodeIterator.java:106)
        at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:421)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:310)
        ... 10 more
Error: Image build request failed with exit status 1

C:\Windows\system32>SET _CL_=/I "C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\custom"

I've searched for the error, but found nothing.

Rostislav Svoboda

unread,
Jul 16, 2019, 3:32:28 AM7/16/19
to jeremysc...@gmail.com, Quarkus Development mailing list
Additional arguments for native-imge command
<additionalBuildArgs>foo,bar</additionalBuildArgs> under configuration element for native-image goal of quarkus-maven-plugin plugin


Windows SDK
https://github.com/oracle/graal/tree/master/substratevm mentions Windows SDK for Windows 7 and Windows SDK 7.1 Command Prompt
In your logs there is usage of Windows Kits 10, can’t say if SDK for Windows 7 is a must have
Maybe ask Graal people directly via https://github.com/oracle/graal/issues 


Error: Error encountered while parsing io.quarkus.runtime.CleanableExecutor$Resetter.run()
Quarkus supports GraalVM 19.0.2, as discussed in https://github.com/quarkusio/quarkus/pull/3074 GraalVM 19.1.0 has some issues and we need bugfix in GraalVM
Maybe it can be related to this fail, maybe not …

Rostislav

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
Message has been deleted

Jeremy Schwingbeck

unread,
Jul 16, 2019, 12:30:00 PM7/16/19
to Quarkus Development mailing list
Swapped back to GraalVM 19.0.2, but I'm still getting the same error. I'm using Windows SDK 7 and Windows SDK 7.1 Command Prompt. The windows 10 thing you're seeing is just a place where I decided to put some custom C++ libs (hence the custom folder at the end). I even swapped from Quarkus 0.19.1 back to what the project was originally generated in, 0.18.0, but to no avail. I'll keep looking into it in my spare time, but I'm willing to bet it's something with my environment. Thank you for the help.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages