Subject: Re: objdirs and readonly /usr/src
To: NetBSD Current <>
From: Dick Davies <>
List: current-users
Date: 02/21/2004 18:38:41
Johnny Billquist wrote:
> On Sat, 21 Feb 2004, Valeriy E. Ushakov wrote:
>>On Sat, Feb 21, 2004 at 09:25:20 +0000, Dick Davies wrote:
>>>I mount /usr/src readonly over NFS to my current box.
>>>When I try to build tools, I get this error:
>>> cc  -O -o nbmake *.o
>>> #    objdir  /usr/obj/tools
>>> ln: obj: Read-only file system
>>>Which I assume is because can't make symlinks in /usr/src.
>>>Have I missed something?
>>>I'm starting to think rsync would be less hassle :)
>>Hmm, I build from readonly sources all the time.  What do you have in
>>your mk.conf?   Sounds like you have some *OBJ* var set in there.

Nope, and /usr/obj is local and writable too:

0rasputin@dozer:rasputin$ cat /etc/mk.conf

(thats because I can't write to pkgsrc/distfiles either...)

0rasputin@dozer:rasputin$ mount
/dev/wd0a on / type ffs (local)
kernfs on /kern type kernfs (local)
lb.tenfour:/usr/src on /usr/src type nfs (read-only)
lb.tenfour:/usr/pkgsrc on /usr/pkgsrc type nfs (read-only)

I've just tried a

./ -M /usr/obj tools and that seems to be chugging away
merrily so I'll see how that goes. Whats the equivalent mk.conf for
-M ?

> Once all the obj symlinks have been created, you don't need write access
> to /usr/src, but in order to set things up, you do need write access.
> I'd suggest that the person who have this problem just do a "make obj" on
> the maching exporting the file system. That machine should have write
> access, and after this, other machines don't need to create the symlink.

I thought of that.
But on the NFS clients all those symlinks point nowhere...