Bug#1026503: libembperl-perl: FTBFS: Expected 6 more error(s) in logfile, tagging 1026503

Axel Beckert abe at debian.org
Sun Jan 22 22:30:53 GMT 2023


Control: tag -1 + pending patch

Hi again.

Axel Beckert wrote:
> Axel Beckert wrote:
> > > Expected 6 more error(s) in logfile
[…]
> I looked a bit deeper into it, but didn't yet understand the issue
> fully yet.
> 
> Not forgotten, but I will only continue on it in the next days, […]

This took me quite a few hours to figure out. Not sure what exactly
changed in Debian Sid/Bookworm, but it might be even kernel or gcc
related.

The cause was intercepting STDERR into a file and reading from it
while the writing file handle is still open for the purpose analyzing
STDERR's content.

The relevant hint was this one in "perldoc -f seek":

  Due to the rules and rigors of ANSI C, on some systems you have
  to do a seek whenever you switch between reading and writing.
  Amongst other things, this may have the effect of calling
  stdio's clearerr(3). A WHENCE of 1 ("SEEK_CUR") is useful for
  not moving the file position:

      seek($fh, 0, 1);

So adding a "seek(ERR, 0, 1);" before "while (<ERR>) {" in test.pl
fixes the issue and doesn't open any new one.

Will upload soon. Will first need to clean up all the printf debug
mess I added to many places in test.pl. :-)

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



More information about the pkg-perl-maintainers mailing list