A few weeks ago I finally switched to using a pure 64-bit environment on my home workstation: NetBSD/sparc64 3.0_BETA. Unlike many operating systems that run on 64-bit CPUs, NetBSD/sparc64 is 64-bit only. This means that every executable on the system is by default compiled as 64-bit, unlike Solaris and Linux, for example, both of which have primarily 32-bit userlands with some 64-bit executables and libraries.

After the switch, I discovered that a lot of programmers assume 32-bit longs, and a lot of these bugs are still waiting to be tickled. For example, XFree86′s Render extension makes such assumptions, causing a nasty X server crash when rendering certain glyphs. NetBSD developer Michael Lorenz sent me a patch that I’m using as a workaround, but there are many other such bugs awaiting discovery.

Even Firefox is not immune. On startup, I get the following, followed by a bus error:

(firefox-bin:4305): Gdk-WARNING **: gdk_property_get(): length value has wrapped
in calculation (did you pass G_MAXLONG?)

Luckily, most things work – I haven’t had any issues with any of the non-X11 software I use (I already have a NetBSD/sparc64 machine acting as my mail server and proxy), and most of the X11 software I use does work. Unfortunately, Firefox doesn’t, so I have to resort to running it remotely on a 32-bit system and displaying it locally.

I can’t help but wonder how much this lack of portability has been exacerbated by the Linux/x86 monoculture…