Boost logo

Boost Users :

Subject: Re: [Boost-users] read_graphviz in 1.4x series
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-01-15 05:32:36


On Thu, 14 Jan 2010, Cyrus Hall wrote:

> On Thu, 2010-01-14 at 18:07 +0100, Jeremiah Willcock wrote:
>> On Thu, 14 Jan 2010, Cyrus Hall wrote:
>>> After upgrading from boost 1.38 to 1.40 in Ubuntu, read_graphviz now
>>> prints to std::cerr the graph it has just read. I downloaded to the
>>> source code to make sure this wasn't some cruft left over by the Ubuntu
>>> package managers, and it seems these print statements are in the main
>>> distribution package. This change seems to correspond with a complete
>>> rewrite of the scanning and parsing underlying read_graphviz, which
>>> seems to have happened between 1.39 and 1.40. 1.41 contains no changes
>>> from 1.40 in read_graphviz_new.cpp.
>>>
>>> Is there someway I can get read of this
>>> debugging output?
>>
>> Thank you for the bug report. This is now fixed in r59005; I will try to
>> get it pushed into 1.42.0.
>
> Thanks Jeremiah. As a temporary fix I redirected std::cerr during the
> read. I then restore it after completion:
>
> std::ofstream dnull("/dev/null", std::ios::out);
> std::streambuf *orig = std::cerr.rdbuf(dnull.rdbuf());
>
> read_graphviz<digraph>(*instrm, g, dp);
>
> std::cerr.rdbuf(orig)
>
> Hopefully that helps others until 1.42 is out.

The easiest way is to just comment out the lines that do the printout (in
libs/graph/src/read_graphviz_new.cpp); that is what the change in 1.42
does.

-- Jeremiah Willcock


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net