[MITgcm-support] compilation error- setdir.c:4:20: fatal error: stdlib.h: No such file or directory

Martin Losch Martin.Losch at awi.de
Sun Dec 15 07:00:22 EST 2019


Hi Kaylan,

I can’t be sure but it looks like your C-enviroment is not set up properly (stdlib.h is something very standard and should be availbe). Can you compile simple C-code? Or: what does the screen-output of genmake2 look like?

Fixing this is probably different for different computers. Please ask Google … (or you sysadmin)

Martin

> On 3. Dec 2019, at 19:07, Kalyan Shrestha <kalyansh at uw.edu> wrote:
> 
> Hi all,
> 
> I am new to MITgcm and while trying to compile the code I encounter the below error. 
> 
> Update AD_CONFIG.h and make ./mitgcmuv
> make -f Makefile ./mitgcmuv
> gcc -O0 -mcmodel=medium -DWORDLENGTH=4 -DNML_TERMINATOR -DHAVE_SYSTEM -DHAVE_FDATE -DHAVE_ETIME_SBR -DHAVE_FLUSH   -c setdir.c
> setdir.c:4:20: fatal error: stdlib.h: No such file or directory
>  #include <stdlib.h>
>                     ^
> compilation terminated.
> make[1]: *** [setdir.o] Error 1
> make: *** [fwd_exe_target] Error 2
> 
> 
> For more information, there was no problem generating Makefile using genmake2, however genmake.log also contains the below errors.
> 
> gcc -O0 -mcmodel=medium -c genmake_tc_1.c
> genmake_tc_1.c:2:20: fatal error: stdlib.h: No such file or directory
>  #include <stdlib.h>
>                     ^
> compilation terminated.
> 
> 
> Thanks,
> Kalyan
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support



More information about the MITgcm-support mailing list