Re: FTBFS: how to test fixes
On 09/05/2016 07:20 PM, Andrey Rahmatullin wrote:
> On Mon, Sep 05, 2016 at 07:07:51PM +0200, Muri Nicanor wrote:
>> so, i've got my first two FTBFS bugs (on mips and hppa)- what the
>> recommended way of testing fixes for architectures i don't have
>> testmachines of?
> Porterboxes. See https://dsa.debian.org/doc/guest-account/ about getting
> access for non-DDs.
Note that there are no official hppa porterboxes. You can ask on
the debian-hppa mailing list for access to an unofficial one
though.
But speaking of the bugs, they don't actually require porterbox
access.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836713
The hppa build chroots don't have systemd installed (for
whatever reasaon), in contrast to chroots on most other
architectures.
Since you depend on systemd.pc, which is part of the
systemd package, just Build-Depend on systemd to make
systemd.pc available. You won't need porterbox access
to fix that issue. (Btw. libsystemd.pc != systemd.pc)
Also note that there are plans to make init non-Essential
in the future, so more build chroots will not have
systemd preinstalled in them, so the problem you're seeing
on hppa now is going to be a problem on all archs sooner
or later.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836712
MIPS (at least 32bit) doesn't support 64bit atomic
operations intrinsically (_8 == 8 bytes) - and your software
uses std::atomic<uint64_t> (found that by grepping).
However, gcc provides an emulation library called libatomic.
You should link against that emulation library if present
in order to use those intrinsics.
I've attached a patch against your package (add it as a quilt
patch) that checks for the availability of libatomic and adds
it to the linker flags. This might result in a spurious
dependency on libatomic on other platforms, but unfortunately
I don't know of any way to properly pass --as-needed for just
this library without libtool reordering the entire list of
linker flags. :-(
I've build-tested (including test suite) on amd64 and mipsel
(qemu-user though) and the patch fixes the error.
Regards,
Christian
--- a/Makefile.am
+++ b/Makefile.am
@@ -134,7 +134,8 @@ libusbguard_la_LIBADD=\
@json_LIBS@ \
@udev_LIBS@ \
@crypto_LIBS@ \
- @pegtl_LIBS@
+ @pegtl_LIBS@ \
+ @atomic_LIBS@
libusbguard_la_SOURCES=\
src/Common/Thread.hpp \
--- a/configure.ac
+++ b/configure.ac
@@ -71,6 +71,13 @@ AM_PROG_LIBTOOL
AC_PROG_LIBTOOL
#
+# Check if libatomic is available, might be required for emulating
+# atomic intrinsics on some platforms.
+#
+AC_CHECK_LIB([atomic], [__atomic_add_fetch_8], [atomic_LIBS="-latomic"], [atomic_LIBS=""])
+AC_SUBST([atomic_LIBS])
+
+#
# Checks for required libraries.
#
PKG_CHECK_MODULES([udev], [libudev >= 200],
Reply to: