Bug 1130 - '-fpermissive' should be added to CFLAGS while configuring ns-3.7
'-fpermissive' should be added to CFLAGS while configuring ns-3.7
Status: RESOLVED WONTFIX
Product: ns-3
Classification: Unclassified
Component: mesh
ns-3.7
PC Linux
: P5 normal
Assigned To: Kirill Andreev
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-07 07:02 UTC by Utkarsh Upadhyay
Modified: 2011-08-09 16:17 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Utkarsh Upadhyay 2011-05-07 07:02:45 UTC
It fails with the following error:

../src/devices/mesh/mesh-wifi-interface-mac.cc:695:37: error: cannot call constructor 'ns3::MeshWifiInterfaceMac::Statistics::Statistics' directly
../src/devices/mesh/mesh-wifi-interface-mac.cc:695:37: error:   for a function-style cast, remove the redundant '::Statistics'

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

System info:

~/repos/ns-3-allinone/ns-3.7$ gcc --version
gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2

~/repos/ns-3-allinone/ns-3.7$ uname -a
Linux Arrakis 2.6.38-9-generic #43-Ubuntu SMP Thu Apr 28 15:25:15 UTC 2011 i686 i686 i386 GNU/Linux


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

Also, I am not sure whether it fits with 'mesh' module, or in the 'general' category. I am supposing this is an issue with gcc versions, which will probably apply to the whole package.

~
musically_ut
Comment 1 Utkarsh Upadhyay 2011-05-11 06:16:52 UTC
The compiler errors goes away if '-fpermissive' is passed in CXXFLAGS to waf.
This is a compiler version issue.
Comment 2 Kirill Andreev 2011-05-17 03:27:28 UTC
Which build has failed (debug, optimized, release), and could you send me what ./waf configure has shown?
Comment 3 Utkarsh Upadhyay 2011-05-17 03:42:13 UTC
(In reply to comment #2)
> Which build has failed (debug, optimized, release), and could you send me what
> ./waf configure has shown?

It was the release build (I think), obtained by:

$ ./download.py -n ns-3.7

Also,

$ ./waf configure
Checking for program g++,c++             : ok /usr/bin/g++ 
Checking for program cpp                 : ok /usr/bin/cpp 
Checking for program ar                  : ok /usr/bin/ar 
Checking for program ranlib              : ok /usr/bin/ranlib 
Checking for g++                         : ok  

...

---- Summary of optional NS-3 features:
Threading Primitives          : enabled
Real Time Simulator           : enabled
Emulated Net Device           : enabled
Tap Bridge                    : enabled
GtkConfigStore                : not enabled (library 'gtk+-2.0 >= 2.12' not found)
XmlIo                         : enabled
SQlite stats data output      : not enabled (library 'sqlite3' not found)
Network Simulation Cradle     : enabled
Python Bindings               : not enabled (PyBindGen version not correct and newer version could not be retrieved)
Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)
Build examples and samples    : enabled
Static build                  : not enabled (option --enable-static not selected)
GNU Scientific Library (GSL)  : not enabled (GSL not found)
'configure' finished successfully (6.758s)

------

Hope that helps. Should I paste the entire summary here?

~
Utkarsh.
Comment 4 Kirill Andreev 2011-06-02 11:55:21 UTC
Did you try ns-3.11 (or 3.10, where there is no modular build)? If it works, I will close this bug. I have seen that you use ns-3.7 just now
Comment 5 Utkarsh Upadhyay 2011-06-02 12:04:04 UTC
The other versions compile without this problem. 
I think this bug can be closed safely if '-fpermissive' is added to CFLAGS while configuring ns-3.7.
Comment 6 Tom Henderson 2011-08-09 16:17:45 UTC
closing as we no longer support ns-3.7