[ns] build pdns by redhat but failed

陳湛 chenzhan@vitstage.co.jp
Tue Apr 30 05:16:56 2002


Hi all:

I use Redhat7.2 to build and run PDNS runsimp on two linux computer connected
by lan, but failed, here r the steps i followed, some changes maybe stupid,
please check it.

1. i have downloaded these files form PDNS web page:
FDK3.tar.gz
ns-allinone-2.1b7a.tar.gz
pdns-2.1b7a.release.tar.gz

2. install FDK:
cd $(HOME)
tar zxvf FDK3.tar.gz
cd FDK_3/FEDSM/RTIKIT/SESSION/SRC
//if not change, it will report error when compiling.
vi session.c
   change va_arg(a, int) => va_arg(a, char)
cd FDK_3/FEDSM
make

3. untar ns and pdns
cd $(HOME)
tar zxvf ns-allinone-2.1b7a.tar.gz
cd $(HOME)/ns-allinone-2.1b7a
tar zxvf pdns-2.1b7a.release.tar.gz

4. apply patches
cd $(HOME)/ns-allinone-2.1b7a/ns-2.1b7a
patch < pdns.patches
cd $(HOME)/ns-allinone-2.1b7a/ns-2.1b7a/tcl/lib
patch < pdns.patches

5. some more patches by manually
cd $(HOME)/ns-allinone-2.1b7a/ns-2.1b7a
vi Makefile.in
   change the KITHOME, 
   change the KITLIBS to -lBRTI_LINUX_TCP, -lRTIKIT-LINUX-TCP
                                     ^
                                     |__(there is no "l" in readme, but i think it should be added here)
   change the KITINCL to LINUX (in readme, there is no requirement to change this line. but i did)

cd $(HOME)/ns-allinone-2.1b7a/ns-2.1b7a/rti
vi rtisched.cc
   change the "RequestRetraction() => RequestRetraction(long int)"
vi rtilink.cc
   change L331: use cast here "(char *(*)(long int, void *, long int)WhereMessage"

6. install the ns
cd $(HOME)/ns-allinone-2.1b7a
./install

7.copy example1a.tcl example1b.tcl and runsimp to 
cd $(HOME)/example/

8. i have opened my rsh and rlogin port, they can run on both computers
9. add DNS look up item into /etc/host

10. change the runsimp script as below:
#! /bin/csh
rsh -n computer1 "setenv NODEINFO 2:computer1,computer2:0; setenv SESSIONNAME 123456; cd cliff; ../ns-allinone-2.1b7/ns-2.1b7/pdns example1a.tcl 0)" &
rsh -n computer2 "setenv NODEINFO 2:computer1,computer2:1; setenv SESSIONNAME 123456; cd cliff; ../ns-allinone-2.1b7/ns-2.1b7/pdns example1b.tcl 1)" &

after that i try to run it on both computers
./runsimp

it tell me "setenv command not found"
and then it tell me the SESSION should be set.

11. i try to use a new script like this:
#! /bin/csh
rsh computer1 "/bin/csh; setenv NODEINFO 2:computer0,computer2:1; setenv SESSIONNAME 123456; cd ../......" &
rsh computer2 "/bin/csh; setenv NODEINFO 2:computer1,computer2:2; setenv SESSIONNAME 123456; cd ../......" &

then no more error happen,
but it can not run ether, for it did not show anything or have any output file.
i really do not know why.

could u please tell me how to run pdns?
-- 
陳湛 <chenzhan@vitstage.co.jp>