I recently decided to install VitaSDK on my Mac to dive into PS Vita homebrew development. While the
official installation instructions on the VitaSDK website are a great starting point, Apple Silicon
architecture introduces a few hurdles.
Here is my complete walkthrough on how I got everything compiling successfully, including the workarounds
for Apple Silicon...
I started by following the official guide, which went smoothly:
First, install wget and cmake via Homebrew.
Next, export the VITASDK environment variable and add it to your PATH.
Open your .zshrc file
and add these lines to the end:
(Remember to restart your terminal or run source ~/.zshrc to apply the changes.)
Then, clone the Vita Dev Package Manager (vdpm) and run the bootstrap script:
The next official step is to run sudo ./install-all.sh. However, when I did this, the script immediately failed, complaining that $VITASDK is not set. This happens because running sudo strips away your user's environment variables. You can bypass this in two ways:
1. Edit the install-all.sh file and hardcode export VITASDK="/usr/local/vitasdk" right after the set -c command.
2. Run the script with the -E flag, which tells sudo to preserve your environment variables:
With that sorted, the tool installed all the packages. I thought I was ready to go...
When I tried to build vita-savemgr, CMake complained. First, it warned me that compatibility with CMake versions older than 3.10 would be removed. I fixed this by opening my CMakeLists.txt file and adjusting the minimum version requirement:
(I also had to make this exact same version adjustment in vitasdk/share/vita.cmake on line 14).
Then came the real blocker: CMake told me I was missing libzstd.
Simply running brew install zstd wasn't enough because VitaSDK expects x86_64 libraries, but my default Homebrew installation was pulling ARM64 libraries for Apple Silicon. To fix this, I had to install a secondary version of Homebrew specifically for x86_64 under Rosetta 2.
Here is how to set up the x86_64 environment:
After redirecting CMake to the correct x86_64 library, everything finally clicked into place. I was able to build vita-savemgr successfully!