Project

General

Profile

Actions

Bug #1171

closed

GMP-inside-GCC does not configure correctly when invoked from QA server

Added by Pavel Shved about 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
Tests and QA
Start date:
05/05/2011
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

Description

The error it prints is

configure:33935: flex conftest.l
flex: fatal internal error, exec failed
flex: error writing output file lex.yy.c

The error prevents QA tests from actually building the system, and thus blocks all commits into master.

This is a known problem, see how this guy tried to debug it. But it's hard to reproduce.

When we run our configuration tools from our consoles it works.

When I run QA server checking script (actually, a git update hook) from a Bash shell, it works.

When the script is automatically run via a creepy shell gitosis invokes, it fails. Most likely, it's a Python-related issue, since gitosis is implemented in Python (and the guy referenced above also uses Python.)

Actions #1

Updated by Pavel Shved about 13 years ago

Hm, that guy has debugged the problem, and explained it here.

I'll keep thinking how to work it around in our setup.

Actions #2

Updated by Pavel Shved about 13 years ago

A sample script to reproduce:

#!/bin/bash

cat >conftest.l <<_ACEOF
%%
a { ECHO; }
b { REJECT; }
c { yymore (); }
d { yyless (1); }
e { yyless (input () != 0); }
f { unput (yytext[0]); }
. { BEGIN INITIAL; }
%%
#ifdef YYTEXT_POINTER
extern char *yytext;
#endif
int
main (void)
{
        return ! yylex () + ! yywrap ();
}
_ACEOF

trap "" SIGPIPE
M4=dddd flex conftest.l
ls -l lex.yy.c >/dev/null 2>/dev/null || echo "NO FLEX!" 
rm -f lex.yy.c
Actions #3

Updated by Pavel Shved about 13 years ago

We could fix gitosis, but it requires Python3, as the feature to avoid restoring signals was introduced there...

Actions #4

Updated by Pavel Shved about 13 years ago

No, we'll fix what is under our control.

Since Python traps the SIGPIPE signal for its internal purposes, I'll just fix the QA script to invoke compilation in the environment with the restored SIGPIPE handler.

Unfortunately, Bash can't do this. So I'll use Perl:

perl -e '$SIG{"PIPE"} = "DEFAULT"; exec("make");'

Hacks for the win!

Actions #5

Updated by Pavel Shved about 13 years ago

Re-invoked tests from inside python. Let's see if it works...

Actions #6

Updated by Pavel Shved about 13 years ago

  • Status changed from Open to Resolved

Configuration from inside of Python script went well, but let's wait for a couple of commits successfully verified without manual interference before closing this.

Actions #7

Updated by Evgeny Novikov about 13 years ago

Should it be closed?

Actions #8

Updated by Pavel Shved about 13 years ago

  • Status changed from Resolved to Closed

It's been working for several days without any issues; I guess, we may close it now.

Please, do not forget to reset SIGPIPE when you are invoking GCC with GMP installation from within a Python script.

Actions

Also available in: Atom PDF