Finally back in the game

Wednesday, October 4, 2017

I am finally feeling like I'm back in the game.

macOS spice client

If I enable libjpeg-turbo, I get a jpeg version mismatch. If I disable it, then the software works, but with the default build settings, I get:

channel-display-mjpeg.c:117:2: error: "You should consider building with
      libjpeg-turbo" [-Werror,-W#warnings]

#warning "You should consider building with libjpeg-turbo" ^ 1 error generated.

Thinking more about it, I believe that a #warning should not be turned into an error. If the programmer wanted an error, he would have written #error. Will submit a patch.

But then that suggest I used autoreconf. Which no longer works:

> autoreconf -vfi

autoreconf: Entering directory `.' autoreconf: running: autopoint --force Can't exec "autopoint": No such file or directory at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 345.

The solution according to this issueis to install gettext, which is not entirely obvious. So the updated list of dependencies if I also want to be able to regenerate the configure becomes:

brew install pkg-config autotools gettext pixman gtk+3 gstreamer gstreamermm libjpeg-turbo gst-plugins-good gst-plugins-bad gst-libav

Except it does not work. I already had gettext 0.19.8.1. And brew search autopoint gives me nothing.

Ah, but I'm running purposely without my env.sh enabled, so that means I have to explicitly add it to the path for autreconf to work. A bit yucky, but at least that tells me when I need that path exactly.

PATH=$PATH:/usr/local/Cellar/gettext/0.19.8.1/bin autoreconf -vfi

Still fails:

spice-gtk> PATH=$PATH:/usr/local/Cellar/gettext/0.19.8.1/bin autoreconf -vfi

autoreconf: Entering directory `.' autoreconf: running: autopoint --force autoreconf: running: aclocal -I m4 --output=aclocal.m4t Can't exec "aclocal": No such file or directory at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 326. autoreconf: failed to run aclocal: No such file or directory

There is no aclocal binary, I can't find one with brew search. Trying if installing automake gets me something. Nope. Uninstalling, since I'm trying to figure out exactly what I need) This discussion suggests that I might need libtool, but I already have it.

Ah. Finally found it. It's in automake, but it's in the Cellar (that directory where homebrew stores things that are possibly conflicting with Apple versions). I did not expect it there since there is no aclocal from Apple that I know of.

spice-gtk> brew list automake

/usr/local/Cellar/automake/1.15.1/bin/aclocal /usr/local/Cellar/automake/1.15.1/bin/aclocal-1.15 /usr/local/Cellar/automake/1.15.1/bin/automake /usr/local/Cellar/automake/1.15.1/bin/automake-1.15 /usr/local/Cellar/automake/1.15.1/share/aclocal/ (2 files) /usr/local/Cellar/automake/1.15.1/share/aclocal-1.15/ (33 files) /usr/local/Cellar/automake/1.15.1/share/automake-1.15/ (76 files) /usr/local/Cellar/automake/1.15.1/share/doc/automake/amhello-1.0.tar.gz /usr/local/Cellar/automake/1.15.1/share/info/ (4 files) /usr/local/Cellar/automake/1.15.1/share/man/ (4 files)

So that means I just need to update my PATH for autoreconf with one additional Cellar path:

PATH=$PATH:/usr/local/Cellar/gettext/0.19.8.1/bin:/usr/local/Cellar/automake/1.15.1/bin autoreconf -vfi

Now it finds aclocal but fails with:

spice-gtk> PATH=$PATH:/usr/local/Cellar/gettext/0.19.8.1/bin:/usr/local/Cellar/automake/1.15.1/bin autoreconf -vfi

autoreconf: Entering directory `.' autoreconf: running: autopoint --force autoreconf: running: aclocal --force -I m4 aclocal: error: aclocal: file 'm4/intltool.m4' does not exist autoreconf: aclocal failed with exit status: 1

That error is strange, becasue the file is there and it exists. Ah, but it's a link to /usr/local/Cellar/intltool/0.51.0/share/aclocal/intltool.m4. So that's yet another tool to install: brew install intltool. Same problem with gtk-doc. Except that the link I have is to 1.25, and brew installed 1.26, so I get:

autoreconf: running: aclocal --force -I m4
Use of uninitialized value $msg in concatenation (.) or string at /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1026.
Use of uninitialized value $stacktrace in pattern match (m//) at /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1026.
unknown channel m4trace: -1- AS_VAR_APPEND(ac_configure_args, " '$ac_arg'")
 at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/Channels.pm line 638.
	Autom4te::Channels::msg('m4trace: -1- AS_VAR_APPEND(ac_configure_args, " '$ac_arg'")x{a}', undef, 'warning: ', 'partial', 0) called at /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1026
aclocal: error: echo failed with exit status: 1
autoreconf: aclocal failed with exit status: 1

In any case, that brings the total of things to install to:

brew install pkg-config autoconf automake gettext intltool pixman gtk+3 gtk-doc gstreamer gstreamermm libjpeg-turbo gst-plugins-good gst-plugins-bad gst-libav

Brew package

Began writing a homebrew package for Spice with the information I gathered about the dependencies.

Bugzilla

Tried to reproduce Red Hat Bugzilla 1497446. First attempt in VMware did not reproduce the issue.