-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Windows native-image build fails #2116
Comments
Hi @RexxLA |
Thanks! Are there nightly builds to be gotten somewhere? |
Yes ... https://github.com/graalvm/graalvm-ce-dev-builds/releases |
The latest nightly builds now contain the native-image installables. For example you can test the latest 20.0.0 nightly snapshot: |
ah thank you so much |
Oops ... same thing (well slightly different thing because it now reports an actual C++ compile error) with this nightly build: C:\Users\rvjansen\netrexx-code>native-image -cp build\lib\NetRexxC.jar org.netrexx.process.NetRexxC -H:+ReportExceptionStackTraces |
@pejovica are you familiar with this issue? |
@RexxLA if you use a 20.1 snapshot release should get better diagnostic output (see 7444772). Please try https://github.com/graalvm/graalvm-ce-dev-builds/releases/tag/20.1.0-dev-20200208_0320 and report back which error message you get. Thanks. |
@olpaw I had the same errors and after trying with 20.1.0 this is the error that I get:
I don't know why it is targeting x86 or how I can force x64. I've tried both VS 2017 and VS 2019 (both Professional editions) and Windows SDK 7.1 is installed (and has support for both x86 and x64). |
@olpaw By the way, is there any chance you'll remove the dependency on Windows SDK 7.1 and move to something more recent with support for Windows 10? The install process is a pain. |
For Java 8 we cannot move to a more recent native-toolchain because the static jdk libs that we are using there are built with that old toolchain. For GraalVM Java 11 version you can use Visual Studio 2015 version 14.0 or later (C/C++ Optimizing Compiler Version 19.* or later). |
Oh, so Windows SDK 7.1 is not needed for the Java 11 version. That is good. The error above is given by the Java 11 version, by the way. |
Sounds like you are using the wrong developer prompt. You need to run from
|
My bad, I was using the Developer Command Prompt. It's working now, but I'm having an unsupported feature error. I start another issue about it. |
thanks! nice answer |
I can successfully build fallback images for the NetRexx compiler on MacOS and Linux X86-64. These fulfil a need, so while I am studying building completely native executables, I will put these out.
On 64-bit Windows 10 this fails in the following way: (I verified the working of the compiler with a c program and the working of NetRexx itself on the GraalVM installation)
C:\Users\rvjansen\netrexx-code>native-image -cp build/lib/NetRexxC.jar org.netrexx.process.NetRexxC -H:+ReportExceptionStackTraces
[org.netrexx.process.netrexxc:5676] classlist: 6,648.57 ms
[org.netrexx.process.netrexxc:5676] (cap): 1,482.91 ms
[org.netrexx.process.netrexxc:5676] setup: 2,303.88 ms
Error: Error compiling query code (in C:\Users\rvjansen\AppData\Local\Temp\SVM-5060830253155072368\BuiltinDirectives.cpp). Compiler command CL C:\Users\rvjansen\AppData\Local\Temp\SVM-5060830253155072368\BuiltinDirectives.cpp /FeC:\Users\rvjansen\AppData\Local\Temp\SVM-5060830253155072368\BuiltinDirectives.exe output included error: [Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27024.1 for x86, Copyright (C) Microsoft Corporation. All rights reserved., ]
com.oracle.svm.core.util.UserError$UserException: Error compiling query code (in C:\Users\rvjansen\AppData\Local\Temp\SVM-5060830253155072368\BuiltinDirectives.cpp). Compiler command CL C:\Users\rvjansen\AppData\Local\Temp\SVM-5060830253155072368\BuiltinDirectives.cpp /FeC:\Users\rvjansen\AppData\Local\Temp\SVM-5060830253155072368\BuiltinDirectives.exe output included error: [Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27024.1 for x86, 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:218)
at com.oracle.svm.hosted.NativeImageGenerator.processNativeLibraryImports(NativeImageGenerator.java:1518)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeLibraries(NativeImageGenerator.java:1006)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:835)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:528)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:445)
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
Can someone point me in the right direction?
Many thanks in advance.
The text was updated successfully, but these errors were encountered: