Bug 1244 - Seg Faults in optimized builds due to missing Logging components
Seg Faults in optimized builds due to missing Logging components
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: core
pre-release
All All
: P5 blocker
Assigned To: Mathieu Lacage
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-11 05:54 UTC by John Abraham
Modified: 2011-08-11 08:44 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Abraham 2011-08-11 05:54:33 UTC
For example:

Launch /home/john/buildslave/full-ub64-11-g++-4.5.2/build/build/optimized/src/wimax/examples/wimax-simple
Synchronously execute /home/john/buildslave/full-ub64-11-g++-4.5.2/build/build/optimized/src/wimax/examples/wimax-simple
PASS: Example /home/john/buildslave/full-ub64-11-g++-4.5.2/build/build/optimized/src/mesh/examples/mesh
Return code =  139
stderr =  msg="Logging component "UdpClient" not found. See above for a list of available log components", file=../src/core/model/log.cc, line=280
Segmentation fault

Moving functions such as LogComponentEnable/All/Disable/DisableAll under "NS3_LOG_ENABLE" fixes it.
Comment 1 Mathieu Lacage 2011-08-11 08:44:10 UTC
NS3_LOG_ENABLE is not a property of how you build the ns-3 core. It is a property of how you build the user code that links against it. i.e., it controls whether or not the user code uses the builtin logging facility, not whether or not the logging facility is compiled in.

So, a more useful fix in this case is to make NS_LOG_COMPONENT_DEFINE be defined correctly unconditionally and move it out of the NS3_LOG_ENABLE ifdef.

changeset: dec79131f5f8