Failure in Compiling plotgrids.exe, ld cannot find -lX11

Installing the WRF Preprocessing System

Failure in Compiling plotgrids.exe, ld cannot find -lX11

Postby akiortagem » Thu Sep 12, 2013 5:33 am

Hello all,

I'm quite new on compiling WRF and WPS right from scratch (although I have experience on using both). I ahve a problem where I can't compile the utility required to preview the domains set on namelist.wps, namely the plotgrids.exe.

It seems that I'm missing something called X11 library. (CMIIW it has something to do with x windows). I am currently using CentOS 6.2 x86_64 with gfortran and gcc compiler.

Here is a part of my configure.wps (which I think has something to do with the errors)

Code: Select all
SHELL              =       /bin/sh

NCARG_LIBS      =   -L$(NCARG_ROOT)/lib -lncarg -lncarg_gks -lncarg_c \
            -L/usr/X11R6/lib -lX11

And here is my ./compile plotgrids logfile
Code: Select all
 
**** Compiling plotgrids ****
 
( cd src ; \
        if [ "" = yes ] ; then \
          WRF_DIR2=../WRFV3 ; \
        else \
          WRF_DIR2=/home/poc/SRC/WPS/../WRFV3 ; \
        fi ; \
   make -i -r plotgrids.exe \
      WRF_DIR="$WRF_DIR2" \
      FC="gfortran " \
      CC="gcc" \
      CPP="/usr/bin/cpp -C -P -traditional" \
      FFLAGS="-ffree-form -O -fconvert=big-endian -frecord-marker=4" \
      CFLAGS="" \
      LDFLAGS="" \
      CPPFLAGS="-D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL  -D_UTIL" )
make[1]: Entering directory `/home/poc/SRC/WPS/util/src'
gfortran -o plotgrids.exe  module_map_utils.o module_debug.o cio.o constants_module.o misc_definitions_module.o \
      plotgrids.o -L/lib -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX11
/usr/bin/ld: cannot find -lncarg
collect2: ld returned 1 exit status
make[1]: [plotgrids.exe] Error 1 (ignored)
make[1]: Leaving directory `/home/poc/SRC/WPS/util/src'
if [ -h plotgrids.exe ] ; then \
      /bin/rm -f plotgrids.exe ; \
   fi ; \
   if [ -h ../plotgrids.exe ] ; then \
      /bin/rm -f ../plotgrids.exe ; \
   fi ; \
   if [ -e src/plotgrids.exe ] ; then \
      ln -sf src/plotgrids.exe . ; \
   fi




I beg the good people of this lovely WRF forum to help me, I have run out of ideas.
akiortagem
 
Posts: 7
Joined: Thu Sep 12, 2013 5:05 am

Re: Failure in Compiling plotgrids.exe, ld cannot find -lX11

Postby akiortagem » Thu Sep 12, 2013 9:01 am

Terribly sorry, I posted the wrong compile.out

Here's the current one
Code: Select all
 
**** Compiling plotgrids ****
 
( cd src ; \
        if [ "" = yes ] ; then \
          WRF_DIR2=../WRFV3 ; \
        else \
          WRF_DIR2=/home/poc/SRC/WPS/../WRFV3 ; \
        fi ; \
   make -i -r plotgrids.exe \
      WRF_DIR="$WRF_DIR2" \
      FC="gfortran " \
      CC="gcc" \
      CPP="/usr/bin/cpp -C -P -traditional" \
      FFLAGS="-ffree-form -O -fconvert=big-endian -frecord-marker=4" \
      CFLAGS="" \
      LDFLAGS="" \
      CPPFLAGS="-D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL  -D_UTIL" )
make[1]: Entering directory `/home/poc/SRC/WPS/util/src'
gfortran -o plotgrids.exe  module_map_utils.o module_debug.o cio.o constants_module.o misc_definitions_module.o \
      plotgrids.o -L/usr/local/ncarg/lib -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX11
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
make[1]: [plotgrids.exe] Error 1 (ignored)
make[1]: Leaving directory `/home/poc/SRC/WPS/util/src'
if [ -h plotgrids.exe ] ; then \
      /bin/rm -f plotgrids.exe ; \
   fi ; \
   if [ -h ../plotgrids.exe ] ; then \
      /bin/rm -f ../plotgrids.exe ; \
   fi ; \
   if [ -e src/plotgrids.exe ] ; then \
      ln -sf src/plotgrids.exe . ; \
   fi

akiortagem
 
Posts: 7
Joined: Thu Sep 12, 2013 5:05 am

Re: Failure in Compiling plotgrids.exe, ld cannot find -lX11

Postby akiortagem » Fri Sep 13, 2013 6:30 am

I resolved the issue by completely uninstalling NCARG library and reinstalling them through EPEL repository (info http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x) which has NCARG Library and their dependecies on list.

I hope this will help anyone who's havin the same issues
akiortagem
 
Posts: 7
Joined: Thu Sep 12, 2013 5:05 am


Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest