Source: libgadu
Version: 1:1.12.1-2
Severity: minor
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

libgadu fails to cross build from source for a number of different
reasons. The first of these is that its configure assumes a broken
snprintf implementation during cross compilation and gives up. This can
be alleviated by telling it that snprintf works (which is the case for
all Debian architectures) and is what the attached patch does.

Further down the road, libgadu uses protobuf-c-compiler, which is not
ready for cross compilation. The protofbuf-c-compiler package is
implicitly Multi-Arch: no and thus installed for the host architecture,
which means that protoc-c cannot be run. Fixing this will require
changes to the protobuf-c-compiler packaging, but should not require
changes in libgadu. I didn't look for more issues yet.

So could you apply the attached patch to make the protobuf-c-compiler
issue visible during normal cross builds?

Helmut
diff --minimal -Nru libgadu-1.12.1/debian/changelog 
libgadu-1.12.1/debian/changelog
--- libgadu-1.12.1/debian/changelog     2015-08-07 22:03:01.000000000 +0200
+++ libgadu-1.12.1/debian/changelog     2016-10-01 20:08:34.000000000 +0200
@@ -1,3 +1,10 @@
+libgadu (1:1.12.1-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Partially fix FTCBFS: Assume working snprintf during cross. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sat, 01 Oct 2016 20:08:18 +0200
+
 libgadu (1:1.12.1-2) unstable; urgency=medium
 
   * Upload to unstable
diff --minimal -Nru libgadu-1.12.1/debian/rules libgadu-1.12.1/debian/rules
--- libgadu-1.12.1/debian/rules 2015-08-07 22:00:50.000000000 +0200
+++ libgadu-1.12.1/debian/rules 2016-10-01 20:12:10.000000000 +0200
@@ -2,6 +2,12 @@
 # libgadu package rules file
 # Copyright 2002-2015 Marcin Owsiany <porri...@debian.org>
 
+include /usr/share/dpkg/architecture.mk
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+# libgadu doesn't build without a working snprintf
+CONFIGURE_FLAGS += --with-c99-vsnprintf
+endif
+
 # Force the glibc-generated stack dump to stderr instead of /dev/tty for the
 # test suite:
 export LIBC_FATAL_STDERR_=1
@@ -19,7 +25,8 @@
                --with-pthread \
                --without-bind \
                --without-openssl \
-               --with-gnutls
+               --with-gnutls \
+               $(CONFIGURE_FLAGS)
 # Reasons for disabling features are in README.Debian
 # Remember to update README.Debian as well...
 

Reply via email to