I have /usr/src on a readonly nfs mount. Trying to build an xdev toolchain: ruben@localhost:/usr/src % sudo make -s TARGET=arm TARGET_ARCH=armv6 xdev Results in: ===> lib/libexpat (buildincludes) unifdef -U__VMS < /usr/src/lib/libexpat/../../contrib/expat/lib/expat.h | sed -e 's/XmlParse_INCLUDED/_BSD_XML_H_/' -e 's/COPYING/src\/contrib\/expat\/COPYING/' -e 's/expat_external/bsdxml_external/' > bsdxml.h /bin/sh: cannot create bsdxml.h: Read-only file system
Adding Sean/Warner because this bug might be of interest...
I believe that this was a bug in make that has since been corrected. We don't write to the source directory after it was fixed. I recall it being a problem years ago, but haven't seen reports of it in a long time. Just now, I cloned a tree into a new ZFS dataset. I then made that read-only and did a buildworld, buildkernel and then a make xdev-build for TARGET_ARCH=armv7 successfully. While not NFS, this type of error would be the same on this arrangement.