[Debian] vzctl build for ppc64

Kir Kolyshkin kir at openvz.org
Tue Aug 14 00:28:55 EDT 2007


Thorsten, Ola,

I am trying to rebuild vzctl deb for ppc64 arch from your sources, on an
IBM powerpc box. Here are the couple of issues I came across; hope
you'll help me to resolve this.

1. I had to remove some stuff from debian/rules:
===
--- debian/rules.orig   2007-08-14 08:20:46.000000000 +0400
+++ debian/rules        2007-08-14 08:20:59.000000000 +0400
@@ -3,10 +3,6 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 OS_DEB_VERSION             ?= $(shell cat /etc/debian_version)
 VZCTL_DEBVERSION    ?= $(shell dpkg-parsechangelog | grep ^Version |
sed "s/Version: //")
 VZCTL_VERSION       ?= $(shell echo $(VZCTL_DEBVERSION) | cut -d '-' -f 1)
@@ -23,8 +19,6 @@
        dh_testdir
        sed -i "s/'$(VZCTL_VERSION)'/'$(VZCTL_DEBVERSION)'/g" configure
        ./configure \
-           --host=$(DEB_HOST_GNU_TYPE) \
-           --build=$(DEB_BUILD_GNU_TYPE) \
            --prefix=/usr               \
            --sysconfdir=/etc           \
            --localstatedir=/var        \
===

The problem here is caused by the fact that if I run configure without
--host and --build, it goes like this:
checking build system type... powerpc64-unknown-linux-gnu
checking host system type... powerpc64-unknown-linux-gnu
checking target system type... powerpc64-unknown-linux-gnu

But both DEB_HOST_GNU_TIME and DEB_BUILD_GNU_TYPE are set to
powerpc-linux-gnu. The crucial piece here is "64" which disappears.
Unfortunately I rely on this for vzctl in configure script, adding -m64
to CFLAGS if arch is ppc64 or powerpc64. This is needed to have 64-bit
vzctl binary; 32-bit won't work. Maybe there's some other way to say
this to e.g. dpkg-buildpackage -- please suggest

2. Because of a need to build 64-bit version for ppc64, I need to have a
libc6-dev-ppc64 package. This needs to be (conditionally?) added to
build requirements (not sure how it's done in debian world).


More information about the Debian mailing list