I ran into an error while compiling CNS 1.3 on MacOS Catalina (10.15.7) using ifort. The compiler for C couldn’t find stdio.h so it couldn’t go on and compile the parts of the program that are written in C.
I made sure that XCode’s CommandLineTools were installed and as up to date as they could be (not the most recent version because that one is for MacOS Big Sur).
I also made sure that ifort and icc were working. I had to source the /opt/intel/oneapi/setvars.sh
file for ifort and icc to work.
This was not enough, because the compiler still could not find stdio.h. I had to edit the Makefile of CNS, change CCFLAGS=-O
into CCFLAGS="$(CCFLAGS)
" (4 lines above the bottom of the file) then in the command line (make sure it’s tcsh
) enter:
setenv EXT_CCFLAGS "-I/foo"
with foo being the path to the stdio file. Then just enter make install
.
1 Like