Hello everybody,
so far I have used OpenFAST through an anaconda environment, but now I need to compile it from source on a Ubuntu 20.04 workstation, and am following the instruction on readthedocs (sections 2.2.1, 2.2.2, 2.2.4, 2.2.5).
I have customized the cmake command a first time as follow:
cmake .. -DBUILD_DOCUMENTATION=ON -DBUILD_FASTFARM=ON -DBUILD_OPENFAST_SIMULINK_API=ON -DBUILD_TESTING=ON -DOPENMP=ON
and when I run it from the /build directory I have the following CLI output:
- The CXX compiler identification is GNU 9.4.0
-- The C compiler identification is GNU 9.4.0
-- The Fortran compiler identification is GNU 9.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
-- Performing Test HAS_FORTRAN2008
-- Performing Test HAS_FORTRAN2008 - Success
-- Enabling Fortran 2008 features
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Looking for Fortran dgemm
-- Looking for Fortran dgemm - found
-- Found BLAS: /usr/lib/x86_64-linux-gnu/libf77blas.so;/usr/lib/x86_64-linux-gnu/libatlas.so
-- Looking for Fortran cheev
-- Looking for Fortran cheev - not found
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- A library with LAPACK API found.
-- Setting system file as: src/SysMatlabLinuxGnu.f90
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find Matlab (missing: Matlab_INCLUDE_DIRS Matlab_MEX_LIBRARY
Matlab_MEX_EXTENSION Matlab_ROOT_DIR) (found version "NOTFOUND")
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
cmake/FindMatlab.cmake:1693 (find_package_handle_standard_args)
modules/nwtc-library/CMakeLists.txt:127 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/reius/OpenFASTcompiled/OpenFASTcompld_original/OpenFAST/build/CMakeFiles/CMakeOutput.log".
See also "/home/reius/OpenFASTcompiled/OpenFASTcompld_original/OpenFAST/build/CMakeFiles/CMakeError.log".
after which, if I proceed with the next command make I get the error
make: *** No targets specified and no makefile found. Stop.
then, thinking that the matlab-related problem came from the simulink option, I tried cmake again without the option relative to simulink:
cmake .. -DBUILD_DOCUMENTATION=ON -DBUILD_FASTFARM=ON -DBUILD_TESTING=ON -DOPENMP=ON
and the output has been:
-- Enabling Fortran 2008 features
-- A library with LAPACK API found.
-- Setting system file as: src/SysMatlabLinuxGnu.f90
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find Matlab (missing: Matlab_INCLUDE_DIRS Matlab_MEX_LIBRARY
Matlab_MEX_EXTENSION Matlab_ROOT_DIR) (found version "NOTFOUND")
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
cmake/FindMatlab.cmake:1693 (find_package_handle_standard_args)
modules/nwtc-library/CMakeLists.txt:127 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/reius/OpenFASTcompiled/OpenFASTcompld_original/OpenFAST/build/CMakeFiles/CMakeOutput.log".
See also "/home/reius/OpenFASTcompiled/OpenFASTcompld_original/OpenFAST/build/CMakeFiles/CMakeError.log".
and the attempt to run make resulted in the same output as after the cmake command with the simulink option on.
I read CMakeOutput.log and CMakeError.log, but found nothing explicit about matlab…
I do have Matlab installed in this Ubuntu workstation.
Can someone help me solving this error and proceed with the compiling?
Thank you for your time and attention,
Henny