Source: libmbim
Version: 1.14.0-1
Tags: patch
User: [email protected]
Usertags: rebootstrap

libmbim fails to cross build from source:

| /<<PKGBUILDDIR>>/docs/reference/libmbim-glib/libmbim-glib-scan: line 117: 
/<<PKGBUILDDIR>>/docs/reference/libmbim-glib/.libs/libmbim-glib-scan: cannot 
execute binary file: Exec format error
| /<<PKGBUILDDIR>>/docs/reference/libmbim-glib/libmbim-glib-scan: line 117: 
/<<PKGBUILDDIR>>/docs/reference/libmbim-glib/.libs/libmbim-glib-scan: Success
| Scan failed: 
| Makefile:676: recipe for target 'scan-build.stamp' failed
| make[6]: *** [scan-build.stamp] Error 126
| make[6]: Leaving directory '/<<PKGBUILDDIR>>/docs/reference/libmbim-glib'
| Makefile:435: recipe for target 'all' failed
| make[5]: *** [all] Error 2
| make[5]: Leaving directory '/<<PKGBUILDDIR>>/docs/reference/libmbim-glib'
| Makefile:379: recipe for target 'all-recursive' failed
| make[4]: *** [all-recursive] Error 1
| make[4]: Leaving directory '/<<PKGBUILDDIR>>/docs/reference'
| Makefile:379: recipe for target 'all-recursive' failed
| make[3]: *** [all-recursive] Error 1
| make[3]: Leaving directory '/<<PKGBUILDDIR>>/docs'
| Makefile:434: recipe for target 'all-recursive' failed
| make[2]: *** [all-recursive] Error 1
| make[2]: Leaving directory '/<<PKGBUILDDIR>>'
| Makefile:366: recipe for target 'all' failed
| make[1]: *** [all] Error 2
| make[1]: Leaving directory '/<<PKGBUILDDIR>>'
| dh_auto_build: make -j1 returned exit code 2
| debian/rules:4: recipe for target 'build-arch' failed
| make: *** [build-arch] Error 2
| dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2

Upon closer inspection, I wondered why it was building documentation in
an arch-any build. It turns out that an arch-only build works just fine
with --disable-gtk-doc. That's not only faster, but also successful for
cross compilation. Please consider applying the attached patch.

Helmut
diff --minimal -Nru libmbim-1.14.0/debian/changelog 
libmbim-1.14.0/debian/changelog
--- libmbim-1.14.0/debian/changelog     2016-07-07 23:34:45.000000000 +0200
+++ libmbim-1.14.0/debian/changelog     2017-08-21 14:03:31.000000000 +0200
@@ -1,3 +1,10 @@
+libmbim (1.14.0-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Skip documentation in arch-only build. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Mon, 21 Aug 2017 14:03:31 +0200
+
 libmbim (1.14.0-1) unstable; urgency=medium
 
   * New upstream release.
diff --minimal -Nru libmbim-1.14.0/debian/rules libmbim-1.14.0/debian/rules
--- libmbim-1.14.0/debian/rules 2016-07-07 23:34:45.000000000 +0200
+++ libmbim-1.14.0/debian/rules 2017-08-21 14:03:25.000000000 +0200
@@ -3,10 +3,15 @@
 %:
        dh $@ --with autoreconf
 
+ifeq ($(filter libmbim-glib-doc,$(shell dh_listpackages)),)
+configure_flags += --disable-gtk-doc --disable-gtk-doc-html
+else
+configure_flags += --enable-gtk-doc --enable-gtk-doc-html
+endif
+
 override_dh_auto_configure:
        dh_auto_configure -- \
-               --enable-gtk-doc \
-               --enable-gtk-doc-html \
+               $(configure_flags) \
                --with-udev \
                --libexecdir=/usr/lib/libmbim
 

Reply via email to