During build on Linux/amd64 (Ubuntu):

X11/Xlib.h -- libx11-dev
X11/extensions/XShm.h -- libxext-dev
sudo apt install libc6-dev-i386 libxext6:i386 libx11-dev:i386 libxext-dev:i386 libfontconfig1-dev:i386

During build on NetBSD/386 7.0:

X11/Xlib.h
pkg_add libX11

Post install

From inferno-os root:

mkdir tmp
mkdir -p usr/$USER/lib
cp usr/inferno/lib/plumbing usr/$USER/lib
cp usr/inferno/namespace usr/$USER