I also get the same error. I had to install premake for Fedora 40 which installed premake 5.
Built using the following...
cd build/workspaces
./clean-workspaces.sh
./update-workspaces.sh --with-system-premake5 --with-system-mozjs --enable-atlas
This worked for me!! Hope it helps.