building emacs 28 on jetpack 4.4 developer preview

By now all of this blog’s readers should realize that when I write about Nvidia’s Jetpack 4.4 Developer Preview (here-after called JP44), I mean the version of Ubuntu 18.04.4 with Nvidia’s software extensions and packages installed.

Earlier I installed all the bits and bobs necessary to build Visual Studio Code on JP44, and managed to get it up and running, mostly. That is, it would open and edit files, it handled syntax highlighting for the sources I cared about, and at least it allowed me to install two extensions. The big problem is that after that first extension installation, the extension list is now empty, meaning I can’t install any others. And I wrote I’d probably stick with it regardless.

Then I remembered I’d extended and configured both Vim and Emacs into very useful tools on my RPi4. I powered up the RPi4 and copied my Vim and Emacs configuration files over to the Jetson Nano and JP44. Easy, right?

For Vim there wasn’t an issue. Everything ran just fine. Emacs installed from the repo was different. I knew I had a problem when the following line in my .emacs file failed on startup with the local emacs:

(global-display-line-numbers-mode)

I checked the version of emacs installed on JP44, and sure enough, it was version 25, one major release back from the version installed on my RPi4 and Raspbian. No, I wasn’t going to change that line (and a few others) back to the older way of doing things. Instead I went over to the Project Emacs page on Savannah ( http://savannah.gnu.org/projects/emacs/ ), followed the directions there to clone from their GitHub repo hosted on Savanah, and went about the business of building an up-to-date emacs.

First time through I was missing a few needed development libraries. I got those installed, got a proper configuration, and then built it. When I fired it up I was horrified to see it was using old school X fonts on everything. Not an anti-aliased font in sight. That just sucked, so I starting looking at the configure output and installing all the necessary libraries emacs needed to support anti aliased fonts. The full list of necessary installs are:

  • texinfo
  • libxaw7-dev
  • libjpeg-dev
  • libpng-dev
  • libgif-dev
  • libtiff-dev
  • gnutls-dev
  • libncurses-dev
  • libfreetype6-dev
  • libcairo-dev

Some of those libraries are needed just to get configure to finish at all. They are listed in the order they were installed. After installing the freetype developer library I got the following interesting warning from configure:

configure: WARNING: This configuration uses libXft, which has a number offont rendering issues, and is being considered for removal in thenext release of Emacs.  Please consider using Cairo graphics +HarfBuzz text shaping instead (they are auto-detected if therelevant development headers are installed).

Ok. That’s when I installed libcairo-dev. After that it configured and then built. ‘make install’ puts the binary in /usr/local/bin. When I opened up emacs the second time, it was lovely to behold.

Fonts everywhere are nicely rendered and anti-aliased. You’ll note also that this is emacs version 28, which is fine by me. It works with Go, C/C++, Python, and bash, which is all I really need. I also noticed that emac’s memory footprint is tiny compared to VSCode. Which is ironic considering that in the days when men used Vaxen and 1MiB of memory was considered a luxury, emacs was frowned upon by sysadmins who didn’t like how too many emacs sessions could tax those mighty Vaxen. Now I run it on a $100 quad-core 64-bit computer with 4GiB of memory because it’s lean and mean compared to other equivalent tools. My how the times have changed.

a few clarifications on jetson nano b01

After playing around with the B01 board I went back to look at the software. It turns out that I inadvertently downloaded and installed Jetpack 4.4 Developer Preview:

Running jtop

If you want to know more about this version of the Jetson Nano Developer Kit software, there is this:

https://forums.developer.nvidia.com/t/jetpack-4-4-developer-preview-l4t-r32-4-2-released/120592

The Developer Preview seems to have some of its own oddities. For example, I discovered that Python’s pip wasn’t installed. Pip’s needed to install a set of tools I’ll talk about next. But in the mean time, you need to follow these directions to install pip for Python3:

https://pip.pypa.io/en/stable/installing/

Once pip is installed you need it to install a set of Python-based tools known as jetson_stats. Included in that collection is jtop. You can follow the directions on the GitHub repository here:

https://github.com/rbonghi/jetson_stats/wiki

Note that the latest Jetson Nano Developer Kit is still based on Ubuntu 18.04.4. I’ve looked around and it would appear that migrating to Ubuntu 20.04, the current LTS, is some ways off. Which for me isn’t a problem as there’s plenty to work with as is.