Bug 233735 - Possible build race: genoffset.o /usr/src/sys/sys/types.h: error: machine/endian.h: No such file or directory
Summary: Possible build race: genoffset.o /usr/src/sys/sys/types.h: error: machine/end...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-02 21:31 UTC by Li-Wen Hsu
Modified: 2018-12-11 21:12 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Li-Wen Hsu freebsd_committer 2018-12-02 21:31:35 UTC
Failed runs:

https://ci.freebsd.org/job/FreeBSD-head-powerpc-build/8632/console
https://ci.freebsd.org/job/FreeBSD-stable-12-powerpc64-build/190/console
https://ci.freebsd.org/job/FreeBSD-head-riscv64-build/11547/console
https://ci.freebsd.org/job/FreeBSD-stable-12-aarch64-build/109/console
https://ci.freebsd.org/job/FreeBSD-head-armv6-build/2069/console
https://ci.freebsd.org/job/FreeBSD-head-armv7-build/1668/console

From console output, it looks that machine/ is read before or very closed of the time it is created:

00:07:35.870 --- genoffset.o ---
00:07:35.870 cc --sysroot=/usr/obj/usr/src/powerpc.powerpc/tmp -B/usr/obj/usr/src/powerpc.powerpc/tmp/usr/bin -c -O -pipe -g -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -msoft-float -fPIC -fno-omit-frame-pointer -MD -MF.depend.genoffset.o -MTgenoffset.o -mno-altivec -msoft-float -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-uninitialized -fms-extensions -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fms-extensions -Wa,-many -std=iso9899:1999 /usr/src/sys/kern/genoffset.c
00:07:35.870 In file included from /usr/src/sys/sys/param.h:97,
00:07:35.870                  from /usr/src/sys/kern/genoffset.c:35:
00:07:35.871 /usr/src/sys/sys/types.h:46:28: error: machine/endian.h: No such file or directory
00:07:35.871 In file included from /usr/src/sys/sys/types.h:47,
00:07:35.871                  from /usr/src/sys/sys/param.h:97,
00:07:35.871                  from /usr/src/sys/kern/genoffset.c:35:
00:07:35.871 /usr/src/sys/sys/_types.h:35:28: error: machine/_types.h: No such file or directory
00:07:35.871 In file included from /usr/src/sys/sys/types.h:47,
00:07:35.871                  from /usr/src/sys/sys/param.h:97,
00:07:35.871                  from /usr/src/sys/kern/genoffset.c:35:

...

00:07:35.871 --- machine ---
00:07:35.871 machine -> /usr/src/sys/powerpc/include
Comment 1 Li-Wen Hsu freebsd_committer 2018-12-05 18:13:27 UTC
https://ci.freebsd.org/job/FreeBSD-stable-12-i386-build/209/console

00:24:29.399 --- genoffset.o ---
00:24:29.399 cc -target i386-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/i386.i386/tmp -B/usr/obj/usr/src/i386.i386/tmp/usr/bin -c -O -pipe -g -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -MD -MF.depend.genoffset.o -MTgenoffset.o -mno-mmx -mno-sse -msoft-float -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 /usr/src/sys/kern/genoffset.c
00:24:29.399 In file included from /usr/src/sys/kern/genoffset.c:35:
00:24:29.399 In file included from /usr/src/sys/sys/param.h:96:
00:24:29.399 In file included from /usr/src/sys/sys/types.h:46:
00:24:29.399 ./machine/endian.h:6:10: fatal error: 'x86/endian.h' file not found
00:24:29.399 #include <x86/endian.h>
00:24:29.399          ^~~~~~~~~~~~~~
00:24:29.399 1 error generated.
00:24:29.404 *** [genoffset.o] Error code 1
00:24:29.404 
00:24:29.404 make[2]: stopped in /usr/obj/usr/src/i386.i386/sys/GENERIC
00:24:29.404 --- x86 ---
00:24:29.404 x86 -> /usr/src/sys/x86/include
00:24:29.407 --- machine ---
00:24:29.407 machine -> /usr/src/sys/i386/include
Comment 2 Mark Millard 2018-12-11 21:12:01 UTC
There was a list exchange tied to this back on 2018-Aug-31: Re: svn commit: r338404 - head/sys/conf . Ed Maste and Glen Baber were involved.

Note: -r338404 or anything near it was not likely to be the cause of the problem.

I reported then that:

https://ci.freebsd.org/job/FreeBSD-head-powerpc-build/7454/consoleText

showed the problem for -r339319 but the the prior and later builds
of -r339318 and -r338320 for powerpc did not show the problem. -r339319
was unlikely to be involved in the problem based on its content.

But I vaguely remember seeing this on a rare occasion for a much longer
time. (But I've no specific, public evidence to reference.)