If changing the C compiler does not fix your issue this patch helped me: https://github.com/pigoz/spring/commit/11804d2fd3dce75e9b236666739cdf5b40934abd
Simply locate the file on your system (find where spring is installed via bundle show spring) and manually make the change.