Using Eclipse with ns-3-dev

106 views
Skip to first unread message

steve

unread,
Mar 29, 2011, 11:27:06 PM3/29/11
to ns-3-users
I'm trying to stay current with the latest on ns-3-dev and am using
Eclipse.

After updating today, suddenly Eclipse is detecting a failure when
executing "./waf build"...

From the shell command line the process seems to complete normally.

I suspect some change in the shell-level return code for "waf", but
I'm not shell-savvy enough to know what to do about it.

Any ideas?

steve

unread,
Mar 29, 2011, 11:42:09 PM3/29/11
to ns-3-users
Not sure that it matters, but just noticed that Eclipse insists on
appending "-k" to the Build Command entry of "${workspace_loc:/ns-3-
dev}/waf -k". I've tried several times to remove this, but when
reopening the Project Preferences page, Eclipse keeps putting it
back...

Gustavo Carneiro

unread,
Mar 30, 2011, 5:44:48 AM3/30/11
to ns-3-...@googlegroups.com, steve
On Wed, Mar 30, 2011 at 04:42, steve <s.p.e...@gmail.com> wrote:
Not sure that it matters, but just noticed that Eclipse insists on
appending "-k" to the Build Command entry of "${workspace_loc:/ns-3-
dev}/waf -k". I've tried several times to remove this, but when
reopening the Project Preferences page, Eclipse keeps putting it
back...


waf -k doesn't change the return code, at least in my experiments.
 
On Mar 29, 10:27 pm, steve <s.p.emm...@gmail.com> wrote:
> I'm trying to stay current with the latest on ns-3-dev and am using
> Eclipse.
>
> After updating today, suddenly Eclipse is detecting a failure when
> executing "./waf build"...
>
> From the shell command line the process seems to complete normally.
>
> I suspect some change in the shell-level return code for "waf", but
> I'm not shell-savvy enough to know what to do about it.
>

To check, type the command "echo $?" on the shell, right after ./waf build.  If it prints zero, then it's ok.
 
> Any ideas?

No idea.  We didn't even change waf version in ns-3.  I have no clue what's wrong in your setup.  Personally, I haven't tried Eclipse with ns-3 yet.
 
--
Gustavo J. A. M. Carneiro
INESC Porto, UTM, WiN, http://win.inescporto.pt/gjc
"The universe is always one step beyond logic." -- Frank Herbert

Marc Reichelt

unread,
Mar 30, 2011, 9:17:12 AM3/30/11
to ns-3-users
Hi steve,

I am using ns-3-dev with Eclipse since a few weeks now, and until now
most of the things work (only debugging makes problems when setting
breakpoints within ns-3 code, I haven't figured out how to resolve
this). So at least I can tell you that it does not seem to be a
general problem. Your problem sounds odd. Maybe you have a version
control system involved that keeps restoring the old project file?


Regards

Marc Reichelt || http://www.marcreichelt.de/

steve

unread,
Mar 30, 2011, 9:43:33 AM3/30/11
to ns-3-users
Thanks for the responses!

I tried "echo $?" after running './waf build' from the shell and got
"0".

I don't have any other version control software running, but the idea
that there is some Eclipse configuration information from before the
"pull" that is incompatible with the latest code seems intriguing.
Just don't know what that might be. Does anyone know where/how, other
than the process return code, Eclipse looks to see if the build
process was successful?

Just for additional information, here is what the build console
reports inside of Eclipse:

========= BUILD CONSOLE BEGIN ===========

**** Build of configuration Debug for project NS3-dev ****

/Users/semmons/Classes/ns-3-allinone/ns-3-dev/waf -k build
Waf: Entering directory `/Users/semmons/Classes/ns-3-allinone/ns-3-dev/
build'
[1316/1487] cxx: ../scratch/cs5347-udp.cc -> ./debug/scratch/cs5347-
udp_1.o
[1481/1487] cxx_link: ./debug/scratch/cs5347-udp_1.o -> ./debug/
scratch/cs5347-udp
Waf: Leaving directory `/Users/semmons/Classes/ns-3-allinone/ns-3-dev/
build'
'build' finished successfully (3.481s)
Modules to build: ['ns3-core', 'ns3-network', 'ns3-config-store', 'ns3-
internet', 'ns3-propagation', 'ns3-point-to-point', 'ns3-csma', 'ns3-
emu', 'ns3-bridge', 'ns3-tap-bridge', 'ns3-virtual-net-device', 'ns3-
applications', 'ns3-nix-vector-routing', 'ns3-olsr', 'ns3-aodv', 'ns3-
dsdv', 'ns3-click', 'ns3-openflow', 'ns3-mobility', 'ns3-wifi', 'ns3-
netanim', 'ns3-stats', 'ns3-uan', 'ns3-spectrum', 'ns3-mesh', 'ns3-
test', 'ns3-ns3tcp', 'ns3-ns3wifi', 'ns3-flow-monitor', 'ns3-wimax',
'ns3-lte', 'ns3-mpi', 'ns3-topology-read', 'ns3-energy', 'ns3-tools',
'ns3-visualizer']

