[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NS compile problems on OSF & SUN & HPUX



Here's yet another question about compiling NS...

(I have perused the mailing list archive for similar questions
 and haven't found anything).

(Some people have pointed out that linux & freebsd are the easiest
 systems to build under, but unfortunately at UCB (the birthplace of bsd),
 I cannot find a freebsd machine that I can get access to).

----------------------------------------------------------------------------

On DEC-OSF1, I get the following errors when making tclcl ...
And I have tried using g++ instead of c++. Same problem. I have
glanced at Tcl.cc and I dont see anything wrong with it.

c++ -c -I. -I/home/tmp3/sagarwal/otcl-1.0a2
-I/home/tmp3/sagarwal/tk8.0/generic -I/home/tmp3/sagarwal/tcl8.0/generic
-DNO_TK  -DINT_64=u_long -DUSE_SHM -DHAVE_LIBOTCL0_96 -DHAVE_OTCL_H
-DHAVE_LIBTK8_0 -DHAVE_TK_H -DHAVE_LIBTCL8_0 -DHAVE_TCL_H  -O2 -o Tcl.o
Tcl.cc
Tcl.cc: In function `static class TclObject * TclObject::New(const char *,
const char * ...)':
Tcl.cc:848: warning: implicit declaration of function `int
__builtin_va_start(...)'
Tcl.cc:855: warning: implicit declaration of function `int
__builtin_isfloat(...)'
Tcl.cc:855: parse error before `char'
Tcl.cc:855: parse error before `char'
Tcl.cc:855: parse error before `)'
Tcl.cc: In method `int TclObject::Invoke(const char * ...)':
Tcl.cc:907: parse error before `char'
Tcl.cc:907: parse error before `char'
Tcl.cc:907: parse error before `)'
Tcl.cc:909: confused by earlier errors, bailing out
*** Exit 1
Stop.

----------------------------------------------------------------------------

On a x86 solaris box, I get the following errors making ns ...

c++ -c -I. -I/usr/openwin/include  -I/home/tmp3/sagarwal/tclcl-1.0b5 -I/home/tmp3/sagarwal/otcl-1.0a2 -I/home/tmp3/sagarwal/tk8.0/generic -I/home/tmp3/sagarwal/tcl8.0/generic -DNO_TK  -DNDEBUG -DNEED_SUNOS_PROTOS -DUSE_SHM -DHAVE_LIBTCLCL1_0B3 -DHAVE_TCLCL_H -DHAVE_LIBOTCL0_96 -DHAVE_OTCL_H -DHAVE_LIBTK8_0 -DHAVE_TK_H -DHAVE_LIBTCL8_0 -DHAVE_TCL_H -g -o random.o random.cc
cc1plus: warning: -g option not supported for C++ on systems using the DWARF debugging format
In file included from random.h:40,
                 from random.cc:42:
config.h:83: declaration of C function `int gettimeofday(struct timeval * ...)' conflicts with
/usr/include/sys/time.h:263: previous declaration `int gettimeofday(struct timeval *, void *)' here
*** Error code 1
make: Fatal error: Command failed for target `random.o'




after commenting out the offending line in config.h, I get the
following errors, which I dont know how to fix. I have tried getting
rid of -lnsl, but that makes things even worse:



c++ -static  -o ns \
        tclAppInit.o  random.o rng.o ranvar.o misc.o timer-handler.o
        scheduler.o object.o  packet.o ip.o route.o connector.o ttl.o
        trace.o trace-ip.o  classifier.o classifier-addr.o
        classifier-flow.o classifier-hash.o  classifier-mcast.o
        classifier-mpath.o replicator.o  classifier-mac.o  cbr.o
        traffictrace.o pareto.o expoo.o telnet.o tcplib-telnet.o
        agent.o message.o udp.o session-rtp.o rtp.o rtcp.o ivs.o
        tcp.o tcp-sink.o tcp-reno.o tcp-newreno.o  tcp-vegas.o
        tcp-rbp.o tcp-full.o  scoreboard.o tcp-sack1.o tcp-fack.o
        tcp-asym.o tcp-asym-sink.o tcp-fs.o tcp-asym-fs.o  tcp-int.o
        chost.o tcp-session.o nilist.o  integrator.o queue-monitor.o
        flowmon.o loss-monitor.o  queue.o drop-tail.o red.o
        semantic-packetqueue.o semantic-red.o ack-recons.o  sfq.o fq.o
        drr.o cbq.o  hackloss.o errmodel.o  delay.o ll.o snoop.o
        channel.o mac.o mac-csma.o mac-802_11.o mac-multihop.o
        dynalink.o rtProtoDV.o net-interface.o  ctrMcast.o prune.o
        srm.o  sessionhelper.o delaymodel.o srm-ssm.o  srm-topo.o
        lib/int.Vec.o lib/int.RVec.o  lib/dmalloc_support.o
        gen/version.o gen/ns_tcl.o  win32.o
        -L/home/tmp3/sagarwal/tclcl-1.0b5 -ltclcl
        -L/home/tmp3/sagarwal/otcl-1.0a2 -lotcl
        -L/home/tmp3/sagarwal/tk8.0/unix -ltk8.0
        -L/home/tmp3/sagarwal/tcl8.0/unix -ltcl8.0
        -L/usr/openwin/lib -lXext -lX11  -lsocket -lnsl  -lm
	Undefined                       first referenced
	 symbol                             in file
	 dlclose
        /usr/lib/libnsl.a(netdir.o)
	dgettext
        /usr/lib/libnsl.a(netselect.o)
	dlsym
        /home/tmp3/sagarwal/tcl8.0/unix/libtcl8.0.a(tclLoadDl.o)
	dlopen
        /home/tmp3/sagarwal/tcl8.0/unix/libtcl8.0.a(tclLoadDl.o)
	dlerror
        /home/tmp3/sagarwal/tcl8.0/unix/libtcl8.0.a(tclLoadDl.o)
	ld: fatal: Symbol referencing errors. No output written to ns
	*** Error code 1
	make: Fatal error: Command failed for target `ns'
	
