beehive-lab / TornadoVM

TornadoVM: A practical and efficient heterogeneous programming framework for managed languages
https://www.tornadovm.org
Apache License 2.0
1.18k stars 113 forks source link

[installer] check TORNADO_SDK upfront #430

Closed jjfumero closed 4 months ago

jjfumero commented 4 months ago

Description

It checks for the TORNADO_SDK env variable upfront instead of compiling the whole TornadoVM and getting the error at the end, forcing to recompile the whole project.

Problem description

If the TORNADO_SDK was not defined, TornadoVM only emits the error when maven finishes the Java build.

Backend/s tested

Mark the backends affected by this PR.

OS tested

Mark the OS where this PR is tested.

Did you check on FPGAs?

If it is applicable, check your changes on FPGAs.

How to test the new patch?

$ make
$ bin/compile --jdk jdk21 --backend opencl
Checking TORNADO_SDK env variable ................ [ERROR] 
     TORNADO_SDK env variable not defined

     Suggestion (Linux and OSx): run `source setvars.sh`

     Suggestion (Windows): run `setvars.cmd`

$ source setvars.sh
$ make 

ource setvars.sh 
 juan   feat/install/checker … 3  ~  tornadovm  TornadoVM  make
bin/compile --jdk jdk21 --backend opencl
Checking TORNADO_SDK env variable ................ [OK]
mvn -Popencl-backend,ptx-backend,spirv-backend clean
...