Bug 1292

Summary: Strange linker behavior on Ubuntu 11.10
Product: ns-3 Reporter: Alex Afanasyev <alexander.afanasyev>
Component: build systemAssignee: Gustavo J. A. M. Carneiro <gjcarneiro>
Status: RESOLVED FIXED    
Severity: critical CC: gjcarneiro, ns-bugs
Priority: P5    
Version: ns-3-dev   
Hardware: PC   
OS: Linux   

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.