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

Re: problem building ns on solaris



> I have been able to compile all the modules in ns-allinone-2.1b5 on
> solaris, but the linking stage fails with the errors attached below.
> Can you please help?

I think that this is more related to the way you use your compiler than
anything related to ns. It seems that you are using old g++ libraries
(from gcc 2.7.1) which are clashing with (what I guess are) newer
libraries. I would guess that this functionality has been moved from the
old libstdc++.a to libgcc.a in newer versions.

My guess would be that the library files libstdc++.a and libgcc.a are
linked by default. The compiler uses the search path specified in
LIBRARY_PATH to determine how to find these files. I would suspect that
yours is configured as such that the libstdc++.a file is found in
/usr/local/lib before the one that should be found (I'd guess that this
should be in 
/sw/packages/cygnus/progressive-98r1-v0/H-sparc-sun-solaris2.6/bin/../lib/gcc-lib/sparc-sun-solaris2.6/2.9-cisco-98r1)
So you could set the environment variable LIBRARY_PATH to
/sw/packages/cygnus/progressive-98r1-v0/H-sparc-sun-solaris2.6/bin/../lib/gcc-lib/sparc-sun-solaris2.6/2.9-cisco-98r1):/usr/local/lib
and this might work, but if you're using a newer version of gcc/g++ than
2.7.1, I think it's probably bad to have the library for 2.7.1 in
/usr/local/lib.

I would guess that this problem manifests itself whenever you try to
compile anything in c++, and it's really one for your tech support people
rather than ns-users.

My 0.02p (worth much more than $0.02 :-).
Sean.

> g++  -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-hash.o classifier-virtual.o classifier-mcast.o classifier-mpath.o replicator.o classifier-mac.o app.o telnet.o tcplib-telnet.o trafgen.o traffictrace.o pareto.o expoo.o cbr_traffic.o tbf.o resv.o sa.o saack.o measuremod.o estimator.o adc.o ms-adc.o timewindow-est.o acto-adc.o pointsample-est.o salink.o actp-adc.o hb-adc.o expavg-est.o param-adc.o null-estimator.o adaptive-receiver.o vatrcvr.o consrcvr.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 simple-intserv-sched.o red.o semantic-packetqueue.o semant!
ic!
> !
> -red.o ack-recons.o sfq.o fq.o drr.o cbq.o hackloss.o errmodel.o delay.o snoop.o dynalink.o rtProtoDV.o net-interface.o ctrMcast.o mcast_ctrl.o srm.o sessionhelper.o delaymodel.o srm-ssm.o srm-topo.o mftp.o mftp_snd.o mftp_rcv.o codeword.o alloc-address.o address.o lib/int.Vec.o lib/int.RVec.o lib/dmalloc_support.o webcache/http.o webcache/tcp-simple.o webcache/pagepool.o webcache/inval-agent.o webcache/tcpapp.o webcache/http-aux.o lanRouter.o tfcc.o filter.o pkt-counter.o Decapsulator.o Encapsulator.o channel.o mac.o ll.o mac-802_11.o mac-802_3.o mip.o mip-reg.o propagation.o tworayground.o antenna.o omni-antenna.o bi-connector.o node.o mobilenode.o arp.o god.o dem.o topography.o modulation.o priqueue.o phy.o wired-phy.o wireless-phy.o mac-timers.o cmu-trace.o varp.o dsdv/dsdv.o dsdv/rtable.o dsr/dsragent.o dsr/hdr_sr.o dsr/mobicache.o dsr/path.o dsr/requesttable.o dsr/routecache.o ns-process.o  gen/version.o gen/ns_tcl.o gen/ptypes.o  win32.o -R/usr/local/lib -L/usr/local/!
li!
> !
> b -ltcldbg -R../tclcl-1.0b8 -L../tclcl-1.0b8 -ltclcl -R../otcl-1.0a4 -L../otcl-1.0a4 -lotcl -R../tkbox/lib -L../tkbox/lib -ltk8.0 -R../tclbox/lib -L../tclbox/lib -ltcl8.0 -lXext -lX11 -lsocket -lnsl -lintl -ldl -ldl -lm -ldl 
> /sw/packages/cygnus/progressive-98r1-v0/H-sparc-sun-solaris2.6/bin/../lib/gcc-lib/sparc-sun-solaris2.6/2.9-cisco-98r1/libgcc.a(exception.o): In function `bad_cast type_info function':
> /mrhankey/danger/build/cisco/sparc-sun-solaris2.6/src/gcc/cp/exception.cc(.text+0x0): multiple definition of `terminate(void)'
> /usr/local/lib/libstdc++.a(exceptioni.o):/export/local.Solaris/src/libg++-2.7.1/libstdc++/exceptioni.cc:70: first defined here
> /sw/packages/cygnus/progressive-98r1-v0/H-sparc-sun-solaris2.6/bin/../lib/gcc-lib/sparc-sun-solaris2.6/2.9-cisco-98r1/libgcc.a(exception.o): In function `__default_unexpected(void)':
> /mrhankey/danger/build/cisco/sparc-sun-solaris2.6/src/gcc/cp/exception.cc(.text+0x2c): multiple definition of `__default_unexpected(void)'
> /usr/local/lib/libstdc++.a(exceptioni.o):/export/local.Solaris/src/libg++-2.7.1/libstdc++/exceptioni.cc:43: first defined here
> /sw/packages/cygnus/progressive-98r1-v0/H-sparc-sun-solaris2.6/bin/../lib/gcc-lib/sparc-sun-solaris2.6/2.9-cisco-98r1/libgcc.a(exception.o): In function `set_terminate(void (*)(void))':
> /mrhankey/danger/build/cisco/sparc-sun-solaris2.6/src/gcc/cp/exception.cc(.text+0x38): multiple definition of `set_terminate(void (*)(void))'
> /usr/local/lib/libstdc++.a(exceptioni.o):/export/local.Solaris/src/libg++-2.7.1/libstdc++/exceptioni.cc:53: first defined here
> /sw/packages/cygnus/progressive-98r1-v0/H-sparc-sun-solaris2.6/bin/../lib/gcc-lib/sparc-sun-solaris2.6/2.9-cisco-98r1/libgcc.a(exception.o): In function `set_unexpected(void (*)(void))':
> /mrhankey/danger/build/cisco/sparc-sun-solaris2.6/src/gcc/cp/exception.cc(.text+0x68): multiple definition of `set_unexpected(void (*)(void))'
> /usr/local/lib/libstdc++.a(exceptioni.o):/export/local.Solaris/src/libg++-2.7.1/libstdc++/exceptioni.cc:62: first defined here
> /sw/packages/cygnus/progressive-98r1-v0/H-sparc-sun-solaris2.6/bin/../lib/gcc-lib/sparc-sun-solaris2.6/2.9-cisco-98r1/libgcc.a(exception.o): In function `unexpected(void)':
> /mrhankey/danger/build/cisco/sparc-sun-solaris2.6/src/gcc/cp/exception.cc(.text+0x98): multiple definition of `unexpected(void)'
> /usr/local/lib/libstdc++.a(exceptioni.o):/export/local.Solaris/src/libg++-2.7.1/libstdc++/exceptioni.cc:76: first defined here
> collect2: ld returned 1 exit status
> make: *** [ns] Error 1
> Ns make failed! Exiting ...
> 


-----
Sean Murphy,			Email: [email protected]
Teltec Ireland,			Phone: +353-1-7045080
DCU, Dublin 9,			Fax:   +353-1-7045092
Ireland.