I’ve only seen rare instances of this on Mac. I think the most recent encounter with this error on Catalina was in the thread Some models run without problems, but more complex give error: Error in unserialize(socklist[[n]]) : error reading/writing from connection - #12 by torkar. @torkar said that he was able to fix it by removing -march=native
from the Makevars file (in this case Makevars and not Makevars.win):
On my Catalina setup I haven’t had problems with this so my Makevars file looks like:
CXX14FLAGS=-O3 -march=native -mtune=native
CXX14FLAGS += -arch x86_64 -ftemplate-depth-256
but following @torkar’s recommendation you could drop -march=native
and try just
CXX14FLAGS=-O3 -mtune=native
CXX14FLAGS += -arch x86_64 -ftemplate-depth-256
You can open that file for editing using file.edit(file.path(Sys.getenv("HOME"), ".R", "Makevars"))
.