Kenner, please could try to replace
sb->setbuf(bbuuff, 5120);
with
sb->pubsetbuf(bbuuff, 5120);
and report what happens?
That does it. Thanks.
There really should be some web page capturing all this and giving
the versions of tools that are needed.