Building native - Default native-compiler executable 'cl.exe' not found via environment variable PATH

4,006 views
Skip to first unread message

Mark Jayson Gonzaga

unread,
Aug 1, 2021, 8:03:22 AM8/1/21
to Quarkus Development mailing list
Hi Team,

I have been trying to build our quarkus project natively following this article.

I'm running Windows 10 and upon building I got the below error.

Error: Default native-compiler executable 'cl.exe' not found via environment variable PATH
Error: To prevent native-toolchain checking provide command-line option -H:-CheckToolchain
com.oracle.svm.core.util.UserError$UserException: Default native-compiler executable 'cl.exe' not found via environment variable PATH
To prevent native-toolchain checking provide command-line option -H:-CheckToolchain


I have graalvm and the Microsoft Native Tools in my machine but still getting the above error.

image.png
image.png

As advised from the article. I created this bat file 
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && mvn package -Pnative'
But still getting the same result. I tried looking for the above error from the internet but wasn't able to find a solution for this. Wondering if anyone got the same exception or is it just me

Thanks for the help.

Deehaz

unread,
Sep 17, 2021, 9:47:33 AM9/17/21
to Quarkus Development mailing list
HI mark, where you able to fix this? if yes how did you do it? currently facing the same issue.

Mark Jayson Gonzaga

unread,
Sep 17, 2021, 9:52:36 AM9/17/21
to lordz...@gmail.com, Quarkus Development mailing list
Hi,

No not yet. Still finding a way on around this.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/707b7140-4991-4fc8-ad45-b8392d88c799n%40googlegroups.com.

Deehaz

unread,
Sep 17, 2021, 10:03:16 AM9/17/21
to Quarkus Development mailing list
Do you have visual studio installed?

clement escoffier

unread,
Sep 17, 2021, 12:53:36 PM9/17/21
to Quarkus Development mailing list
Hello,

On a windows CI, I had to install "Developer Command Prompt for Microsoft Visual C++” to get the GraalVM compiler working. 

Clement

Karm Michal Babacek

unread,
Sep 20, 2021, 5:24:13 AM9/20/21
to clement....@gmail.com, Quarkus Development mailing list
Hello,

GitHub workflow Windows systems have Visual studio installed IIRC, so one "just" needs to do some trickery with env vars [1].

If you have your own box, all it takes is to use Choco
to install VS and to setup PATH:

(my script, Powershell dummy, use with caution)

The you can run as simply as:
call vcvars64
set "GRAALVM_HOME=....."
set "JAVA_HOME=%GRAALVM_HOME%"
set "PATH=%JAVA_HOME%\\bin;%PATH%"

mvnw....

HTH
Cheers
K.




--
Sent from my Hosaka Ono-Sendai Cyberspace 7

--
Karm Michal Babacek
Red Hat | UTC+02:00
Reply all
Reply to author
Forward
0 new messages