[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

potential race condition in ncurses build

From: Peter
Subject: potential race condition in ncurses build
Date: Mon, 25 May 2009 08:30:25 -0400
User-agent: Thunderbird (X11/20090302)

I'm not sure if anyone is interested in this, so I'm sending a copy to both address@hidden and to the slackware maintainers.

In my first attempt to build ncurses 5.7 under slackware 12.2 on a P4 CPU (hyper-threading is off), I used a slightly modified slackware-current ncurses.SlackBuild script (added i686 arch and changed package extension to tgz) and I got the following:

make[1]: Leaving directory `/tmp/ncurses-5.7/ncurses'
cd progs && make DESTDIR="" all
make[1]: Entering directory `/tmp/ncurses-5.7/progs'
sh ./MKtermsort.sh gawk ./../include/Caps >termsort.c
echo "#ifndef __TRANSFORM_H"                                  >transform.h
echo "#define __TRANSFORM_H 1"                                        
echo "#include <progs.priv.h>"                                  >>transform.h
echo "extern bool same_program(const char *, const char *);"  >>transform.h
sh -c 'if test -n "" ; then echo "#define SUFFIX_IGNORED \"\"">>transform.h; fi' echo "#define PROG_CAPTOINFO \"`echo captoinfo| sed 's/$//'|sed 's,$,,;s,^,,'|sed 's/$//'`\"" >>transform.h gcc -I../progs -I. -DHAVE_CONFIG_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -I. -I../include -O2 -march=i686 -mtune=i686 --param max-inline-insns-single=1200 -fPIC -c ../progs/transform.c -o ../obj_s/transform.o gcc -I../progs -I. -DHAVE_CONFIG_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -I. -I../include -O2 -march=i686 -mtune=i686 --param max-inline-insns-single=1200 -fPIC -c ../progs/infocmp.c -o ../obj_s/infocmp.o echo "#define PROG_INFOTOCAP \"`echo infotocap| sed 's/$//'|sed 's,$,,;s,^,,'|sed 's/$//'`\"" >>transform.h echo "#define PROG_RESET \"`echo reset| sed 's/$//'|sed 's,$,,;s,^,,'|sed 's/$//'`\"" >>transform.h
In file included from ../progs/transform.c:35:
../progs/transform.h:1:1: error: unterminated #ifndef
make[1]: *** [../obj_s/transform.o] Error 1
make[1]: *** Waiting for unfinished jobs....
echo "#define PROG_INIT \"`echo init| sed 's/$//'|sed 's,$,,;s,^,,'|sed 's/$//'`\"" >>transform.h
echo "#endif /* __TRANSFORM_H */"                             >>transform.h
make[1]: Leaving directory `/tmp/ncurses-5.7/progs'
make: *** [all] Error 2

The slackware-current ncurses.SlackBuild script uses a -j4 option with make, which I believe causes the above apparent race condition. My workaround was to remove the -j4 option in each make invocation, but maybe there's a better solution.

Peter Santoro

reply via email to

[Prev in Thread] Current Thread [Next in Thread]