--------------------------------------------------------------------------------
on a hpux-10, while making ns

coralsea.CS.Berkeley.EDU: > make
        c++ -c -I. -I/usr/sww/X11R6/include  -I/home/tmp3/sagarwal/tclcl-1.0b5 -
I/home/tmp3/sagarwal/otcl-1.0a2 -I/home/tmp3/sagarwal/tk8.0/generic -I/home/tmp3
/sagarwal/tcl8.0/generic  -DNO_TK  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL1_0B3 -DHAV
E_TCLCL_H -DHAVE_LIBOTCL0_96 -DHAVE_OTCL_H -DHAVE_LIBTK8_0 -DHAVE_TK_H -DHAVE_LI
BTCL8_0 -DHAVE_TCL_H -g -o random.o random.cc
In file included from random.h:40,
                 from random.cc:42:
config.h:50: conflicting types for `typedef signed char int8_t'
/usr/include/sys/_inttypes.h:48: previous declaration as `typedef char int8_t'
In file included from random.h:40,
                 from random.cc:42:
config.h:69: declaration of C function `int gethostid()' conflicts with
/usr/include/sys/unistd.h:350: previous declaration `long int gethostid()' here
config.h:71: declaration of C function `void srandom(int)' conflicts with
/usr/sww/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.7.2.3/include/stdlib.h:265: previous
 declaration `void srandom(unsigned int)' here
*** Error exit code 1

Stop.                  


After fixing it:

Make: Don't know how to make #.  Stop.                                         


After fixing it:

        c++ -static  -o ns \
                tclAppInit.o  random.o rng.o ranvar.o misc.o timer-handler.o  sc
heduler.o object.o  packet.o ip.o route.o connector.o ttl.o  trace.o trace-ip.o
 classifier.o classifier-addr.o classifier-flow.o classifier-hash.o  classifier-
mcast.o classifier-mpath.o replicator.o  classifier-mac.o  cbr.o traffictrace.o
pareto.o expoo.o telnet.o tcplib-telnet.o  agent.o message.o udp.o session-rtp.o
 rtp.o rtcp.o ivs.o  tcp.o tcp-sink.o tcp-reno.o tcp-newreno.o  tcp-vegas.o tcp-
rbp.o tcp-full.o  scoreboard.o tcp-sack1.o tcp-fack.o  tcp-asym.o tcp-asym-sink.
o tcp-fs.o tcp-asym-fs.o  tcp-int.o chost.o tcp-session.o nilist.o  integrator.o
 queue-monitor.o flowmon.o loss-monitor.o  queue.o drop-tail.o red.o  semantic-p
acketqueue.o semantic-red.o ack-recons.o  sfq.o fq.o drr.o cbq.o  hackloss.o err
model.o  delay.o ll.o snoop.o  channel.o mac.o mac-csma.o mac-802_11.o mac-multi
hop.o  dynalink.o rtProtoDV.o net-interface.o  ctrMcast.o prune.o srm.o  session
helper.o delaymodel.o srm-ssm.o  srm-topo.o  lib/int.Vec.o lib/int.RVec.o  lib/d
malloc_support.o  gen/version.o gen/ns_tcl.o  win32.o -L/home/tmp3/sagarwal/tclc
l-1.0b5 -ltclcl -L/home/tmp3/sagarwal/otcl-1.0a2 -lotcl -L/home/tmp3/sagarwal/tk
8.0/unix -ltk8.0 -L/home/tmp3/sagarwal/tcl8.0/unix -ltcl8.0   -L/usr/sww/X11R6/l
ib -lXext -lX11   -lm
collect2: ld returned 1 exit status
/usr/bin/ld: Unsatisfied symbols:
   shl_findsym (code)
   shl_load (code)
*** Error exit code 1

Stop.                                                                          

After removing the -static flag, it builds, but :

coralsea.CS.Berkeley.EDU: > validate
*** ./test-all
tahoe1 tahoe2 tahoe3 tahoe4 no_bug bug reno1 reno renoA reno2 reno3 reno4 reno4a
 reno5 telnet delayed phase phase1 phase2 timers stats
Running test tahoe1
Test output differs from reference output
Diagnose with: diff test-output/tahoe1.test test-output/tahoe1
Differences due to floating-point formatting are not significant.              




and tahoe1.test is an empty file.





Any help is greatly appreciated,
Thanks,
Sharad.