Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

WRF compiling error

dafage66

New member
WRF compilation comes with an error ,still no modifications were made.Full details see in the attached log:

/usr/bin/ld: /home/yongfa/Build_WRF/LIBRARIES/netcdf/lib/libnetcdff.a(nf_nc4.o): undefined reference to symbol 'nc_set_var_chunk_cache_ints'
/usr/bin/ld: /home/yongfa/Build_WRF/LIBRARIES/netcdf/lib/libnetcdf.so.19: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
 

Attachments

  • compilelog6.txt
    725.9 KB · Views: 1
  • bashrc.txt
    1.9 KB · Views: 2
Last edited:
This looks like a problem similar to what this user was experiencing when installing HDF5 and GNU. Take a look and see if their suggested solution works for you.
 
Unfortunately,I did not figure the last problem out.This time I tried install WRF by miniconda3,everything went just fine,untill I ./compile em_real &> log.compile,its compilelog came with several errors,all the errors are the same as follows:

/home/yongfa/codes/miniconda3/envs/syf/bin/../lib/gcc/x86_64-conda-linux-gnu/14.1.0/../../../../x86_64-conda-linux-gnu/bin/ld: failed to set dynamic section sizes: bad valuecollect2: error: ld returned 1 exit status
 

Attachments

  • compilelog1.txt
    752.7 KB · Views: 3
@dafage66,
Is it possible for you to try this with a slightly older version of GNU (perhaps V13) to see if that makes any difference? I feel like I recall something not working properly with GNU V14 for WRF compiles, although I can't track down where I saw that. I did find this issue on our GitHub repository, but the errors aren't the same as yours. When you do recompile with an earlier version of GNU, will you set it to compile with only a single processor? For e.g., after you do a clean and reconfigure,

./compile em_real -j 1 >& compilelog.txt

and if it's still failing, send me the new compile log and the configure.wrf file. Thanks!
 
@dafage66,
Is it possible for you to try this with a slightly older version of GNU (perhaps V13) to see if that makes any difference? I feel like I recall something not working properly with GNU V14 for WRF compiles, although I can't track down where I saw that. I did find this issue on our GitHub repository, but the errors aren't the same as yours. When you do recompile with an earlier version of GNU, will you set it to compile with only a single processor? For e.g., after you do a clean and reconfigure,

./compile em_real -j 1 >& compilelog.txt

and if it's still failing, send me the new compile log and the configure.wrf file. Thanks!
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.
 

Attachments

  • wpscompilelog1.txt
    189.3 KB · Views: 0
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.
you can hard code the gcc-13 in the wrf exports and that should allow you to install outside of conda
 
maybe, but you would have to do all the libraries again with gcc-13 and hard code the direct path to the version of gcc. Not the easiest thing to do if you are new to coding
 
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.
I might get it wrong,it was not the GNU that caused the errors,because I downgraded gcc version to gcc13.2.0,WRF went well ,WPS came with the same errors:

/home/yongfa/files/miniconda3/envs/syf/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.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/13.2.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/13.2.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/13.2.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/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: int2nc.o: in function `MAIN__':
int2nc.f90:(.text+0x23d3): undefined reference to `nf_close_'
collect2: error: ld returned 1 exit status
 

Attachments

  • wpscompilelog3.txt
    189.2 KB · Views: 0
I might get it wrong,it was not the GNU that caused the errors,because I downgraded gcc version to gcc13.2.0,WRF went well ,WPS came with the same errors:

/home/yongfa/files/miniconda3/envs/syf/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.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/13.2.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/13.2.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/13.2.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/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: int2nc.o: in function `MAIN__':
int2nc.f90:(.text+0x23d3): undefined reference to `nf_close_'
collect2: error: ld returned 1 exit status
I think the issue is that you are building the libraries inside miniconda and the exports in the bashrc file are not located inside the conda environment.

Conda is like a mini virtual machine and if the paths are wrong then nothing works.
 
I reinstalled it with mniconda,WRF again ran ok,WPS still compiled with the errors metioned above,I attached my bashrc file below.
Do you mean I should put WRF folder in the miniconda3 directory and run again?
 

Attachments

  • bashrc.txt
    1.4 KB · Views: 0
  • wrfcompilelog.txt
    777.1 KB · Views: 0
Top