[Wrf-users] WPS linking error, undefined reference to `_gfortran_pow_r4_i4' etc

Dmitry Vinokurov df6.626 at gmail.com
Tue Mar 8 08:20:21 MST 2011


Hi!

I'm trying to compile WRF for real data on CentOS 5.5 with gcc44 WRF was 
built successfully (after some digging and rebuilding netcdf with gcc44 
from srpm), but WPS didn't. According to manual ( 
http://www.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap2.htm#Build_WPS 
) only plotfmt.exe and plotgrids.exe are missing, other executables 
(geogrid.exe, metgrid.exe, ungrib.exe, and avg_tsfc.exe, 
calc_ecmwf_p.exe, g1print.exe, g2print.exe, height_ukmo.exe, 
mod_levs.exe, rd_intermediate.exe) were built successfully. As far I see 
from build log, there are a couple of linker errors:
----------------
...
gfortran44 -o plotfmt.exe -g plotfmt.o read_met_module.o module_debug.o \
                 misc_definitions_module.o cio.o met_data_module.o \
                 -L/usr/lib64/ncarg 
-L/usr/lib/gcc/x86_64-redhat-linux6E/4.4.0/ -lgfortran -lg2c -lncarg 
-lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX1
/usr/lib64/ncarg/libncarg.a(cpcldr.o): In function `cpcldr_':
(.text+0x734): undefined reference to `_gfortran_pow_r4_i4'
/usr/lib64/ncarg/libncarg.a(cpcldr.o): In function `cpcldr_':
(.text+0x79e): undefined reference to `_gfortran_pow_r4_i4'
/usr/lib64/ncarg/libncarg.a(cpcldr.o): In function `cpcldr_':
(.text+0xd2c): undefined reference to `_gfortran_copy_string'
...
gfortran44 -o plotgrids.exe -g module_map_utils.o module_debug.o cio.o 
constants_module.o misc_definitions_module.o \
                 plotgrids.o -L/usr/lib64/ncarg 
-L/usr/lib/gcc/x86_64-redhat-linux6E/4.4.0/ -lgfortran -lg2c -lncarg 
-lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX11
/usr/lib64/ncarg/libncarg.a(mdpit.o): In function `mdpit_':
(.text+0x7ec): undefined reference to `_gfortran_pow_r8_i4'
/usr/lib64/ncarg/libncarg.a(mdpit.o): In function `mdpit_':
(.text+0xdef): undefined reference to `_gfortran_pow_r8_i4'
/usr/lib64/ncarg/libncarg.a(mdlndr.o): In function `mdlndr_':
...
----------------

As I understand, _gfortran functions are from libgfortran.so. Here are 
results of searching for one of such functions:
----------------
[user at localhost ~]$ nm -D 
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/libgfortran.so | grep 
_gfortran_pow_r4_i4
0000003e7c665c40 T _gfortran_pow_r4_i4
[user at localhost ~]$ nm -D 
/usr/lib/gcc/x86_64-redhat-linux6E/4.4.0/libgfortran.so | grep 
_gfortran_pow_r4_i4
[user at localhost ~]$
----------------

Seems like there is no such function in 4.4 libs at all.

Could anybody advise, how could I fix these errors or where they come 
from? Maybe I should rebuild ncl packages with gcc44?

-- 
Best regards,
Dmitry Vinokurov
+7 905 862 17 11
skype: d.a.vinokurov
<df6.626 at gmail.com>



More information about the Wrf-users mailing list