Thanks for the advice,sir.It might be the GNU version that caused this error like you said,so I installed both gcc14 and gcc13,because gcc14 can not be removed specifically due to its dependency with other softwares,this time WRF compiled successfully in miniconda!Then I compiled WPS,it came with five errors:
/home/yongfa/files/miniconda3/envs/syf/bin/../lib/gcc/x86_64-conda-linux-gnu/14.1.0/../../../../x86_64-conda-linux-gnu/bin/ld: field_routines.f
.text+0xaa3): undefined reference to `nf_get_vara_int_'
collect2: error: ld returned 1 exit status
/home/yongfa/files/miniconda3/envs/syf/bin/../lib/gcc/x86_64-conda-linux-gnu/14.1.0/../../../../x86_64-conda-linux-gnu/bin/ld: ./ngl/libg2_4.a(dec_jpeg2000.o): in function `dec_jpeg2000_':
dec_jpeg2000.c
.text+0x61): undefined reference to `jpc_decode'
collect2: error: ld returned 1 exit status
/home/yongfa/files/miniconda3/envs/syf/bin/../lib/gcc/x86_64-conda-linux-gnu/14.1.0/../../../../x86_64-conda-linux-gnu/bin/ld: field_routines.f
.text+0xaa3): undefined reference to `nf_get_vara_int_'
collect2: error: ld returned 1 exit status
/home/yongfa/files/miniconda3/envs/syf/bin/../lib/gcc/x86_64-conda-linux-gnu/14.1.0/../../../../x86_64-conda-linux-gnu/bin/ld: ./ngl/libg2_4.a(dec_jpeg2000.o): in function `dec_jpeg2000_':
dec_jpeg2000.c
.text+0x61): undefined reference to `jpc_decode'
collect2: error: ld returned 1 exit status
/home/yongfa/files/miniconda3/envs/syf/bin/../lib/gcc/x86_64-conda-linux-gnu/14.1.0/../../../../x86_64-conda-linux-gnu/bin/ld: int2nc.o: in function `MAIN__':
int2nc.f90
.text+0x238f): undefined reference to `nf_close_'
collect2: error: ld returned 1 exit status
Although I have read serveral posts similar to the errors above ,they all occured in non-conda environment,so I am not sure what I should do to fix this problem.