Skip to content
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

OpenFAST fails to build with CMake + VS on Windows #1523

Closed
andrew-platt opened this issue Apr 11, 2023 · 5 comments
Closed

OpenFAST fails to build with CMake + VS on Windows #1523

andrew-platt opened this issue Apr 11, 2023 · 5 comments

Comments

@andrew-platt
Copy link
Collaborator

Bug description
When building on Windows with CMake, OneAPI, and VS, the OpenFAST.sln fails to build. The failure appears to be from not finding the relevant types files.

This may be related to the recent cmake updates from PR #1010.

To Reproduce

  1. Following steps in https://openfast.readthedocs.io/en/main/source/install/index.html#cmake-with-visual-studio-for-windows
  2. cmake -G "Visual Studio 16 2019" -- this runs ok
  3. start OpenFAST.sln -- opens fine
  4. Build solution -- fails on 14 of 87 projects

Expected behavior
We expect this to compile as expected.

OpenFAST Version
Current dev version (git hash 86b63a9).

@andrew-platt andrew-platt added this to the v3.5.0 milestone Apr 11, 2023
@andrew-platt
Copy link
Collaborator Author

This works correctly with OpenFAST 3.4.1 (git hash 1870408).

@andrew-platt
Copy link
Collaborator Author

There are a few other things that fail. On mac with cmake + gfortran, make nwtclibs fails.

@reos-rcrozier
Copy link
Contributor

Can you post the output from the make nwtclibs failure please

@andrew-platt
Copy link
Collaborator Author

andrew-platt commented Apr 12, 2023

The error was with make nwtclibs_obj (I mistyped in the previous comment):

[aplatt@aplatt-33765s][build-Single-Debug]$ make -j12 nwtclibs_obj
Scanning dependencies of target nwtcbaselib_obj
[ 10%] Building Fortran object modules/nwtc-library/CMakeFiles/nwtcbaselib_obj.dir/src/SingPrec.f90.o
[ 10%] Building Fortran object modules/nwtc-library/CMakeFiles/nwtcbaselib_obj.dir/src/NWTC_Base.f90.o
[ 10%] Built target nwtcbaselib_obj
Scanning dependencies of target nwtclibs_obj
[ 10%] Building Fortran object modules/nwtc-library/CMakeFiles/nwtclibs_obj.dir/src/NWTC_Library_Types.f90.o
[ 10%] Building Fortran object modules/nwtc-library/CMakeFiles/nwtclibs_obj.dir/src/NetLib/lapack/NWTC_LAPACK.f90.o
[ 10%] Building Fortran object modules/nwtc-library/CMakeFiles/nwtclibs_obj.dir/src/ranlux/RANLUX.f90.o
[ 20%] Building Fortran object modules/nwtc-library/CMakeFiles/nwtclibs_obj.dir/src/Polynomial/quartic.f90.o
[ 20%] Building Fortran object modules/nwtc-library/CMakeFiles/nwtclibs_obj.dir/src/NetLib/scalapack/NWTC_ScaLAPACK.f90.o
[ 20%] Building Fortran object modules/nwtc-library/CMakeFiles/nwtclibs_obj.dir/src/NetLib/fftpack/fftpack4.1.f.o
[ 30%] Building Fortran object modules/nwtc-library/CMakeFiles/nwtclibs_obj.dir/src/NetLib/slatec/dqk61.f.o
[ 30%] Building Fortran object modules/nwtc-library/CMakeFiles/nwtclibs_obj.dir/src/NetLib/scalapack/dlasrt2.f.o
[ 30%] Building Fortran object modules/nwtc-library/CMakeFiles/nwtclibs_obj.dir/src/NetLib/slatec/qk61.f.o
[ 30%] Building Fortran object modules/nwtc-library/CMakeFiles/nwtclibs_obj.dir/src/NetLib/scalapack/slasrt2.f.o
[ 30%] Building Fortran object modules/nwtc-library/CMakeFiles/nwtclibs_obj.dir/src/NetLib/slatec/d1mach.f.o
[ 30%] Building Fortran object modules/nwtc-library/CMakeFiles/nwtclibs_obj.dir/src/NetLib/slatec/NWTC_SLATEC.f90.o
/Users/aplatt/software-development/GitHub/openfast-3/modules/nwtc-library/src/NWTC_Library_Types.f90:33:5:

   33 | USE SysSubs
      |     1
Fatal Error: Cannot open module file 'syssubs.mod' for reading at (1): No such file or directory
compilation terminated.
make[3]: *** [modules/nwtc-library/CMakeFiles/nwtclibs_obj.dir/src/NWTC_Library_Types.f90.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/Users/aplatt/software-development/GitHub/openfast-3/modules/nwtc-library/src/NetLib/fftpack/fftpack4.1.f:50:72:

this one is fixed by modifying nwtcbaselib_obj to:
target_link_libraries(nwtclibs_obj

This was preventing building of some other libraries by themselves. I'm working through those issues now.

@andrew-platt
Copy link
Collaborator Author

This was fixed with #1535

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants