NASA Insignia
Site Title

Building Nonpareil as arm64-native for macOS

20 Aug 2026
David Friedlander, NASA/GSFC

Nonpareil is a set of X11 calculators reproducing classic HP RPN calculators from the 1980s. One can find versions online, but they are not arm64-native for Macs.

However it turns out that there is a MacPorts package for this. Unfortunately, it does not build. However ChatGSFC/Gemini quickly solved the problem (having to do with libxml2 changing its header files).
Thus we prepend two additional header lines before <libxml/SAX.h> in state_read.c.

Documenting it here:

% port clean nonpareil
% port patch nonpareil
% sh -c 'perl -pi -e "s|#include <libxml/SAX.h>| \
#include <libxml/parser.h>\n\#include \n#include <libxml/SAX.h>|" \
    $(port work nonpareil)/nonpareil-*/src/state_read.c'
% port install nonpareil

This ends up with double-clickable XQuartz apps in /Applications/MacPorts/nonpareil/.


David Friedlander
20 August 2026, HTML version: 14 October 2026