tags: + patch
thanks
Michael Tokarev wrote:
Package: procps
Version: 1:3.2.8-2
Severity: does-not-build
When building procps package on a i386 system where `gcc -m64' works
(which is any x86 32bit system with recent gcc where libc6-dev-amd64
is installed), the binaries produced by the build will be 64bits, even
if the package is ...i386.deb. Here's the relevant part of the upstream
Makefile:
# Be 64-bit if at all possible. In a cross-compiling situation, one may
# do "make m64=-m32 lib64=lib" to produce 32-bit executables. DO NOT
# attempt to use a 32-bit executable on a 64-bit kernel. Packagers MUST
# produce separate executables for ppc and ppc64, s390 and s390x,
# i386 and x86-64, mips and mips64, sparc and sparc64, and so on.
# Failure to do so will cause data corruption.
m64 := $(call check_gcc,-m64,$(call check_gcc,-mabi=64,))
ALL_CFLAGS += $(m64)
So apparently, in order to work around this mess (and yes I think it's
a mess), debian/rules should check if we're building on i386 or amd64,
and on pass the suggested options (m64=-m32 lib64=lib) to make in case
it's on i386.
It turned out it is enough to pass m64= to the upstream make. So debian/rules
becomes:
--- procps-3.2.8/debian/rules 2009-11-26 13:49:45.000000000 +0300
+++ procps-3.2.8.mjt/debian/rules 2009-11-26 13:40:45.867697193 +0300
@@ -31,6 +31,6 @@
[ -d static ] || mkdir static
- $(MAKE) $(CROSS) lib64=lib SHARED=0 CFLAGS="$(CFLAGS)" proc/libproc.a
+ $(MAKE) $(CROSS) lib64=lib m64= SHARED=0 CFLAGS="$(CFLAGS)"
proc/libproc.a
mv proc/libproc.a static
$(MAKE) clean
- $(MAKE) $(CROSS) W_SHOWFROM=\-DW_SHOWFROM lib64=lib CFLAGS="$(CFLAGS)"
+ $(MAKE) $(CROSS) W_SHOWFROM=\-DW_SHOWFROM lib64=lib m64=
CFLAGS="$(CFLAGS)"
Obviously this is not a problem on buildd, since buildds does not have
64bit libs installed on i386 systems so gcc can't produce 64bit executables.
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org