`apt build-dep qemu-system-ppc` fails

Bug #1960592 reported by Paul Menzel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

On Ubuntu 21.10 (ppc64le) trying to install QEMU’s build dependencies fails with:

```
$ sudo apt build-dep qemu-system-ppc
Reading package lists... Done
Picking 'qemu' as source package instead of 'qemu-system-ppc'
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 builddeps:qemu : Depends: gcc-alpha-linux-gnu but it is not installable
                  Depends: gcc-powerpc64-linux-gnu but it is not installable
                  Depends: gcc-sparc64-linux-gnu but it is not installable
                  Depends: gcc-hppa-linux-gnu but it is not installable
E: Unable to correct problems, you have held broken packages.
```

Revision history for this message
Bryce Harrington (bryce) wrote :

Could you attach your /var/log/apt/history.log and /var/log/apt/term.log from after reproducing this?

Also please post the output from:

$ apt-cache policy qemu gcc-powerpc64-linux-gnu

Changed in qemu (Ubuntu):
status: New → Incomplete
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
I think this is actually a known non-issue.

Your command is equal to:
  $ sudo apt build-dep qemu

That is you asking for the complete build dependencies of qemu, which include some bits that need to be cross compiled for various architectures. That is what adds the dependencies to all the gcc-$arch cross compilation packages which are not available on ppc64 systems.

But - if you do not want to build "all of qemu" and instead are just interested to build qemu on ppc64 - you can tell apt that this is what you want.

From the man page:
--arch-only
  Only process architecture-dependent build-dependencies.

So with the following you most likely get what you actually wanted (and it works on ppc64):
  $ sudo apt --arch-only build-dep qemu

If I'm wrong and you did want to build not only the ppc64 but also the arch independent binaries in ppc64, then this bug would actually be a feature request to the cross toolchain to be available on more architectures.

Either way as I see it right now it does not seem to be a mistake in qemu, but you can let us know once you had time to read this.

Revision history for this message
Paul Menzel (paulmenzel) wrote :

Thank you all for your help.

    $ apt-cache policy qemu gcc-powerpc64-linux-gnu
    qemu:
      Installed: (none)
      Candidate: 1:6.0+dfsg-2expubuntu1.1
      Version table:
         1:6.0+dfsg-2expubuntu1.1 500
            500 http://de.ports.ubuntu.com/ubuntu-ports impish-updates/universe ppc64el Packages
         1:6.0+dfsg-2expubuntu1 500
            500 http://de.ports.ubuntu.com/ubuntu-ports impish/universe ppc64el Packages
    N: Unable to locate package gcc-powerpc64-linux-gnu

But:

    $ apt-cache policy gcc-powerpc-linux-gnu
    gcc-powerpc-linux-gnu:
      Installed: (none)
      Candidate: 4:11.2.0-1ubuntu1
      Version table:
         4:11.2.0-1ubuntu1 500
            500 http://de.ports.ubuntu.com/ubuntu-ports impish/universe ppc64el Packages

Thank you for telling me about `--arch-only`. That seems to be it.

    $ sudo eatmydata apt --arch-only build-dep qemu
    Reading package lists... Done
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

As I had manually installed the dependencies before, nothing happened as expected.

Changed in qemu (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.