[Swan-dev] error "make check UPDATE=1"

D. Hugh Redelmeier hugh at mimosa.com
Thu Jul 23 07:39:40 EEST 2015


| From: Antony Antony <antony at phenome.org>

| It appears to be caused by permission error, after 44e03f97f200ab8f33f3599a0b1d0d06450795da introduced a check.

It didn't actually introduce a check, it introduced a fudge to recast a 
C-preprocessor conditional (generated by an old version Bison) into one 
that doesn't trigger a warning from newer GCC's.

Old Bison generates a legal and correct C-preprocessor conditional.  In a 
preprocessor expression, a name that isn't a macro evaluates to 0.

GCC is wise in warning when it sees this construct because it is so error 
prone.

Our makefile is wise in telling GCC to treat warnings as fatal.

These three don't go together well.

| cd . && bison -g --verbose -v -d ../../../lib/libipsecconf/$(basename ../../../lib/libipsecconf/parser.y)
| cd . && sed -i 's/if YYENABLE_NLS/if defined YYENABLE_NLS \&\& YYENABLE_NLS/g' parser.tab.c
| sed: couldn't open temporary file ./sedQsryD3: Permission denied

| make[3]: Leaving directory `/source/OBJ.linux.x86_64/lib/libipsecconf'

It looks as if sed is trying to create a temp file in
	/source/OBJ.linux.x86_64/lib/libipsecconf
Or perhaps reopening that file (less likely)

Why would that fail?

It seems unlikely that a file with the same name was created by another 
run since the suffix of the tempfile name is supposed to be randomized.

sed -i could reasonably want to create the updated file in the current
directory and once it succeeds, delete parser.tab.c and rename the
temp file parser.tab.c

Perhaps you could try to replicate this by hand to figure out why it
is going wrong.

BTW, the bison flags --verbose and -v are synonyms so one appears to be 
redundant.

BTW2, the g at the end of the sed s command shouldn't be there but is 
harmless.


More information about the Swan-dev mailing list