[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] Add new DEB_HOST_MULTIARCH, DEB_BUILD_MULTIARCH variables



Ok, I tried the patch and the multiarch packages. Some comments/notes:

* I found that the order in which I have to multiarchify -say- armhf is the following:
1. install lsb-base, make sure lsb_architecture runs and returns arm-linux-glibc_hf (it does now)
2. rebuild dpkg *with* the proper lsb_architecture script as it needs it to properly output DEB_BUILD_MULTIARCH variable.
3. Build gcc from the multiarch package from Steve... hm, wait something's missing!

Yup, here is the output from lsb_architecture and dpkg-architecture resp:

root@samwise:/# lsb_architecture
arm-linux-glibc_hf
root@samwise:/# dpkg-architecture
DEB_BUILD_ARCH=armhf
DEB_BUILD_ARCH_OS=linux
DEB_BUILD_ARCH_CPU=arm
DEB_BUILD_ARCH_BITS=32
DEB_BUILD_ARCH_ENDIAN=little
DEB_BUILD_GNU_CPU=arm
DEB_BUILD_GNU_SYSTEM=linux-gnueabi
DEB_BUILD_GNU_TYPE=arm-linux-gnueabi
DEB_BUILD_MULTIARCH=arm-linux-glibc
DEB_HOST_ARCH=armel
DEB_HOST_ARCH_OS=linux
DEB_HOST_ARCH_CPU=arm
DEB_HOST_ARCH_BITS=32
DEB_HOST_ARCH_ENDIAN=little
DEB_HOST_GNU_CPU=arm
DEB_HOST_GNU_SYSTEM=linux-gnueabi
DEB_HOST_GNU_TYPE=arm-linux-gnueabi
DEB_HOST_MULTIARCH=arm-linux-glibc

ok, check the variables DEB_*_MULTIARCH and DEB_HOST_ARCH, they have the wrong values. The problem is easy to spot. The internal mapping is made using the triplets as the key, which obviously cannot work for armhf/armel as they - have to - share triplets. It depends on which is last on triplettable, as this value is set last while reading the file.

So, instead of just adding multiarch as another mapping to triplets, I propose we instead change the base mapping to using multiarch triplets as *key* and add the other mappings on top of that. So armhf/armel will instead map to arm-linux-glibc_hf/arm-linux-glibc which will *both* eventually map to the gnu triplet arm-linux-gnueabi. Ditto for the other arches.

I can't think of another solution that will make dpkg-architecture work with multiarch AND keep the same gnu triplet for more than one arches. We actually were discussing this with Wookey earlier today or yesterday at the Sprint, and I believe it was also mentioned at the phone conference.

Konstantinos

Reply to: