Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No support for mixed architectures (32-bit on 64-bit) #2755

Closed
mcassaniti opened this issue Jun 6, 2024 · 6 comments
Closed

No support for mixed architectures (32-bit on 64-bit) #2755

mcassaniti opened this issue Jun 6, 2024 · 6 comments
Labels

Comments

@mcassaniti
Copy link
Contributor

mkosi commit the issue has been seen with

main

Used host distribution

Ubuntu 24.04 (noble)

Used target distribution

Ubuntu 24.04 (noble)

Linux kernel version used

6.8.0-31-generic

CPU architectures issue was seen on

x86_64

Unexpected behaviour you saw

I added the file apt-extra/var/lib/dpkg/arch with the contents below. This is the equivalent of running dpkg --add-architecture i386 on an amd64 machine. I could not install any i386 based packages.

amd64
i386

Used mkosi config

# Only relevant content shown

[Distribution]
PackageManagerTrees = apt-extra

[Content]
Packages = libc6:i386

mkosi output

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libc6:i386
‣ "apt-get -o APT::Architecture=amd64 -o APT::Architectures=amd64 -o APT::Install-Recommends=false -o APT::Immediate-Configure=off -o APT::Get::Assume-Yes=true -o APT::Get::AutomaticRemove=true -o APT::Get::Allow-Change-Held-Packages=true -o APT::Get::Allow-Remove-Essential=true -o APT::Sandbox::User=root -o Acquire::AllowReleaseInfoChange=true -o Dir::Cache=/var/cache/apt -o Dir::State=/var/lib/apt -o Dir::Log=/var/log/apt -o Dir::State::Status=/buildroot/var/lib/dpkg/status -o Dir::Bin::DPkg=/usr/bin/dpkg -o Debug::NoLocking=true -o DPkg::Options::=--root=/buildroot -o DPkg::Options::=--force-unsafe-io -o DPkg::Options::=--force-architecture -o DPkg::Options::=--force-depends -o DPkg::Options::=--no-debsig -o DPkg::Use-Pty=false -o DPkg::Install::Recursive::Minimum=1000 -o pkgCacheGen::ForceEssential=, install libc6:i386" returned non-zero exit code 100.
@mcassaniti mcassaniti added the bug label Jun 6, 2024
@mcassaniti
Copy link
Contributor Author

The underlying issue is setting -o APT::Architectures=amd64 which overrides the additional file. Is this a case that the project wishes to support?

@behrmann
Copy link
Contributor

behrmann commented Jun 6, 2024

That's an edge case. I think only Debian does multilib the way Debian does it.

I don't think we want to set up sources.list for multiple architectures—users needing that can use package manager trees or skeletons. If dropping the -o APT::Architectures= line is enough to fix it or if changing it to only defaulting to debarch and reading the arches from /var/lib/dpkg/arch in the package manager tree or root is enough to fix it and this doesn't interfere with the single arch case, than I think changing that would be fine.

@mcassaniti
Copy link
Contributor Author

Dropping the option is sufficient with the basic testing I've done but let me do a more thorough test and get back to you.

@DaanDeMeyer
Copy link
Contributor

systemd has a concept of secondary architectures so that i386 is a secondary architecture for x86-64. We could add that as well by adding a secondary() method to he Architecture enum which returns the secondary architecture if there is one and then set APT::Architectures to both the main and secondary architectures.

@behrmann
Copy link
Contributor

behrmann commented Jun 6, 2024

I'm not sure we should do this in all cases. I'm not entirely sure how to understand the man page there

The initial default is always the system's native architecture (APT::Architecture), and foreign architectures are added to the default list when they are registered via dpkg --add-architecture.

i.e. whether setting this is equivalent to having done the dpkg --add-architecture. I for one am quite happy to finally getting rid of having multilib systems, so if this would were equivalent to running to dpkg --add-architecture, I'd rather have this be opt in.

@DaanDeMeyer DaanDeMeyer added RFE and removed bug labels Jun 7, 2024
@mcassaniti
Copy link
Contributor Author

mcassaniti commented Jun 14, 2024

After poking and prodding I've given up and opted to use a post-install script. This one really should be marked as wont-fix unless you want to test all the bits.

@mcassaniti mcassaniti closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants