The Jenkins instance is hosted on a different server and is currently connected to several linux slaves that build properly. It's just the macos slave that has the issue.
It seems to be slow in both qmake and make steps.
We just found a solution that requires us to switch the user to itself before running the command.
sudo -u <loggedinuser> -i bash /script/containging/build/commands.shI'm not sure why this has to be done since we are already logged in as the user that we are switching to. My guess is that Apple enables certain restrictions for remote users.