Rate This Document
Findability
Accuracy
Completeness
Readability

Compilation and Installation

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Decompress the installation package and go to the installation directory.
    tar xvf grads-2.2.1-src.tar.gz
    cd grads-2.2.1
  3. Perform the configuration.
    ./configure
    mkdir lib
    cp /path/to/libsx/lib/libsx.so ./lib
    mkdir include
    cp /path/to/libsx /include/libsx.h ./include
  4. Modify the configuration.
    vim src/Makefile

    Change the value of LIBS in line 398 of Makefile.

    LIBS=-lm -lreadline

    Change the value of gui_libs in line 483 of Makefile.

    gui_libs = -L/path/to/libsx/lib -lsx  -lXext -lXaw -lXpm -lXmu -lXt

    vim src/grads.c

    Delete static from line 51 in the grads.c file.

    struct gacmn gcmn;
    vim src/gauser.c

    Modify line 2815 in the gauser.c file.

    #if (USENETCDF == 1 || USEHDF == 1  || USEHDF5 ==1)

  5. Compile GrADS.
    make && make install
  6. Recompile GrADS.

    After the compilation and installation are complete (although no error is reported during the installation), the following error is reported when running GrADS: "grads: symbol lookup error: /home/ivan/WRF/lib/grads-2.2.1/lib/libgxdCairo.so: undefined symbol: gxdbkq."

    The cause is that libgxdXXX.so is not linked to libgradspy.so. Therefore, it is necessary to link to libgradspy.so. (However, do not link to libgradspy.so in the initial compilation because it has not been generated.)

    In the grads-2.2.1/src/Makefile file, change the value of gd_ldflags in line 475.

    gd_ldflags= -L/path/to/grads-2.2.1/lib  -lgradspy

    Perform the compilation and installation again.

    make clean
    cd lib
    rm -rf libgxd*
    rm -rf libgxp*
    cd ..
    make && make install