As discovered later on IRC, this happens when the passwd's shell isn't bash (only bash sets SHELL in its env, dash, zsh, and posh don't); I was using zsh in my passwd, chsh-ing to bash fixed the build. -- Loïc Minier