我要评分
获取效率
正确性
完整性
易理解

Error Reported When Compiling the sigio Module

Symptom

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

Key Process and Cause Analysis

None

Conclusion and Solution

Add a flang branch.

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

      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