Troubleshooting & How-Tos 📡 🏷️ 🔍 Linux

Compiling Classic UMN Gopher on Modern Linux

When I started re-exploring Gopher last month, I was surprised to discover that Debian still ships a terminal-based gopher client! And it’s the original University of Minnesota client, updated to keep compatible with modern Linux! And it’s surprisingly user-friendly.

Debian

Just install it with apt.

sudo apt install gopher

If you want to compile it from source, 3.0.19 builds fine on Trixie without any changes. (Obviously you need to have gcc and the ncurses dev packages and so forth.)

Fedora (and probably other glibc distros)

Of course I wanted to run it on my main Fedora desktop and my Alpine cloud servers too, and was frustrated to find that it wouldn’t even compile. On any of them.

I tried a bunch of things that didn’t work, until I noticed that the latest Debian and Fedora releases ship with different versions of gcc. Compatibility changes in gcc 15 turned out to be the issue: GCC 14 compiles C according to -std=gnu17 by default, and GCC 15 defaults to -std=gnu23. So I just had to tell configure to tell gcc to use the older C standard.

This worked on Fedora 44 (running bash) with the gopher-release-3.0.19 source:

export CFLAGS='-g -O2 -std=gnu17'
./configure
make
sudo make install

Alpine Linux

I haven’t gotten it building on Alpine yet. I assume there are more musl/glibc differences to deal with. This gets it a little further into the build process, but it’s still kicking back errors.

export CFLAGS='-g -O2 -std=gnu17 -D_GNU_SOURCE'

Setting it aside for now. I’ll come back to it some other time.