[Debian] vzctl build for ppc64

Ola Lundqvist ola at opalsys.net
Tue Aug 14 02:26:44 EDT 2007


Privet Kir

I take all the issues in the same mail.

On Tue, Aug 14, 2007 at 08:35:46AM +0400, Kir Kolyshkin wrote:
> One more issue...
> 
> Kir Kolyshkin wrote:
> > 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.

Sure, no problem. However I may need access to the build machine to
work out a good solution.

> > 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

The basic problem here is that dpkg-architecture return "wrong" values.
Maybe some other variable that dpkg-architecture prints is better to use,
like DEB_HOST_ARCH_CPU.

If you think the configure script will manage all the supported architectures
I can of course remove it. The added --host and --build options are normally
needed because configure is not that good at handling this.

If you give me access to the build host I can determine what the problem is.

> > 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).

I'm not sure that is possible actually. In Debian this is handled
by the fact that such tools are part of the "build essential" packages. This
means that it is installed on all systems that builds it.

> 3. I had to do
> # mv /usr/lib/libvzctl* /usr/lib64/
> after installing vzctl.

We can make a conditional rule for this if we can determine a way
to get the architecture in a proper way.

ifeq ($(ARCH),ppc64)
...
endif

> Otherwise it seems to work fine.

Nice.

Best regards,

// Ola


-- 
 --- Ola Lundqvist systemkonsult --- M Sc in IT Engineering ----
/  ola at opalsys.net                   Annebergsslingan 37        \
|  opal at debian.org                   654 65 KARLSTAD            |
|  http://opalsys.net/               Mobile: +46 (0)70-332 1551 |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9  /
 ---------------------------------------------------------------


More information about the Debian mailing list