Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Nov 2018 20:40:50 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 233339] genassym.o build race
Message-ID:  <bug-233339-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233339

            Bug ID: 233339
           Summary: genassym.o build race
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: markj@FreeBSD.org

I occasionally hit a kernel build failure when building a kernel from scrat=
ch
(i.e., no -DKERNFAST or anything like that).  It manifests like this:

nm: 'genassym.o': No such file or directory
nm: 'genassym.o': No such file or directory
/usr/home/markj/src/freebsd-dev/sys/amd64/linux32/linux32_support.s:38:2:
error: expected relocatable expression
 movl $-EFAULT,%eax
 ^

At this point, if I go into the objdir for linux.ko, I see an empty assym.i=
nc
and no genassym.o.  In kmod.mk we have:

480 assym.inc: genassym.o
481 offset.inc: genoffset.o
482 assym.inc: ${SYSDIR}/kern/genassym.sh
483         sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET}
484 genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc
485 genassym.o: ${SRCS:Mopt_*.h}
486         ${CC} -c ${CFLAGS:N-flto:N-fno-common} \
487             ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c
488 offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o
489         sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET}
490 genoffset.o: ${SYSDIR}/kern/genoffset.c
491 genoffset.o: ${SRCS:Mopt_*.h}
492         ${CC} -c ${CFLAGS:N-flto:N-fno-common} \
493             ${SYSDIR}/kern/genoffset.c

So, we *should* have compiled genassym.c before invoking genassym.sh (which=
 is
where the nm(1) error above comes from), but that's not happening.  The pro=
blem
seems to be that the dependency is satisfied by the kernel's genassym.o, wh=
ich
is generated very early during the kernel build, so when building modules we
don't wait for the module's genassym.o to be created.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-233339-227>