Rate This Document
Findability
Accuracy
Completeness
Readability

Error Reported When Compiling the gfsio Module

Symptom

During the NCEPLIBS compilation and installation, the gfsio module reports the following error:

Key Process and Cause Analysis

None

Conclusion and Solution

Add a flang branch.

  1. Modify the /nceplibs-gfsio/src/CMakeLists.txt file.
    1. Modify the /nceplibs-gfsio/src/CMakeLists.txt file.
      vi /path/to/NCEPLIBS/NCEPLIBS-1.2.0/download/nceplibs-gfsio/src/CMakeLists.txt
    2. Press i to enter the edit mode and add a new line above line 8:
      elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(Flang)$")
      set(CMAKE_Fortran_FLAGS "-g -fconvert=big-endian -ffree-form ${CMAKE_Fortran_FLAGS}")
      set(CMAKE_Fortran_RELEASE "-O2")

      After performing 1.a, press Esc, type :set nu, and press Enter to display the line number.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  2. Perform the compilation again.
    make