Bug 1292 - Strange linker behavior on Ubuntu 11.10
Strange linker behavior on Ubuntu 11.10
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: build system
ns-3-dev
PC Linux
: P5 critical
Assigned To: Gustavo J. A. M. Carneiro
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-14 17:06 UTC by Alex Afanasyev
Modified: 2011-11-17 13:11 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-11-14 17:06:45 UTC
On Ubuntu 11.10 the linker be default includes --as-needed flag. As a result, all applications that include a dynamic object instantiation from a library, but don't directly use the library (e.g., running simulation with --vis flag) fail to work.

The following patch adds -Wl,--no-as-needed flag to gcc compiler: 
https://bitbucket.org/cawka/ns-3-dev/changeset/c5bde697240d
Comment 1 Mathieu Lacage 2011-11-17 09:47:39 UTC
gustavo, can you review this patch ? If it is ok with you, feel free to push.
Comment 2 Gustavo J. A. M. Carneiro 2011-11-17 09:59:09 UTC
This sounds great in principle, but I haven't tested yet.  It probably also fixes all those visualizer problems people have been having...
Comment 3 Alex Afanasyev 2011-11-17 11:51:08 UTC
Yes. Problems with the visualizer was the reason to investigate the problem
Comment 4 Gustavo J. A. M. Carneiro 2011-11-17 13:11:58 UTC
Pushed it.  Thank you for the patch.