Pi Zero W is a loss leader. That part can someday disappear. I agree spec wise its better but Onion is much better when handling network tasks IMO. Dual WiFi, 5 Ethernet Ports, etc. It's also PCB board solderable. If the Pi Zero W was PCB board solderable I would of went with that part.
In case anyone stumbled upon this issue or something related to this.
Since I do not have a linux machine, I decided to spin up a cheap 1cpu, 512MB ram, $5 digital ocean droplet to setup my toolchain and compile some code for the onion. The above issue occurred on a fresh ubuntu 16 and ubuntu 17 droplet. A friend did some googling and pointed out that these type of issues could be memory related and he was spot on.
After setting up 2GB swap space using this guide: Adding Space on Ubuntu the compile has completed successfully on both Ubuntu 16 and 17.
Hope this helps someone experiencing this frustration.