Package: stud
Severity: important
(serious could perhaps be justified but i'm being conservative)

Your package FTBFS on all architectures except i386 and amd64. Debian policy is that packages
should be supported on as many architectures as resonablly possible.

The build setup for stud always seems to define USE_SYSCALL_FUTEX which seems to use x86/x64 specfic assembler. Further futexes are a linux specific construct and this is causing the build failure on hurd.

The attatched patch disables the flag on everything except i386 and amd64. It also fixes up the clean target to
work properly

Seperately the package FTBFS on kfreebsd due to undeclared TCP_KEEPIDLE. I don't know how to handle this issue and will send a mail to debian-bsd when I have the number of this bug report.
diff -urN stud-0.3/debian/patches/only-use-syscall-futex-on-x86-and-x64.diff stud-0.3.new/debian/patches/only-use-syscall-futex-on-x86-and-x64.diff
--- stud-0.3/debian/patches/only-use-syscall-futex-on-x86-and-x64.diff	1970-01-01 01:00:00.000000000 +0100
+++ stud-0.3.new/debian/patches/only-use-syscall-futex-on-x86-and-x64.diff	2011-12-23 00:18:00.000000000 +0000
@@ -0,0 +1,38 @@
+Description: disable USE_SYSCALL_FUTEX on architectures other than x86/x64
+ USE_SYSCALL_FUTEX seems to enable x86/x64 specific assembler
+ With USE_SYSCALL_FUTEX disabled we also need to link in the pthread
+ library
+Author: Peter Green <plugw...@p10link.net>
+Bug-Debian: http://bugs.debian.org/??????
+
+
+Index: stud-0.3.new/Makefile
+===================================================================
+--- stud-0.3.new.orig/Makefile	2011-12-22 23:48:09.000000000 +0000
++++ stud-0.3.new/Makefile	2011-12-23 00:17:44.000000000 +0000
+@@ -15,10 +15,24 @@
+ 
+ # Shared cache feature
+ ifneq ($(USE_SHARED_CACHE),)
+-CFLAGS += -DUSE_SHARED_CACHE -DUSE_SYSCALL_FUTEX
++CFLAGS += -DUSE_SHARED_CACHE 
+ OBJS   += shctx.o ebtree/libebtree.a
+ ALL    += ebtree
+ 
++DEB_HOST_ARCH ?=$(shell dpkg-architecture -qDEB_HOST_ARCH)
++#USE_SYSCALL_FUTEX depends on x86/x64 specific assembler code
++#and afaict FUTEXes are linux-specific
++ifeq ($(DEB_HOST_ARCH),i386)
++CFLAGS += -DUSE_SYSCALL_FUTEX
++else
++ifeq ($(DEB_HOST_ARCH),amd64)
++CFLAGS += -DUSE_SYSCALL_FUTEX
++else
++#we are on neither i396 or amd64, we need to link the pthread library
++LDFLAGS += -lpthread
++endif
++endif
++
+ ebtree/libebtree.a: $(wildcard ebtree/*.c)
+ 	make -C ebtree
+ ebtree:
diff -urN stud-0.3/debian/patches/series stud-0.3.new/debian/patches/series
--- stud-0.3/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ stud-0.3.new/debian/patches/series	2011-12-22 23:48:09.000000000 +0000
@@ -0,0 +1 @@
+only-use-syscall-futex-on-x86-and-x64.diff
diff -urN stud-0.3/debian/rules stud-0.3.new/debian/rules
--- stud-0.3/debian/rules	2011-12-09 18:57:46.000000000 +0000
+++ stud-0.3.new/debian/rules	2011-12-23 00:07:46.000000000 +0000
@@ -11,3 +11,11 @@
 override_dh_auto_install:
 override_dh_auto_build:
 	make USE_SHARED_CACHE=1
+
+#auto clean is insufficient, clean up some stuff manually
+override_dh_clean: 
+	dh_clean
+	rm -rf build_dir
+	rm -f *.o
+	rm -f ebtree/*.o
+	rm -f ebtree/*.a

Reply via email to