Spice for Mac (maybe today?)

Yesterday, I was swamped by little things, and made very little progress on Spice for Mac build. Will today be the day?

Administrative stuff

Filed my first expense report. I need to find who the Paris office manager is, in order to be able to send receipt originals.

Still trying to get the Shuttle PC to work

Yesterday evening, I removed the graphic card in the shuttle, a rather beefy AMD FirePro V7900. Whoever never tried to fit a monster like this in a Shuttle PC knows nothing about practical topology. It took me close to one hour yesterday to remover that card. There is about 1mm extra at the end to fit it in the box!

(End of day: it still did not hang or crash. Crossing fingers. Writing it to jinx it ūüėČ )

Removing heavy 3D card

I’ve always suspected that this card was a¬†significant contributor to the machine’s instability. I’m pretty sure it’s pulling too much power for the (relatively small) PC. Since I don’t need the most 3D power right now, it’s time to test that theory.

First boot this morning was somewhat successful, but my first attempt at starting a VM failed. It began complaining that CPU #2 was stuck. Not a good start. Restart everything, retry. This second time was much better. I finally got the guest to build a whole Linux kernel. Time:

real 39m23s
user 102m10s
sys 11m21s

Not very impressive. By comparison, a build within VMware on OSX gives me:

real 7m15s
user 23m5s
sys 2m45s

But remember that storage for this VM is NFS-based. It is also not “native”, I used a VMDK format.

A few tests with the VMs

So I tried to create a second VM that would be more standard, using the local disk as storage. That began well, but at VM start time, I got a rather ominous message complaining¬†about some internal error. And then, next attempt stated that there wasn’t enough memory to start the VM. I have 16G on the host, 2G per VM, 2 VMs, that should do it. But indeed, the system monitor shows that I’m at 13.7G out of 15.6G. Yet when I look at processes, the topmost process is virt-manager with 254M.

Meanwhile, my initial VM, the one that had successfully completed a Linux build, hung. The rest of the system seems to work, but I can’t do anything with that VM anymore. I’d like to keep the configuration of the VM, but there is no “Save” button, only “Begin Installation”, which won’t happen.

After a few minutes of investigation, my bad experience turned out to be little nothings that could probably be easily fixed:

  1. Virtual Machines Manager (VMM)¬†resets memory usage to the maximum allocated on reboot. So my VMs had 12G max, 2G used, but at reboot, they are at 12G allocated. In other words, the “balloon driver” or equivalent does not inflate at boot. Probably some option I don’t know about yet.
  2. I hit the “pause” button hoping to free the memory used by the VM. But it does not save the VM to disk¬†like the “Suspend” I saw in other VM software. Instead, it pauses it apparently in memory, with the whole memory still blocked by the VM.
  3. When you pause a VM, there is no graphical indication whatsoever on the screen, except for a hard to see “pause” button. Many other VM softwares dim the screen to let you know. So after pausing my VM and doing some other stuff in the background, I forgot to unpause it and deduced the VM was stuck.

Trying an install of everything I want to build Linux:

dnf install emacs ncurses-devel openssl-devel elfutils-libelf-devel

Some serious failure from that, complaining about conflicts between installed packages and what I am installing. Trying dnf update gives me

You probably have corrupted RPMDB, running rpm –rebuilddb’ might fix the issue

Doing that, and I get

error: rpmdb: BDB0134 read: 0x55b4825e5270, 4096: Input/output error
error: db5 error(5) from dbcursor->c_get: Input/output error

I have some rather funny messages in dmesg about “zapping shadow pages for mmio generation wraparound”, some issues about “unhandled rdmsr” (machine specific registers, probably nothing to do with I/Os), and a few messages about virbr0 going up and down. No clear sign of a host I/O error (i.e. bad disk).

But after that, my dnf fails to sync:

Error: Failed to synchronize cache for repo ‘fedora’

The good thing about this kind of error messages is that, since they are text, Google knows how to find them. It seems from what I find that this could be a simple network issue. But Firefox works well.

Running with dnf -d 10 install emacs gives very little useful information to diagnose the problem. It says that file “repomd.xml” was not found in metalink. The metalink looks like¬†https://mirrors.fedoraproject.org/metalink?repo=updates-release-f$releasever&arch=x86_64. If I try to fetch that using wget, replacing $releasever with 25, I get a local metalink file, with what looks like valid data in it. So it is likely that something is botched with either¬†$releasever, or with the way dnf downloads the file.

Let’s try to reproduce that with my other VM. But first, snapshot with btrfs subvolume snapshot / /snapshot-2017-01-18, just in case‚Ķ I love btrfs for that.

Not reproducing. OK, I won’t waste hours on this, it’s probably simpler to just reinstall the machine from scratch, given that I had practically nothing on it.

Building Spice for Mac, finally

Following the instructions. They are a bit old, but that seems to work well:

  1. sudo cpan Text::CSV
  2. git clone git://anongit.freedesktop.org/spice/spice-jhbuild
  3. git checkout osx
  4. Edit file spice-jhbuild/spice-osx-build-setup.sh to change value of $SOURCE.
  5. Run it. It complains about not finding autoconf, automake and gettext.
  6. Add ~/.local/bin to PATH for convenience
  7. Run jhbuild sysdeps --install. It complains again about automake, and that it does not know how to install on this system. Time to brew install everything on that machine.
  8. Run jhbuild bootstrap. This takes a while.
  9. Run jhbuild build. This is also not entirely instantaneous.

Installing automake, autoconf, gettext and yelp-tools. The last one takes a really long time to install.


The machine is busy, time for end of day.


Author: Christophe de Dinechin

I try to change the world, but that's work in progress. If you want to know me, google "Christophe de Dinechin". Keywords: concept programming, virtualization, OS design, programming languages, video games, 3D, modern physics. Some stuff I did that I'm proud of: the first "true" 3D game for the PC, HP's big iron virtualization, real-time test systems for car electronics, some of the best games for the HP48 calculator, a theory of physics that makes sense (at least to me).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s