[Pkg-electronics-devel] Bug#1106399: libmawk: FTBFS when built in parallel

Santiago Vila sanvila at debian.org
Sat May 24 12:59:24 BST 2025


Package: src:libmawk
Version: 1.0.4-3
Severity: serious
Tags: ftbfs trixie sid patch

Dear maintainer:

During a rebuild of all packages in unstable, your package failed to build:

cd zfifo && make
make[5]: Entering directory '/<<PKGBUILDDIR>>/src/libmawk/regression/zfifo'
cp ../../zfifo.c .
cp ../../zfifo.c .
cp ../../zfifo.h .
cp ../../zfifo.h .
cp: cannot create regular file './zfifo.h': File exists
make[5]: *** [Makefile:11: zfifo.c] Error 1
make[5]: Leaving directory '/<<PKGBUILDDIR>>/src/libmawk/regression/zfifo'
make[4]: *** [Makefile:55: zfifo/zfifo_test] Error 2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/src/libmawk/regression'
make[3]: *** [Makefile:118: test] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>/src/libmawk'
make[2]: *** [Makefile:7: test] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/src'
make[1]: *** [Makefile:22: test] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_test: error: make -j2 test "TESTSUITEFLAGS=-j2 --verbose" VERBOSE=1 returned exit code 2
make: *** [debian/rules:9: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2


Looks like a race condition where one make thread tries to create zfifo.c and another
make thread tries to create zfifo.h at the same time.

I'm not sure about the "file exists" error. Maybe it happens because the file zfifo.h is still
open by the first thread when the other tries to copy the same file.

I agree this is odd, because the package has not changed in a long time,
but I'm currently doing archive rebuilds with Intel machines (a little bit faster)
and I was able to reproduce this several times in a row (I can offer a VM to test
if you need it).

To fix this, I propose just splitting the target in two, one for zfifo.c and one for zfifo.h,
as in the attached patch.

Thanks.
-------------- next part --------------
--- a/src/libmawk/regression/zfifo/Makefile
+++ b/src/libmawk/regression/zfifo/Makefile
@@ -7,8 +7,10 @@ all: zfifo_test
 zfifo_test: $(OBJS)
 	$(CC) $(OBJS) -o $@
 
-zfifo.c zfifo.h: ../../zfifo.c ../../zfifo.h
+zfifo.c: ../../zfifo.c
 	cp ../../zfifo.c .
+
+zfifo.h: ../../zfifo.h
 	cp ../../zfifo.h .
 
 zfifo.o: zfifo.c zfifo.h


More information about the Pkg-electronics-devel mailing list