On 01/07/2015 12:35 AM, 鄒明緯 wrote:
> Hi I am a beginner about linux and NS3. I used 32-bit linux system for
> NS3 simulator and there was a bug 1770 when i was compiling mesh.cc.
> I can't understand the explanation on release about bug 1770. Why can I
> lower the optimization
>
> level to -O1 in this case and used as a workaround ? Is there any way tolower the optimization level in NS3?
I will try to look at this more closely today on a gcc-4.8.2 system.
There may be more going on than the segmentation fault identified in bug
1770. In the meantime, here are some options:
- ns-3 supports 'debug' and 'optimized' build profiles. I have only
seen these problems on optimized builds. By default, ns-3 builds in
'debug' mode. Can you try to configure the project in debug mode and
see if you still get a compilation error? If no error, I suggest to use
the debug mode
- if you are not using mesh module, you can remove it from your build.
The brute force way to do so is to simply remove the directory
'src/mesh' altogether. The way to do it by configuration is to use the
'enable-modules' feature described here, taking care to select only the
modules that you want:
http://www.nsnam.org/docs/manual/html/enable-modules.html
- if it is the optimization problem described in bug 1770, then editing
the line in the wscript as I described in the bug report fixed it for
me; specifically, in the line that says
'optimized': [3, 2, 1],
you must change the first '3' into a '1'. Then you need to reconfigure
the project and rebuild it.
If these things do not work, please copy/paste the error that your
compiler is generating into any follow up post that you write.
- Tom