|
Bugzilla – Full Text Bug Listing |
| Summary: | waf output to stderr | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | TimoB <timo.bingmann> |
| Component: | build system | Assignee: | Gustavo J. A. M. Carneiro <gjcarneiro> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ns-bugs, tomh |
| Priority: | P4 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | patch | ||
|
Description
TimoB
2009-01-19 09:43:05 UTC
Hi. I am neutral on this. But if you really care about it you have to convince upstream WAF maintainer: http://code.google.com/p/waf/issues/list Anyway, it's trivial to redirect everything, just: ./waf --run scratch/program >& save.log Or, if you do not want to use bash extensions: ./waf --run scratch/program > save.log 2>&1 Yes, sure you can redirect stderr. However my issue is a different one: the scratch program outputs debug traces, gnuplot data or whatever on stdout. But waf also outputs to stdout, so the output gets mixed. And gnuplot does not like [ 1/251] cxx: scratch/three-nodes-capture-border.cc -> build/debug/scratch/three-nodes-capture-border_8.o [251/251] cxx_link: build/debug/scratch/three-nodes-capture-border_8.o -> build/debug/scratch/three-nodes-capture-border in it's data files. Yes, I could just write a file directly, but it's easier to use std::cout. Keep in mind you still have ./waf --shell, then you can run your programs manually without waf interference. That's how I do it currently. But ./waf --run also recompiles if necessary. Created attachment 360 [details]
patch
I think this patch takes care of it.
(In reply to comment #6) > Created an attachment (id=360) [details] > patch > > I think this patch takes care of it. > this works for me, +1 This was fixed in upstream WAF. I'll merge in about a week, when WAF 1.5.3 gets released. Works ok, only kills color if stdout is redirected. Probably some terminal detection code. The upstream changes also fix that issue. changeset: 4132:6f24531bb23e |