Open krono opened 1 month ago
Right... this is messy.
Correct me if I'm wrong but we want the GNU triplet here, not the Debian one. Debian is ppc64el
, GNU is powerpc64le
I think we tried to account for it judging by this but this might not even be correct w.r.t el
/le
.
Could we make this a little more generic?
IIRC dpkg-architecture
relies on $CC -dumpmachine
, just wondering if we could just do that
It's debuild
that invokes some dh_
stuff, which is unhappy with ppc64le-gnu-linux
, because it wants powerpc64le-gnu-linux
.
uname -m
result in ppc64le
powerpc64le
because we explicitely set it when cross-compiling in https://github.com/NVIDIA/enroot/blob/master/pkg/debbuild#L60but -dumpmachine
sounds plausible…
On ppc64le deb machines, when not cross compiling,
uname -m
reportsppc64le
, which is typically right. However, the "Debian machine triplet" that is necessary to build correctly usespowerpc64le
for whatever reason. The cross compile path knows this and is explicit about that.To alleviate that, use
dpkg-architecture
to discover the HOST CPU type, which is what forms the machine triplet. The conditional check fordpkg-architecture
should be safe and reports the right values for x86 and arm, too; falls back touname -m
anyways.