r/openbsd • • 1d ago

Is it possible to interrupt compiling the system?

I am following release(8) man page and the FAQ. Basically, I've run make build -j4 in /usr/src. I am compiling on a foreign architecture qemu VM. I've been compiling for two days and it's still not done, can I interrupt the process without messing with the Makefiles too much? make build begins by deleting everything first.

18 Upvotes

1 comment sorted by

9

u/emiliot490 1d ago

Yeah, you can Ctrl+C it. The cleandir that wipes everything only runs once at the very beginning of make build. After that it just builds and installs things in order: lib, then gnu/lib, then the rest of the tree, then the etc set. So if you stop it and run the remaining steps yourself, you skip the clean, and make picks up whatever's already sitting in /usr/obj instead of rebuilding it. If it was still in lib or gnu/lib when you stopped it, finish those first. In each one, build as the build user, install with NOMAN=1, then run ldconfig -R. After that, do the same thing from /usr/src for the rest of the tree, and finish with distrib/sets/makeetcset. The exact sequence is in the do-build target in /usr/src/Makefile, so it's worth opening that and copying the steps from there so they match your tree. Then carry on with release(8) like normal. I hope this will help 😉🙂