Qemu build failure

Installing qemu fails:

install -c -m 0755 qemu-system-avr  "/usr/local/homebrew/Cellar/qemu/5.1.0/bin"
make[1]: *** [install] Error 71
make: *** [cris-softmmu/install] Error 2

But then underneath it says “Do not report this issue to Homebrew/brew or Homebrew/core!”.

So I assume if I do actually try to file a bug about this, I’ll have my hair flamed off. What does this mean? Will qemu be removed from Homebrew if it’s broken?

macOS 10.15.6

qemu installs fine from MacPorts, if that helps anyone.

That’s because you seem to have installed Homebrew under /usr/local/homebrew instead of the standard /usr/local, so:

  1. all Homebrew formulae will be built from source on your system, instead of from (tested) binary packages
  2. there may be some critical differences in your Homebrew hierarchy (incorrect permissions, stray symlinks, etc.) that may cause source installs to fail only on your system

It depends, but in my experience, anyone expecting to be flamed tends to interact in a more hostile manner than normal, making it something of a self-fulfilling prophecy. Politeness, however, has historically not triggered answering hostility in the issues page.

Only if it’s unrecoverably broken. Based on the error message you posted, however, it’s more likely that your setup is either missing critical parent directories, or some permissions aren’t correct, or some other mundane reason for QEMU’s own install process to fail.

So, what’s the output of brew config and brew doctor on your system?

To be clear, many formulae are relocatable, and so ought to work correctly regardless if your Homebrew is installed in a nonstandard prefix. A formula is relocatable if it says cellar :any in the formula’s bottle do block, but qemu in this case is not relocatable, hence why it’s building from source (and failing).

Homebrew’s relocation detection is necessarily conservative, so it’s possible that running brew install --force-bottle qemu will work fine, but this is also unsupported. You can also see some solutions in this thread, but again, you’d be on your own. Your best bet is to just install Homebrew in a default location.

1 Like

OK, so, what I find particularly interesting is that it installs on my MacBook Pro just fine, but I get the above error only on my Mac Mini, despite the fact that both are running the same version of macOS, and that Homebrew is installed in the same non-standard location (/usr/local/homebrew) on both.

So… what does that mean? Bug after all?

That sounds a lot like incorrect permissions somewhere in the hierarchy of the QEMU install root, as I mentioned previously.

What does ls -lR /usr/local/Cellar/qemu/5.1.0 output? And does brew install <some_other_formula> work properly on your mac Mini?

Well, today I tried to install it again, and it worked.

I didn’t change anything (that I know of), I didn’t even update homebrew, it just spontaneously fixed itself.

So… good. Thanks. I guess. :slight_smile: