Rate This Document
Findability
Accuracy
Completeness
Readability

Error Reported When Compiling the landsfcutil Module

Symptom

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

Key Process and Cause Analysis

None

Conclusion and Solution

Add a flang branch.

  1. Modify the /nceplibs-landsfcutil/src/CMakeLists.txt file.
    1. Modify the /nceplibs-landsfcutil/src/CMakeLists.txt file.
      vi /path/to/NCEPLIBS/NCEPLIBS-1.2.0/download/nceplibs-landsfcutil/src/CMakeLists.txt
    2. Press i to enter the edit mode and add a new line above line 11:
      elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(Flang)$")
        set(CMAKE_Fortran_FLAGS "-g -ffree-form ${CMAKE_Fortran_FLAGS}")
        set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
        set(CMAKE_Fortran_FLAGS_DEBUG "-ggdb -Wall")
        set(fortran_d_flags "-fdefault-real-8")

      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