[Pkg-deepin-devel] Bug#1026339: go-gir-generator: FTBFS randomly because of Makefile bug
Santiago Vila
sanvila at debian.org
Sun Dec 18 19:23:57 GMT 2022
Package: src:go-gir-generator
Version: 2.0.2-1
Severity: serious
Tags: bullseye ftbfs patch
Dear maintainer:
During a rebuild of all packages in bullseye, your package failed to build:
dh_auto_build -a
make -j2 "INSTALL=install --strip-program=true"
make[1]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p out/src/pkg.deepin.io/gir/
cp -r lib.in/gobject-2.0 out/src/pkg.deepin.io/gir/
cp: cannot create directory 'out/src/pkg.deepin.io/gir/': No such file or directory
make[1]: *** [Makefile:22: copyfile] Error 1
make[1]: *** Waiting for unfinished jobs....
cd src/gir-generator && go build -o /<<PKGBUILDDIR>>/out/gir-generator
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j2 "INSTALL=install --strip-program=true" returned exit code 2
make: *** [debian/rules:8: binary-arch] Error 25
dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2
This happens because I was using parallel build and there is a bug
in the upstream Makefile:
build: glib-2.0 gobject-2.0 gio-2.0 gudev-1.0 copyfile
It may happen (and in fact it happened to me), that copyfile is tried
before the other dependencies of build, in which case not only
$(OUT_GIR_DIR) does not exist yet, but maybe also the things we want to
copy have not been created yet.
To reproduce the bug, try putting copyfile first, like this:
build: copyfile glib-2.0 gobject-2.0 gio-2.0 gudev-1.0
and try to build with a single CPU to force sequential order,
maybe this is enough:
export DEB_BUILD_OPTIONS=parallel=1; dpkg-buildpackage etc etc
The attached patch may help, but I've not tested it. You might want to
forward this upstream and apply the official patch, whatever it will be.
Thanks.
-------------- next part --------------
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,8 @@ export GOPATH = $(CURDIR):$(CURDIR)/out
GENERATOR = out/gir-generator
-build: glib-2.0 gobject-2.0 gio-2.0 gudev-1.0 copyfile
+build: glib-2.0 gobject-2.0 gio-2.0 gudev-1.0
+ $(MAKE) copyfile
generator:
mkdir -p $(OUT_GIR_DIR)
More information about the Pkg-deepin-devel
mailing list