Bugzilla – Bug 142
ns-3.0.11 fails to build with gcc 3.4
Last modified: 2008-07-01 13:32:23 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).
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?
PS: if gcc 3.4 is officially supported, is there any chance of adding a gcc 3.4 build to the build bots?... ;-)
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.
But maybe adding a gcc-3.4 build bot sooner rather than later will "encourage" Mathieu to fix it?... just an idea... :-)
*** Bug 128 has been marked as a duplicate of this bug. ***
Bug fixed on ns-3-param branch to be merged soon. tested on ubuntu 7.10 64 bit g++ 3.4