next up previous contents
Next: Running the Example Up: Writing Value-Added Servers with Manager Previous: Implementing Clients

 

Compiling the Example

The Shore documentation release contains the source code for the examples in this tutorial. Assuming you have fetched and unpacked the documentation release as described in the Shore Software Installation Manual , you will have a directory $SHROOT/examples, where $SHROOT is the root directory of the documentation relase.

You must set the environment variable $SHORE to point to the location where you have installed the Shore binaries and libraries. If you are using a binary distribution, that would be the same as $SHROOT. If you built the binaries from sources, it would be $SHROOT/installed.

    mkdir grid
    cp -R $SHROOT/examples/vas/grid/* grid
    cd grid
    make all

You should see something like this:

    cp /usr/local/shore/include/ShoreConfig.h .
    /usr/local/shore/bin/rpcgen msg.x
    rm -f msg_svc.c
    /usr/local/shore/bin/rpcgen -m -o msg_svc.c msg.x
    g++ -g -I/usr/local/shore/include   -c grid.C 
    g++ -g -I/usr/local/shore/include   -c rpc_thread.C 
    g++ -g -I/usr/local/shore/include   -c server.C 
    g++ -g -I/usr/local/shore/include   -c command_server.C 
    g++ -g -I/usr/local/shore/include   -c server_stubs.C 
    g++ -g -I/usr/local/shore/include   -c options.C 
    g++ -g -I/usr/local/shore/include   -c command.C 
    g++ -g -I/usr/local/shore/include   -c grid_basics.C 
    gcc -g -traditional -I/usr/local/shore/include   -c msg_xdr.c 
    gcc -g -traditional -I/usr/local/shore/include   -c msg_svc.c 
    g++ -g -I/usr/local/shore/include    -o server msg_svc.o grid.o \
        rpc_thread.o server.o command_server.o server_stubs.o options.o \
        command.o grid_basics.o msg_xdr.o /usr/local/shore/lib/libsm.a \
        /usr/local/shore/lib/libshorecommon.a -lnsl
    g++ -g -I/usr/local/shore/include   -c client.C 
    g++ -g -I/usr/local/shore/include   -c command_client.C 
    gcc -g -traditional -I/usr/local/shore/include   -c msg_clnt.c 
    g++ -g -I/usr/local/shore/include    -o client client.o \
        command_client.o options.o command.o grid_basics.o msg_clnt.o \
        msg_xdr.o /usr/local/shore/lib/libshorecommon.a -lnsl
    sed -e "s,DISKRW,/usr/local/shore/bin/diskrw," exampleconfig > config
    mkdir log.grid

Notice that the modified rpcgen shipped with Shore is used by default. The make target "all" also customizes the config file to indicate the location of the diskrw program and makes a directory log.grid to hold the log file for running the grid VAS server (the name of this directory is set by the wm_logdir option in config). When the compilation is complete, you should have a two executables, server and client.



This page was generated from LaTeX sources
10/27/1997