https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90379
Bug ID: 90379 Summary: Gcc 9.1 fails "make check" on linux due to missing MacOS-specific header file Product: gcc Version: 9.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: make_distclean at yahoo dot com Target Milestone: --- Hi I'm hitting a missing header when making the target 'check' in fixincludes: 'ucred.h' in $TESTBASE (which is pointing to gcc-9.1.0/fixincludes/tests/base). I can successfully compile (with gcc 8.3) gcc release 9.1 on x86_64-unknown-linux-gnu. Then, the output of 'make check' in my_build_dir/fixincludes looks like this: --- snip --- autogen -T ../../fixincludes/check.tpl ../../fixincludes/inclhack.def /bin/sh ./check.sh ../../fixincludes/tests/base Fixed: testing.h Fixed: testing.h Fixed: alloca.h Fixed: ansi/math.h Fixed: ansi/stdlib.h Fixed: arch/i960/archI960.h Fixed: architecture/ppc/math.h Fixed: assert.h Fixed: AvailabilityInternal.h Fixed: AvailabilityMacros.h Fixed: bits/fenv.h Fixed: bits/huge_val.h Fixed: bits/string2.h Fixed: bsd/libc.h Fixed: c_asm.h Fixed: com_err.h Fixed: complex.h Fixed: ctrl-quotes-def-1.h Fixed: ctype.h Fixed: curses.h Fixed: errno.h Fixed: fcntl.h Fixed: features.h Fixed: fixinc-test-limits.h Fixed: hsfs/hsfs_spec.h Fixed: i386/setjmp.h Fixed: ia64/sys/getppdp.h Fixed: inttypes.h Fixed: ioLib.h Fixed: io-quotes-def-1.h Fixed: iso/math_c99.h Fixed: iso/math_iso.h Fixed: iso/stdio_iso.h Fixed: iso/stdlib_c99.h Fixed: iso/stdlib_iso.h Fixed: linux/vt.h Fixed: locale.h Fixed: mach-o/dyld.h Fixed: mach-o/swap.h Fixed: malloc.h Fixed: math.h Fixed: netdnet/dnetdb.h Fixed: net/if_arp.h Fixed: net/if.h Fixed: netinet/in.h Fixed: netinet/ip.h Fixed: obstack.h Fixed: os/trace.h Fixed: pixrect/memvar.h Fixed: pthread.h Fixed: regex.h Fixed: regexp.h Fixed: reg_types.h Fixed: rpc/auth.h Fixed: rpc/rpc.h Fixed: rpcsvc/rstat.h Fixed: rpcsvc/rusers.h Fixed: rpc/xdr.h Fixed: rtldef/decc$types.h Fixed: rtldef/if.h Fixed: rtldef/resolv.h Fixed: rtldef/setjmp.h Fixed: rtldef/signal.h Fixed: rtldef/stdio.h Fixed: rtldef/string.h Fixed: rtldef/wait.h Fixed: setjmp.h Fixed: signal.h Fixed: sparc/asm_linkage.h Fixed: spawn.h Fixed: stdarg.h Fixed: stdint-aix.h Fixed: stdint-darwin.h Fixed: stdint.h Fixed: stdint-hpux11.h Fixed: stdint-newlib.h Fixed: stdio.h Fixed: stdio_tag.h Fixed: stdlib.h Fixed: string.h Fixed: strings.h Fixed: sundev/vuid_event.h Fixed: sunwindow/win_lock.h Fixed: sym.h Fixed: sys/cdefs.h Fixed: sys/feature_tests.h Fixed: sys/file.h Fixed: sys/int_const.h Fixed: sys/int_limits.h Fixed: sys/_inttypes.h Fixed: sys/machine.h Fixed: sys/mman.h Fixed: sys/pthread.h Fixed: sys/signal.h Fixed: sys/socket.h Fixed: sys/spinlock.h Fixed: sys/stat.h Fixed: sys/sysmacros.h Fixed: sys/time.h Fixed: sys/types.h Fixed: sys/ucontext.h Fixed: sys/ucred.h Fixed: sys/wait.h Fixed: testing.h Fixed: tgmath.h Fixed: time.h Fixed: tinfo.h Fixed: types/vxTypesBase.h Fixed: unistd.h Fixed: X11/ShellP.h Fixed: X11/Xmu.h Fixed: Xm/BaseClassI.h Fixed: Xm/Traversal.h Newly fixed header: sys/ucred.h There were fixinclude test FAILURES make: *** [Makefile;177: check] Error 1 --- snip --- I'm not really sure how gcc-9.1.0/fixincludes/inclhack.def works, but 'mach' at line 1631 shouldn't match my host triplet x86_64-unknown-linux-gnu. But then again, none of the fixes for "*-*-darwin*" in inclhack.def should match yet they're all applied... As I don't understand why/how we need to fix includes from other OS'es, my quick&dirty hack was to just copy my_build_dir/fixincludes/tests/res/sys/ucred.h to $TESTBASE, which tricked check.sh. This failure is also mentioned in Bug 90330 but that bug was raised specifically for build failing on darwin. The ucred.h part seems to have been added to inclhack.def as part of git commit 62f180560c835a2f8402978c422448a35d9fe2b1, to fix bug 89864.