[ns] Re: Urgent regarding porting of diffusion3 compilation error

Padmaparna Haldar haldar@ISI.EDU
Thu Apr 11 15:05:08 2002


The new directed diffusion implementation is under diffusion3. diffusion 
dir has the older outdated implementation- don't worry about that. also 
a new chapter on directed diffusion has been added to the ns manual that 
talks about this and more.

As for the particular problem you see:
under main subdir, hashutils.hh is included from diffusion.hh. 
[This hashutils file is not used by ns but is kept around as we maintain a 
common code base between ns and the actual test-bed version of diffusion.]
so the include line in diffusion.hh should be ifdef'ed out like this:

#ifdef NS_DIFFUSION
#include <tcl.h>
#include "diffrtg.h"
#else
#include "hashutils.hh"
#endif // NS_DIFFUSION

Hth,
  --Padma

On Thu, 11 Apr 2002, sameer tilak wrote:


> Hi All,
> I am trying to get my ns version updated for the
> drected diffusion port. I downloaded the ns-2 daily
> snapshot for the port and relaced my existing
> ns-2.1b8... directory with this snapshot directory.
> But unfortunately I am having some compilation
> problems. 
> Is the "diffusion" directory obsolete ? the make file
> has referencers to it. Also some files like god.cc
> contain some of the .h files from it eg. in god.cc we
> have,
> #include "diffusion/hash_table.h"
> #include "mobilenode.h"
> If I keep the Make file unmodified then I get the
> following error:
> tclHash.o(.text+0x0): multiple definition of
> `Tcl_InitHashTable'
> diffusion3/main/hashutils.o(.text+0x0): first defined
> here
> /usr/bin/ld: Warning: size of symbol
> `Tcl_InitHashTable' changed from 144 to 159
>  in tclHash.o
> /work/sameer/ns-allinone-2.1b8a/lib/libtcl8.3.a(tclHash.o):
> In function `Tcl_Del
> eteHashEntry':
> tclHash.o(.text+0xa0): multiple definition of
> `Tcl_DeleteHashEntry'
> diffusion3/main/hashutils.o(.text+0x90): first defined
> here
> /usr/bin/ld: Warning: size of symbol
> `Tcl_DeleteHashEntry' changed from 63 to 97
>  in tclHash.o
> /work/sameer/ns-allinone-2.1b8a/lib/libtcl8.3.a(tclHash.o):
> In function `Tcl_Nex
> tHashEntry':
> tclHash.o(.text+0x1b0): multiple definition of
> `Tcl_NextHashEntry'
> diffusion3/main/hashutils.o(.text+0x148): first
> defined here
> /usr/bin/ld: Warning: size of symbol
> `Tcl_NextHashEntry' changed from 58 to 67 i
> n tclHash.o
> collect2: ld returned 1 exit status
> 
> What is the way to get this stuff working ?
> 
> Regards,
> --Sameer Tilak.
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
> 

-- 
------------------------------------------------ 
Be true to your work, your word, and your friend. 
--Thoreau

Padmaparna Haldar