[R-pkg-devel] Catching console messages from libGL

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Mon Feb 17 22:10:48 CET 2020


On Mon, 17 Feb 2020 14:56:31 -0500
Duncan Murdoch <murdoch.duncan using gmail.com> wrote:

> So how do I capture stderr (or, off topic here, how do I get libGL to
> be quiet)?

libGL seems to only offer bad news in this regard: it writes directly
to stderr [1] and does not seem to offer a way to silence the
_LOADER_FATAL messages [2], which "failed to load driver: %s" are.

(You have found that out while I was preparing the message.)

As far as I understand do_sink(), it does not touch the actual stdout
or stderr, only R's wrappers of them. You probably know better than me
how portable would it be to try to reassign stderr (which the standard
says is a macro) to open_memstream() (which is POSIX.1-2008 only).

-- 
Best regards,
Ivan

[1]
https://sources.debian.org/src/mesa/19.3.3-1/src/glx/dri_common.c/#L52

[2]
https://sources.debian.org/src/mesa/19.3.3-1/src/glx/dri_common.h/#L70



More information about the R-package-devel mailing list