Bug 238518

Summary: make buildkernel fails due to a symlink (and/or zfs)
Product: Base System Reporter: Lorenzo Salvadore <salvadore>
Component: kernAssignee: freebsd-bugs mailing list <bugs>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: 12.0-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
log of make buildkernel none

Description Lorenzo Salvadore freebsd_committer 2019-06-12 09:39:33 UTC
Created attachment 205004 [details]
log of make buildkernel

Here is the setting:

- a ZFS filesystem zroot/usr/src-stable is mounted at /usr/src and contains sources for 12-STABLE r348980;
- a ZFS filesystem /zroot/usr/obj/usr/src-stable is mounted at /usr/obj/usr/src-stable;
- the file /usr/obj/usr/src is a symlink to /usr/obj/usr/src-stable.

make buildkernel fails with the error message reported in the attachement.

It might be useful to know that this setting is the result of the following old setting:

- a ZFS filesystem zroot/usr/src-stable is mounted at /usr/src-stable and contains sources for 12-STABLE, whatever revision;
- a ZFS filesystem /zroot/usr/obj/usr/src-stable is mounted at /usr/obj/usr/src-stable.

Getting back to the old setting solves the problem, but of course we should try to get the new setting to work too.
Moreover, using the old setting, if a softlink /usr/src to /usr/src-stable is created, I can execute make buildkernel successfully both from /usr/src and /usr/src-stable. If I execute it from /usr/src, I can read lines such as "Building /usr/obj/usr/src-stable..."