Page 1 of 1

undefined reference to `xdr_*'

PostPosted: Mon Jan 04, 2021 7:58 am
by Jimxu1995
Hi everyone,

I am using WRF3.9.1.1 with GEOS-Chem, when I do the ./compile em_real at last for wrf.exe, I met a problem related to xdr. I tried many ways but cannot fix this problem, hope someone can give me an method to solve this, Thank you in advance. The compilation log are as follow:

time mpif90 -f90=ifort -o wrf.exe -O2 -ip -fp-model precise -w -ftz -align all -fno-alias -FR -convert big_endian -ip wrf.o ../main/module_wrf_top.o libwrflib.a /data2/home/xtxu/WRF-GC/test2/external/fftpack/fftpack5/libfftpack.a /data2/home/xtxu/WRF-GC/test2/external/io_grib1/libio_grib1.a /data2/home/xtxu/WRF-GC/test2/external/io_grib_share/libio_grib_share.a /data2/home/xtxu/WRF-GC/test2/external/io_int/libwrfio_int.a -L/data2/home/xtxu/WRF-GC/test2/external/esmf_time_f90 -lesmf_time /data2/home/xtxu/WRF-GC/test2/external/RSL_LITE/librsl_lite.a /data2/home/xtxu/WRF-GC/test2/frame/module_internal_header_util.o /data2/home/xtxu/WRF-GC/test2/frame/pack_utils.o -L/data2/home/xtxu/WRF-GC/test2/external/io_netcdf -lwrfio_nf -L/scratch/software/netcdf-4new/lib -lnetcdff -lnetcdf -L/scratch/software/hdf5-1.8.17new/lib -lhdf5_fortran -lhdf5 -lm -lz -DLINUX_IFORT -DEXTERNAL_GRID -DNC_DIAG -DUCX -DGEOS_FP -DNC_HAS_COMPRESSION -DMODEL_ -DMODEL_WRF -DUSE_REAL8 -lGIGC -lmpich -lmpichf90 -L../chem/gigc/lib -lHistory -lGeosCore -lHistory -lKpp -lGeosCore -lIsoropia -lHCOI -lHCOX -lHCO -lGeosUtil -lKpp -lHeaders -lNcUtils -L/scratch/software/netcdf-4new -lnetcdff -lnetcdf -L/scratch/software/hdf5-1.8.17new/lib -I../chem/gigc/mod -lnetcdf
libwrflib.a(landread.o): In function `tsGetValueInt':
landread.c:(.text+0x1f7): undefined reference to `xdr_float'
libwrflib.a(landread.o): In function `get_landuse_':
landread.c:(.text+0x46b): undefined reference to `xdrstdio_create'
landread.c:(.text+0x486): undefined reference to `xdr_int'
landread.c:(.text+0x497): undefined reference to `xdr_int'
landread.c:(.text+0x4a8): undefined reference to `xdr_int'
landread.c:(.text+0x4b9): undefined reference to `xdr_int'
landread.c:(.text+0x4ca): undefined reference to `xdr_int'
libwrflib.a(landread.o):landread.c:(.text+0x4db): more undefined references to `xdr_int' follow
libwrflib.a(landread.o): In function `get_landuse_':
landread.c:(.text+0x50e): undefined reference to `xdr_double'
landread.c:(.text+0x51f): undefined reference to `xdr_double'
landread.c:(.text+0x530): undefined reference to `xdr_double'
landread.c:(.text+0x541): undefined reference to `xdr_double'
landread.c:(.text+0x552): undefined reference to `xdr_int'
landread.c:(.text+0x913): undefined reference to `xdr_float'
libwrflib.a(landread.o): In function `tsGetValue':
landread.c:(.text+0xcff): undefined reference to `xdr_float'
landread.c:(.text+0xe03): undefined reference to `xdr_float'
landread.c:(.text+0xf07): undefined reference to `xdr_float'
landread.c:(.text+0x1009): undefined reference to `xdr_float'
libwrflib.a(landread.o): In function `get_terrain_':
landread.c:(.text+0x13bb): undefined reference to `xdrstdio_create'
landread.c:(.text+0x13d6): undefined reference to `xdr_int'
landread.c:(.text+0x13e7): undefined reference to `xdr_int'
landread.c:(.text+0x13f8): undefined reference to `xdr_int'
landread.c:(.text+0x1409): undefined reference to `xdr_int'
landread.c:(.text+0x141a): undefined reference to `xdr_int'
libwrflib.a(landread.o):landread.c:(.text+0x142b): more undefined references to `xdr_int' follow
libwrflib.a(landread.o): In function `get_terrain_':
landread.c:(.text+0x145e): undefined reference to `xdr_double'
landread.c:(.text+0x146f): undefined reference to `xdr_double'
landread.c:(.text+0x1480): undefined reference to `xdr_double'
landread.c:(.text+0x1491): undefined reference to `xdr_double'
landread.c:(.text+0x14a2): undefined reference to `xdr_int'
libwrflib.a(landread.o): In function `tsInitTileSet':
landread.c:(.text+0x2d4c): undefined reference to `xdrstdio_create'
landread.c:(.text+0x2d67): undefined reference to `xdr_int'
landread.c:(.text+0x2d78): undefined reference to `xdr_int'
landread.c:(.text+0x2d89): undefined reference to `xdr_int'
landread.c:(.text+0x2d9a): undefined reference to `xdr_int'
landread.c:(.text+0x2dab): undefined reference to `xdr_int'
libwrflib.a(landread.o):landread.c:(.text+0x2dbc): more undefined references to `xdr_int' follow
libwrflib.a(landread.o): In function `tsInitTileSet':
landread.c:(.text+0x2def): undefined reference to `xdr_double'
landread.c:(.text+0x2e00): undefined reference to `xdr_double'
landread.c:(.text+0x2e11): undefined reference to `xdr_double'
landread.c:(.text+0x2e22): undefined reference to `xdr_double'
landread.c:(.text+0x2e33): undefined reference to `xdr_int'
0.82user 1.09system 0:01.95elapsed 98%CPU (0avgtext+0avgdata 110348maxresident)k
0inputs+135224outputs (0major+87684minor)pagefaults 0swaps
make[1]: [em_wrf] Error 1 (ignored)