I noticed that it is not just on sparc that util-vserver fails to build
from source, but also on various other architectures. The following to
pages list the logs:

http://experimental.ftbfs.de/build.php?arch=&pkg=util-vserver
http://buildd.debian.org/build.php?arch=&pkg=util-vserver

The latter one lists mipsel, s390, sparc, hppa, powerpc, and m68k as the
architectures that have failed for version 0.30.204-1. Andreas Barth
gave me an account on his powerpc machine, set up a sid chroot, and
installed the build dependencies on it, and I quickly found three
problems that prevent the powerpc build:

* in src/vshelper-sync.c, there is a test for __linux, but this is not
defined with gcc --std=c99 (which configure wants to use); using
__linux__ instead works

* in dietlibc's sys/types.h, there is a similar test for powerpc,
instead of __powerpc__, that fails with gcc --std=c99; this can be
worked around by adding -Dpowerpc to CFLAGS; I have reported this as bug
#300917

* util-vserver's build wants to use libtool and libtool wants to
use /usr/lib/diet/lib-powerpc, but dietlibc has /usr/lib/diet/lib-ppc
instead. I worked around this by asking Andreas to add a symlink. I've
reported this as a bug against dietlibc-dev as well, but haven't yet
received the bug number.

Attached is a patch for the first two problems. The latter problem
requires an update to dietlibc, I expect.

At least some of the other architectures probably have similar problems
to these. I'll see if I can find access to suitable machines for testing
things, and if so, will send further patches.

I hope this has been helpful. Happy hacking.

diff -ru util-vserver-0.30.204.orig/debian/rules util-vserver-0.30.204/debian/rules
--- util-vserver-0.30.204.orig/debian/rules	2005-03-22 18:37:47.329587000 +0100
+++ util-vserver-0.30.204/debian/rules	2005-03-22 18:39:14.282724214 +0100
@@ -18,7 +18,7 @@
 # so far.
 #MAKE_OPTS =  pkglibdir=/var/lib/util-vserver PKGLIBDIR=/var/lib/util-vserver
 
-CFLAGS = -Wall -g
+CFLAGS = -Wall -g -Dpowerpc
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -O0
diff -ru util-vserver-0.30.204.orig/src/vshelper-sync.c util-vserver-0.30.204/src/vshelper-sync.c
--- util-vserver-0.30.204.orig/src/vshelper-sync.c	2004-04-21 11:44:05.000000000 +0200
+++ util-vserver-0.30.204/src/vshelper-sync.c	2005-03-22 18:39:27.484200368 +0100
@@ -85,7 +85,7 @@
     FD_ZERO(&fds);
     FD_SET(fd, &fds);
 
-#ifndef __linux
+#ifndef __linux__
 #  error vshelper relies on the Linux select() behavior (timeout holds remaining time)
 #endif
 

Reply via email to