Bug 142

Summary: ns-3.0.11 fails to build with gcc 3.4
Product: ns-3 Reporter: Gustavo J. A. M. Carneiro <gjcarneiro>
Component: coreAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: tomh
Priority: P3    
Version: pre-release   
Hardware: All   
OS: All   

Description Gustavo J. A. M. Carneiro 2008-02-18 12:31:57 UTC
C:\Documents and Settings\gjc\ns-3.0.11>waf
Entering directory `C:\DOCUME~1\gjc\ns-3.0.11/build'
[138/410] * cpp : src\core\object.cc -> build\debug\src\core\object.os
In file included from ..\src\core\object.cc:21:
..\src\core\object.h:297: error: got 1 template parameters for `ns3::TypeId ns3:
:TypeId::AddConstructor()'
..\src\core\object.h:297: error:   but 6 required
..\src\core\object.h:310: error: redefinition of `ns3::TypeId ns3::TypeId::AddCo
nstructor()'
..\src\core\object.h:297: error: `ns3::TypeId ns3::TypeId::AddConstructor()' pre
viously declared here
..\src\core\object.h:310: error: got 2 template parameters for `ns3::TypeId ns3:
:TypeId::AddConstructor()'
..\src\core\object.h:310: error:   but 6 required
..\src\core\object.h:323: error: redefinition of `ns3::TypeId ns3::TypeId::AddCo
nstructor()'
..\src\core\object.h:297: error: `ns3::TypeId ns3::TypeId::AddConstructor()' pre
viously declared here
..\src\core\object.h:323: error: got 3 template parameters for `ns3::TypeId ns3:
:TypeId::AddConstructor()'
..\src\core\object.h:323: error:   but 6 required
..\src\core\object.h:336: error: redefinition of `ns3::TypeId ns3::TypeId::AddCo
nstructor()'
..\src\core\object.h:297: error: `ns3::TypeId ns3::TypeId::AddConstructor()' pre
viously declared here
..\src\core\object.h:336: error: got 4 template parameters for `ns3::TypeId ns3:
:TypeId::AddConstructor()'
..\src\core\object.h:336: error:   but 6 required
..\src\core\object.h:349: error: redefinition of `ns3::TypeId ns3::TypeId::AddCo
nstructor()'
..\src\core\object.h:297: error: `ns3::TypeId ns3::TypeId::AddConstructor()' pre
viously declared here
..\src\core\object.h:349: error: got 5 template parameters for `ns3::TypeId ns3:
:TypeId::AddConstructor()'
..\src\core\object.h:349: error:   but 6 required
..\src\core\object.h:362: error: redefinition of `ns3::TypeId ns3::TypeId::AddCo
nstructor()'
..\src\core\object.h:297: error: `ns3::TypeId ns3::TypeId::AddConstructor()' pre
viously declared here
Build failed
 -> task failed (err #129): [<b:C:\DOCUME~1\gjc\ns-3.0.11\src\core\object.os>]

g++ version is 3.4.5 (current mingw).
Comment 1 Gustavo J. A. M. Carneiro 2008-02-18 12:34:03 UTC
CXX=/usr/bin/g++-3.4 ./waf configure && ./waf build

Was able to reproduce in Linux, with g++ 3.4.  Same error.  Is g++ 3.4 officially supported by NS-3?
Comment 2 Gustavo J. A. M. Carneiro 2008-02-18 12:38:06 UTC
PS: if gcc 3.4 is officially supported, is there any chance of adding a gcc 3.4 build to the build bots?... ;-)
Comment 3 Tom Henderson 2008-02-18 12:45:06 UTC
Yes, I showed this to Mathieu a week or two ago; apparently not a trivial fix.  Sorry for not filing a bug.

yes, we can add gcc-3.4 to the build bots once this is fixed.
Comment 4 Gustavo J. A. M. Carneiro 2008-02-18 12:53:29 UTC
But maybe adding a gcc-3.4 build bot sooner rather than later will "encourage" Mathieu to fix it?... just an idea... :-)
Comment 5 Tom Henderson 2008-02-27 00:38:04 UTC
*** Bug 128 has been marked as a duplicate of this bug. ***
Comment 6 Mathieu Lacage 2008-03-14 13:09:39 UTC
Bug fixed on ns-3-param branch to be merged soon.

tested on ubuntu 7.10 64 bit g++ 3.4