On Sat, May 23 2009, Pierre Ynard wrote:

> Hello,
>
>> Do not cross compile for i386 an amd64 or vice versa on new kernel
>> versions, since i386 and mad64 have been merged into a common x86
>> architecture. Since this is not a cross compile at all, things get a
>> little confused.
>
> I am trying to build i386 packages of i386 kernels on my (very faster)
> amd64 machine. The ARCH variable passed to `make' still needs to be set
> to "i386". What is the right thing to do then?

        Since the kernel no longer distinguishes between  i386 and
 amd64,  the arch variable is really x86, I think.  What happens if you
 install the resulting package anyway, using --force-architecture?

> According to the man page, and the available options, --arch seems to be
> the right thing to use. So I use as a command line:
>
> CONCURRENCY_LEVEL=4 make-kpkg --rootcmd fakeroot --revision foo.12 \
> --arch i386 --cross-compile - kernel-image
>
> Using kernel-package 12.014 (it is a debian sid system), it still ends
> up building an amd64 package.
>
> I can fix the problem for myself by manually setting DEB_HOST_ARCH to
> i386 in /usr/share/kernel-package/ruleset/common/archvars.mk  Ugly hack,
> much. I tried playing with the snippet of code:
>
> ifdef KPKG_ARCH
>   ifeq ($(strip $(MAKING_VIRTUAL_IMAGE)),)
>     ifneq ($(CROSS_COMPILE),-)
>       ha:=-a$(KPKG_ARCH)
>     endif
>   endif
> endif
>
> If it wasn't for the "ifneq ($(CROSS_COMPILE),-)" test, the right value
> would be set for DEB_HOST_ARCH; however I assume that this test exists
> for a reason, and if I by-pass it, wrong values are apparently set for
> the other variables, and I get a bunch of errors like:
>
> dpkg-architecture: warning: Specified GNU system type i486-linux-gnu
> does not match gcc system type x86_64-linux-gnu.
>
> So, is there an extra bit of logic missing there? Or am I simply doing it
> wrong?

        I don't think the logic was designed to handle this situation,
 really, where you are not really cross compiling (you do not have an
 alternate cross compiling tool chain), not do you have a sub arch
 (since _i396.deb and _amd64.deb seem different to dpkg). At this point,
 I would just force the architecture yes, dpkg, we do know better) and
 leave it at that.

        manoj
-- 
Never get into fights with ugly people because they have nothing to
lose.
Manoj Srivastava <[email protected]> <http://www.golden-gryphon.com/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to