Bug 1272 - ./waf configure fails to detect librt properly on Ubuntu 11.04 / RealtimeSimulatorImpl cannot be compiled
./waf configure fails to detect librt properly on Ubuntu 11.04 / RealtimeSimu...
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: core
ns-3-dev
All Linux
: P5 major
Assigned To: Mathieu Lacage
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-28 14:37 UTC by Alex Afanasyev
Modified: 2011-11-17 09:45 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 Alex Afanasyev 2011-09-28 14:37:45 UTC
On Ubuntu 11.04 librt requires libpthread.  As a result, when ./waf tries to check whether librt present, it fails with unresolved pthread symbols.  

The following solves the problem:

line 87 in src/core/wscript
- if not conf.check(lib='rt', uselib='RT', define_name='HAVE_RT'):
+ if not conf.check(lib='rt', uselib='RT, PTHREAD', define_name='HAVE_RT')
Comment 1 Alex Afanasyev 2011-11-14 17:01:30 UTC
Please, apply patch from:  https://bitbucket.org/cawka/ns-3-dev/changeset/397dbb7cfa2f
Comment 2 Mathieu Lacage 2011-11-17 09:45:15 UTC
pushed changeset 397dbb7cfa2f

Please, make sure you commit fixes for separate problems in separate changesets next time.