Discussion:
Bug#848706: dpkg --add-architecture leads to Perl based error message
(too old to reply)
Klaus-J. Wolf
2016-12-19 18:20:01 UTC
Permalink
Package: dpkg
Version: 1.18.15
Severity: important
Tags: d-i

Dear Maintainer,

the command line

# dpkg --print-architecture
amd64

# dpkg --add-architecture i386
Odd number of elements in hash assignment at /usr/share/pkg-config-dpkghook line 30.

This happens on architecture amd64 (x86_64) and concerns both i386 and ix86.

If you google for it, a situation like this does not seem to be perfectly
unknown, while it is unclear why it is reported over longer periods of time
without becoming fixed.

# dpkg --print-foreign-architectures
ix86
i386

# dpkg --remove-architecture i386
Odd number of elements in hash assignment at /usr/share/pkg-config-dpkghook line 30.

It's not there, but you can't add it.

-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: ix86, i386

Kernel: Linux 4.8.0-2-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dpkg depends on:
ii libbz2-1.0 1.0.6-8
ii libc6 2.24-8
ii liblzma5 5.2.2-1.2
ii libselinux1 2.6-3
ii tar 1.29b-1.1
ii zlib1g 1:1.2.8.dfsg-4

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii apt 1.4~beta2

-- no debconf information
Guillem Jover
2016-12-20 10:00:01 UTC
Permalink
Control: reassign -1 pkg-config

Hi!
Post by Klaus-J. Wolf
Package: dpkg
Version: 1.18.15
Severity: important
Tags: d-i
the command line
# dpkg --print-architecture
amd64
# dpkg --add-architecture i386
Odd number of elements in hash assignment at /usr/share/pkg-config-dpkghook line 30.
This happens on architecture amd64 (x86_64) and concerns both i386 and ix86.
If you google for it, a situation like this does not seem to be perfectly
unknown, while it is unclear why it is reported over longer periods of time
without becoming fixed.
This is the first time I've seen this reported, TBH.
Post by Klaus-J. Wolf
# dpkg --print-foreign-architectures
ix86
i386
The problem here is that the architecture tables know nothing about
this ix86 architecture, and they cannot infer the bijective mapping
between the Debian architecture and the GNU triplets.

So I guess, the hook in pkg-config, needs to check whether the function
mapping to a GNU triplet returns undef, and either:

- abort, stating that this is an unknown architecture for which there
is no known mapping to GNU triplets.
- warn, and let it through w/o handling any of the cross setup.

I guess in both cases the message could suggest that the arch needs to
be added to the arch tables in dpkg-dev upstream, but in many cases
that might not make sense. Or at least the tables locally overridden
using an alternative DPKG_DATADIR environment variable (see man
dpkg-architecture(1)).

Thanks,
Guillem

Loading...