Bug#870346: glib2.0 FTCBFS: .../.libs/gobject-scan: cannot execute binary file

Helmut Grohne helmut at subdivi.de
Tue Aug 1 09:27:15 UTC 2017


Source: glib2.0
Version: 2.53.4-2
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap

The most recent glib2.0 unstable upload (compared to the previous
unstable upload) introduced a FTCBFS. Now building ends with:

| gtkdoc-scan --module=gobject --ignore-headers="tests gatomicarray.h gobject_trace.h gtype-private.h" ${_source_dir} --deprecated-guards="G_DISABLE_DEPRECATED" --ignore-decorators="G_GNUC_INTERNAL|G_GNUC_WARN_UNUSED_RESULT" 
| Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/(.*?){ <-- HERE / at /usr/bin/gtkdoc-scan line 735.
| if grep -l '^..*$' gobject.types > /dev/null 2>&1 ; then \
|   scanobj_options=""; \
|   gtkdoc-scangobj 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
|   if test "$?" = "0"; then \
|     if test "x" = "x1"; then \
|       scanobj_options="--verbose"; \
|     fi; \
|   fi; \
|   CC="/bin/bash ../../../libtool --tag=CC --mode=compile aarch64-linux-gnu-gcc   -I../../../../../../docs/reference/gobject -I../../.. -I../../../glib -I../../../../../../glib -I../../../../../.. -DG_DISABLE_CAST_CHECKS -Wdate-time -D_FORTIFY_SOURCE=2 -pthread  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security" LD="/bin/bash ../../../libtool --tag=CC --mode=link aarch64-linux-gnu-gcc   -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security  -Wl,-z,relro -Wl,-z,now -Wl,-z,defs -Wl,--no-as-needed -Wl,-O1" RUN="/bin/bash ../../../libtool --mode=execute" CFLAGS=" -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security" LDFLAGS="../../../glib/libglib-2.0.la ../../../gobject/libgobject-2.0.la -Wl,-z,relro -Wl,-z,now -Wl,-z,defs -Wl,--no-as-needed -Wl,-O1" \
|   gtkdoc-scangobj  $scanobj_options --module=gobject; \
| else \
|   for i in gobject.args gobject.hierarchy gobject.interfaces gobject.prerequisites gobject.signals ; do \
|     test -f $i || touch $i ; \
|   done \
| fi
| /<<PKGBUILDDIR>>/debian/build/deb/docs/reference/gobject/gobject-scan: line 117: /<<PKGBUILDDIR>>/debian/build/deb/docs/reference/gobject/.libs/gobject-scan: cannot execute binary file: Exec format error
| /<<PKGBUILDDIR>>/debian/build/deb/docs/reference/gobject/gobject-scan: line 117: /<<PKGBUILDDIR>>/debian/build/deb/docs/reference/gobject/.libs/gobject-scan: Success
| Scan failed: 
| Makefile:856: recipe for target 'scan-build.stamp' failed
| make[6]: *** [scan-build.stamp] Error 126
| make[6]: Leaving directory '/<<PKGBUILDDIR>>/debian/build/deb/docs/reference/gobject'
| Makefile:488: recipe for target 'all-recursive' failed
| make[5]: *** [all-recursive] Error 1
| make[5]: Leaving directory '/<<PKGBUILDDIR>>/debian/build/deb/docs/reference'
| Makefile:488: recipe for target 'all-recursive' failed
| make[4]: *** [all-recursive] Error 1
| make[4]: Leaving directory '/<<PKGBUILDDIR>>/debian/build/deb/docs'
| Makefile:1239: recipe for target 'all-recursive' failed
| make[3]: *** [all-recursive] Error 1
| make[3]: Leaving directory '/<<PKGBUILDDIR>>/debian/build/deb'
| Makefile:860: recipe for target 'all' failed
| make[2]: *** [all] Error 2
| make[2]: Leaving directory '/<<PKGBUILDDIR>>/debian/build/deb'
| dh_auto_build: make -j8 returned exit code 2
| debian/rules:129: recipe for target 'override_dh_auto_build' failed
| make[1]: *** [override_dh_auto_build] Error 2
| make[1]: Leaving directory '/<<PKGBUILDDIR>>'
| debian/rules:25: recipe for target 'build-arch' failed
| make: *** [build-arch] Error 2
| dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2

It seems that previous cross builds skipped documentation. That's still
vaguely visible in the packaging (which was converted from cdbs to dh)
where --disable-gtk-doc is appended to DEB_CONFIGURE_EXTRA_FLAGS for
cross building. Unfortunately, that flag is reverted by a
--enable-gtk-doc in DEB_CONFIGURE_FLAGS_deb. I conclude that there is a
packaging bug: Either the order of flags is wrong or the
--disable-gtk-doc is useless and should be removed.

Reordering makes cross building succeed. Thus I am attaching the
reordering as a patch.

I do question whether having --disable-gtk-doc conditional to cross
building is a good idea. If I understand the packaging correctly, the
documentation is only needed for the libglib2.0-doc package, which
happens to be Arch:all. Is there a good reason for not passing
--disable-gtk-doc in arch-only native builds?

Helmut
-------------- next part --------------
diff --minimal -Nru glib2.0-2.53.4/debian/changelog glib2.0-2.53.4/debian/changelog
--- glib2.0-2.53.4/debian/changelog	2017-07-30 12:54:22.000000000 +0200
+++ glib2.0-2.53.4/debian/changelog	2017-08-01 11:07:37.000000000 +0200
@@ -1,3 +1,10 @@
+glib2.0 (2.53.4-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Fix order of configure flags (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Tue, 01 Aug 2017 11:07:37 +0200
+
 glib2.0 (2.53.4-2) unstable; urgency=medium
 
   * Upload to unstable
diff --minimal -Nru glib2.0-2.53.4/debian/rules glib2.0-2.53.4/debian/rules
--- glib2.0-2.53.4/debian/rules	2017-07-30 12:22:49.000000000 +0200
+++ glib2.0-2.53.4/debian/rules	2017-08-01 11:07:36.000000000 +0200
@@ -28,15 +28,15 @@
 	dh_auto_configure \
 		--builddirectory=debian/build/deb \
 		-- \
-		$(DEB_CONFIGURE_EXTRA_FLAGS) \
 		$(DEB_CONFIGURE_FLAGS_deb) \
+		$(DEB_CONFIGURE_EXTRA_FLAGS) \
 		$(NULL)
 ifneq ($(filter %-udeb,$(binaries)),)
 	dh_auto_configure \
 		--builddirectory=debian/build/udeb \
 		-- \
-		$(DEB_CONFIGURE_EXTRA_FLAGS) \
 		$(DEB_CONFIGURE_FLAGS_udeb) \
+		$(DEB_CONFIGURE_EXTRA_FLAGS) \
 		$(NULL)
 endif
 


More information about the pkg-gnome-maintainers mailing list