Saturday, June 7, 2014

Compiling mosh-chrome on 64-bit Ubuntu 14.04

mosh-chrome is great. For me, it addresses the last major feature that's keeping me from just using a light, cheap Chromebook as my day-to-day laptop as opposed to some beautiful/grotesque beast like a Thinkpad.

Anyway, these are my notes from compiling mosh-chrome on a relatively stock 64-bit (amd64) Ubuntu 14.04 machine:

  • Install the following packages: git subversion build-essential cmake autoconf libc6:i386 libstdc++6:i386 protobuf-compiler
    (Some of these are standard dev tools, some are 32-bit packages you won't get by default with a 64-bit dev toolchain, and there's one Google-specific tool thrown in there.)
  • pod2man gives an error when attempting to compile openssl. I wrote down a nasty workaround here last night. It's ugly but it worked for me.

That's it.

Compiling openssl 1.0.1g with Perl 5.18, the terrible way

[Edit: 2014-12-28: Newer versions of pod2man don't have this problem, apparently. The openssl issue has been closed, and this works for me now without the workaround below.]

It appears that openssl 1.0.1g doesn't compile with Perl 5.18 because the 5.18 of pod2man is stricter than previous versions, resulting in lots of errors like this:

cms.pod around line 457: Expected text after =item, not a number

There are patches ([1], [2], [3], plus the link above) that deal with this, but I couldn't find one that applied cleanly against openssl 1.0.1g.

In this particular case, I'm building openssl as a prerequisite for something else and won't be installing any manpages anywhere, so I actually don't care at all about building the documentation. So instead of actually fixing this, I just blanked out all the files:

$ echo "=pod" > ./../blank.pod
$ find . -name '*.pod' -exec 'cp' './../blank.pod' '{}' \;

This seems to be the simplest thing that works without modifying the build process at all or removing files, if one can't get any of the above patches to apply.

[Edited 2014-10-06 to simplify command for blanking pod files.]