Error "F90-S-0034-Syntax error at or near" Reported When Compiling the nceppost Module
Symptom
During the NCEPLIBS compilation and installation, the nceppost module reports the two errors: "F90-S-0034-Syntax error at or near & (/path/to/NCEPLIBS/NCEPLIBE-1.2.0/download/emc_post/sorc/ncep_post.fd/CMASSI.f: 6)" and "F90-S-0034-Syntax error at or near & (/path/to/NCEPLIBS/NCEPLIBE-1.2.0/download/emc_post/sorc/ncep_post.fd/CMASSI.f: 26)."

Key Process and Cause Analysis
None
Conclusion and Solution
- Modify the /ncep_post.fd/CMakeLists.txt file.
- Open the /ncep_post.fd/CMakeLists.txt file.
vi /path/to/NCEPLIBS/NCEPLIBS-1.2.0/download/emc_post/sorc/ncep_post.fd/CMakeLists.txt
- Press i to enter the edit mode and add a new line above line 188:
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(Flang)$") set(CMAKE_Fortran_FLAGS "-g -ffree-form -fconvert=big-endian") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -ggdb -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check")
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the /ncep_post.fd/CMakeLists.txt file.
- Perform the compilation again.
make
Parent topic: Troubleshooting