========= BUILD CONSOLE END ===========

And this is the "Problem" that Eclipse reports afterward:

Description: ['ns3-core', 'ns3-network', 'ns3-config-store', 'ns3-
internet', 'ns3-propagation', 'ns3-point-to-point', 'ns3-csma', 'ns3-
emu', 'ns3-bridge', 'ns3-tap-bridge', 'ns3-virtual-net-device', 'ns3-
applications', 'ns3-nix-vector-routing', 'ns3-olsr', 'ns3-aodv', 'ns3-
dsdv', 'ns3-click', 'ns3-openflow', 'ns3-mobility', 'ns3-wifi', 'ns3-
netanim', 'ns3-stats', 'ns3-uan', 'ns3-spectrum', 'ns3-mesh', 'ns3-
test', 'ns3-ns3tcp', 'ns3-ns3wifi', 'ns3-flow-monitor', 'ns3-wimax',
'ns3-lte', 'ns3-mpi', 'ns3-topology-read', 'ns3-energy', 'ns3-tools',
'ns3-visualizer']

Location: line 0

Type: C/C++ Problem

The fact that the description is the Python list of modules seems odd.
Not sure where it would be getting that...

Gustavo Carneiro

unread,
Mar 30, 2011, 9:52:09 AM3/30/11
to ns-3-...@googlegroups.com, steve
Could it be wscript line 588:

        print "Modules to build:", modules

It could be that Eclipse parses the build command stdout and some text triggers a build failure perception?
 
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.

steve

unread,
Mar 30, 2011, 10:25:03 AM3/30/11
to ns-3-users
That was it!

I commented out the "print" statement and everything works.

Should I try to push this as fix or should I except an official "dev"
person to do that? Maybe I need to submit a bug?

On Mar 30, 8:52 am, Gustavo Carneiro <gjcarne...@gmail.com> wrote:
> INESC Porto, UTM, WiN,http://win.inescporto.pt/gjc

Gustavo Carneiro

unread,
Mar 30, 2011, 10:31:48 AM3/30/11
to ns-3-...@googlegroups.com, steve
On Wed, Mar 30, 2011 at 15:25, steve <s.p.e...@gmail.com> wrote:
That was it!

I commented out the "print" statement and everything works.

Should I try to push this as fix or should I except an official "dev"
person to do that? Maybe I need to submit a bug?

That print I think should be removed eventually, but it worries me that Eclipse is so stupid.  Can you check if _anything_ printed to stdout causes this problem, or is it just some text pattern that triggers it?
INESC Porto, UTM, WiN, http://win.inescporto.pt/gjc

steve

unread,
Mar 30, 2011, 11:26:10 AM3/30/11
to ns-3-users
I'm not above assuming that Eclipse is being stupid :) but in this
case, it seems to be a bit more complicated than that.

Per your suggestion, I have tried to replace -- print "Modules to
build:", modules -- with some other combinations that seem to work
okay. These work...

print "TEST"
print "['TEST']"
print env['NS3_ENABLED_MODULES']
print modules
print "Modules to build:" + ",".join(modules)

I don't know Python well enough to know how this statement differs --
print "Modules to build:", modules -- but just printing to the console
is clearly not a problem...

On Mar 30, 9:31 am, Gustavo Carneiro <gjcarne...@gmail.com> wrote:

SPM

unread,
Aug 9, 2013, 6:06:13 AM8/9/13
to ns-3-...@googlegroups.com, webma...@marcreichelt.de
Hi,

Were you able to solve "debugging makes problems when setting breakpoints within ns-3 code". I am also facing the same issue.
Will be greatfull to receive any comments on it.

Thanks
SPM
Reply all
Reply to author
Forward
0 new messages