UG4 / ugcore

The core functionality of UG4. Includes sources, build-scripts, and utility scripts.
https://github.com/UG4/ugcore
Other
36 stars 23 forks source link

Compiling UG4 for VRL-Studio #29

Closed jarosado0911 closed 4 years ago

jarosado0911 commented 4 years ago

I am attempting to compile UG4 for VRL-Studio as described here https://github.com/UG4/ugcore. I am doing this on Windows 10 Pro, I am using Powershell 7 to run the commands. In particular I receive the following after executing cmake :

-- Info: Current options: -- Info: TARGET: vrl (options are: ugshell, libug4, vrl, vrlgrid, libgrid, gridshell, ugplugin, amg , luashell) -- Info: DIM: ALL (options are: 1, 2, 3, ALL, "1;2", "1;3", "2;3") -- Info: CPU: 1;2 (options are: 1, 2, 3, 4, 5, VAR, ALL, "2;4", "1;3;4" , ...) -- Info: PRECISION: double (options are: single, double) -- Info: STATIC_BUILD: OFF (options are: ON, OFF) -- Info: DEBUG: OFF (options are: ON, OFF) -- Info: DEBUG_LOGS: OFF (options are: ON, OFF) -- Info: PARALLEL: OFF (options are: ON, OFF) -- Info: PCL_DEBUG_BARRIER: OFF (options are: ON, OFF) -- Info: PROFILER: None (options are: None, Shiny, Scalasca, Vampir, ScoreP) -- Info: PROFILE_PCL: OFF (options are: ON, OFF) -- Info: CPU_FREQ: OFF (options are: ON, OFF) -- Info: PROFILE_BRIDGE: OFF (options are: ON, OFF) -- Info: LAPACK: OFF (options are: ON, OFF) -- Info: BLAS: OFF (options are: ON, OFF) -- Info: INTERNAL_BOOST: ON (options are: ON, OFF) -- Info: EMBEDDED_PLUGINS ON (options are: ON, OFF) -- Info: COMPILE_INFO OFF (options are: ON, OFF) -- Info: USE_LUA2C OFF (options are: ON, OFF) -- Info: USE_LUAJIT (options are: ON, OFF) -- -- Info: External libraries (path which contains the library or ON if you used uginstall): -- Info: TETGEN:
-- Info: HLIBPRO:
-- -- Info: C Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801 /bin/Hostx64/x64/cl.exe (ID: MSVC) -- Info: C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801 /bin/Hostx64/x64/cl.exe (ID: MSVC) -- -- Info: Using CPU Algebra. -- Info: compiling with cxx flags: /bigobj /MD /O2 /Ob2 /DNDEBUG -- Info: compiling with c flags: /bigobj /MD /O2 /Ob2 /DNDEBUG -- Info: Not using LAPACK, use -DLAPACK=ON to enable. -- Info: Not using BLAS, use -DBLAS=ON to enable. -- Info: Internal Boost -- Info: Including Boost from C:/Users/jaros_000/ug4/ugcore/cmake/../../externals/BoostForUG4/ cmake : CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message): At C:\Users\jaros_000\Desktop\test - Copy.ps1:23 char:1 Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE) C:/Program Files/CMake/share/cmake-3.18/Modules/FindJNI.cmake:372 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) ugcore/cmake/ug_includes.cmake:537 (find_package) ugcore/CMakeLists.txt:44 (include) -- Configuring incomplete, errors occurred! See also "C:/Users/jaros_000/ug4/build_vs/CMakeFiles/CMakeOutput.log". See also "C:/Users/jaros_000/ug4/build_vs/CMakeFiles/CMakeError.log".

Am I missing JNI libraries? I found a thread with a similar issue here: https://stackoverflow.com/questions/51047978/cmake-could-not-find-jni/56132225 and they appear to give a solution however I am not sure what the equivalent commands would be in Powershell 7 (if I am understanding this correctly)

I have Java Version 8 (build 1.8.0_261-b12) installed, do I need to install a particular set of libraries through Powershell 7? Any suggestions are much appreciated. Thanks.

stephanmg commented 4 years ago

Could you please check if your JAVA_HOME variable is set? (Also check if you have installed a JDK not only a JDE, see here)

I presume it is unset.

export JAVA_HOME=<path_to_jdk>

And, please attach these files:

See also "C:/Users/jaros_000/ug4/build_vs/CMakeFiles/CMakeOutput.log".
See also "C:/Users/jaros_000/ug4/build_vs/CMakeFiles/CMakeError.log".
jarosado0911 commented 4 years ago

Okay, I had to install jdk, and set the path variable, thank you @stephanmg for pointing this out. Now it is resolved.