Actually, it does not depend on OS. If your look at the section above the final build status of each module, you will see error message which will give you complete understanding of what is going wrong:
[ERROR] Picked up JAVA_TOOL_OPTIONS: -Xmx4096m -XX:MaxPermSize=2048m -Xms4096m
[ERROR] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=2048m; support was removed in 8.0
[INFO] Error occurred during initialization of VM
[INFO] Initial heap size set to a larger value than the maximum heap size
So, one of the way to fix this problem is to run next command in your terminal:
$ unset JAVA_TOOL_OPTIONS
But note that in such case you will remove JAVA_TOOL_OPTIONS only from current shell session. To completely remove it try to find this variable in .bashrc or .profile files in your home directory and remove it from there.