The problem was that I was building locally and manually moving the contents of the install_isolated directory to /opt/ros/hydro/, with the result that my paths were not properly configured and packages not properly installed. When I wiped out my installation entirely and rebuilt using the --install-space flag, everything worked fine and didn't give any errors.