Spice

installation

curl -O https://www.spice-space.org/download/releases/spice-server/spice-0.15.2.tar.bz2
tar -xjf spice-0.15.2.tar.bz2
cd spice-0.15.2

Apply macOS fixes (edit files with nano or your preferred editor):

  • In server/red-worker.cpp, comment out the line with pthread_setname_np(worker->thread, „SPICE Worker“); (add // at the start).
  • In server/red-stream.c and server/tests/test-websocket.c, add this line near the top (after includes):
#define MSG_NOSIGNAL 0x2000 /* don't raise SIGPIPE */

Search all Makefiles (e.g., via grep -r -l „\-Werror“ .) and remove -Werror flags to ignore warnings-as-errors.

grep -r -l "\-Werror" .

Check openssl:

ls /usr/local/opt | grep openssl
  • openssl
  • openssl@3
  • openssl@3.5

HERE WE CHOOSE „3“!!

Set environment variables for OpenSSL (adjust if your OpenSSL path differs):

export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig:$PKG_CONFIG_PATH"
export LDFLAGS="-L/usr/local/opt/openssl@3/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@3/include"

Configure, build, and install:

cd spice-0.15.2
./autogen.sh
./configure --prefix=/usr/local --disable-werror

check again for „-Werror“

find . -name 'Makefile' -exec sed -i '' 's/-Werror//g' {} \;
make -j$(sysctl -n hw.ncpu)
sudo make install

check:

pkg-config --modversion spice-server

If you hit errors (e.g., missing dependencies), ensure all Homebrew packages from step 1 are installed and retry.