Date: Thu, 10 Nov 2022 00:32:17 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 267678] lang/gcc11: fatal error: sys/_types.h: No such file or directory building u-boot Message-ID: <bug-267678-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267678 Bug ID: 267678 Summary: lang/gcc11: fatal error: sys/_types.h: No such file or directory building u-boot Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: salvadore@freebsd.org Reporter: saper@saper.info Flags: maintainer-feedback?(salvadore@freebsd.org) Assignee: salvadore@freebsd.org I am running pretty fresh FreeBSD 14.0-CURRENT #3 main-75217c2b470: Sat Nov= 5 00:59:18 CET 2022 and trying to build u-boot from source using the "sandbox" (userland process) target. I have gcc11 installed from packages: gcc11-11.3.0_2 Name : gcc11 Version : 11.3.0_2 Installed on : Mon Nov 7 17:26:32 2022 CET Origin : lang/gcc11 Architecture : FreeBSD:14:amd64 Prefix : /usr/local Categories : lang Licenses : GPLv3RLE and GPLv3 Maintainer : salvadore@FreeBSD.org WWW : https://gcc.gnu.org Comment : GNU Compiler Collection 11 Options : GRAPHITE : off LTO_BOOTSTRAP : on MULTILIB : on STANDARD_BOOTSTRAP: off $ git clone https://source.denx.de/u-boot/u-boot.git $ cd u-boot $ mkdir /big/build $ export KBUILD_OUTPUT=3D/big/build $ env LANG=3DC gmake sandbox_spl_defconfig V=3D1=20 gmake -C /big/build KBUILD_SRC=3D/big/sw/u-boot \ -f /big/sw/u-boot/Makefile sandbox_spl_defconfig gmake[1]: Entering directory '/big/build' gmake -f /big/sw/u-boot/scripts/Makefile.build obj=3Dscripts/basic cc -Wp,-MD,scripts/basic/.fixdep.d -Iscripts/basic -Wall -Wstrict-prototy= pes -O2 -fomit-frame-pointer -std=3Dgnu11 -o scripts/basic/fixdep /big/sw/u-boot/scripts/basic/fixdep.c=20=20=20 rm -f .tmp_quiet_recordmcount ln -fsn /big/sw/u-boot source /bin/bash /big/sw/u-boot/scripts/mkmakefile /big/sw/u-boot GEN Makefile gmake -f /big/sw/u-boot/scripts/Makefile.build obj=3Dscripts/kconfig sandbox_spl_defconfig cc -Wp,-MD,scripts/kconfig/.conf.o.d -Iscripts/kconfig -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -std=3Dgnu11 -c -o scripts/kconfig/conf.o /big/sw/u-boot/scripts/kconfig/conf.c bison -oscripts/kconfig/zconf.tab.c -t -l /big/sw/u-boot/scripts/kconfig/zconf.y flex -oscripts/kconfig/zconf.lex.c -L /big/sw/u-boot/scripts/kconfig/zcon= f.l cc -Wp,-MD,scripts/kconfig/.zconf.tab.o.d -Iscripts/kconfig -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -std=3Dgnu11=20 -I/big/sw/u-boot/scripts/kconfig -c -o scripts/kconfig/zconf.tab.o scripts/kconfig/zconf.tab.c cc -o scripts/kconfig/conf scripts/kconfig/conf.o scripts/kconfig/zconf.tab.o=20=20=20 scripts/kconfig/conf --defconfig=3Darch/../configs/sandbox_spl_defconfig K= config # # configuration written to .config # gmake[1]: Leaving directory '/big/build' $ cd /big/build $ > env LANG=3DC gmake V=3D1 gmake -C /big/sw/u-boot O=3D/big/build=20 gmake -C /big/build KBUILD_SRC=3D/big/sw/u-boot \ -f /big/sw/u-boot/Makefile=20 gmake -f /big/sw/u-boot/Makefile syncconfig gmake -f /big/sw/u-boot/scripts/Makefile.build obj=3Dscripts/basic rm -f .tmp_quiet_recordmcount ln -fsn /big/sw/u-boot source /bin/bash /big/sw/u-boot/scripts/mkmakefile /big/sw/u-boot GEN Makefile gmake -f /big/sw/u-boot/scripts/Makefile.build obj=3Dscripts/kconfig syncco= nfig scripts/kconfig/conf --syncconfig Kconfig gmake -f /big/sw/u-boot/scripts/Makefile.autoconf || \ { rm -f include/config/auto.conf; false; } set -e; mkdir -p include/; (echo "/* Automatically generated - do not = edit */"; echo \#define CONFIG_BOARDDIR board/sandbox; echo \#include \<config_uncmd_spl.h\>; echo \#include \<configs/"sandbox_spl".h\>; echo \#include \<asm/config.h\>; echo \#include \<linux/kconfig.h\>; echo \#incl= ude \<config_fallbacks.h\>;) < /big/sw/u-boot/scripts/Makefile.autoconf > include/config.h.tmp; if [ -r include/config.h ] && cmp -s include/config.h include/config.h.tmp; then rm -f include/config.h.tmp; else : ' UPD=20=20= =20=20 include/config.h'; mv -f include/config.h.tmp include/config.h; fi gcc -E -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding -std=3Dgnu11 -fshort-wchar -fno-strict-aliasing -fno-PIE -fno-stack-protector -fno-delete-null-pointer-checks -Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-maybe-uninitialized -fmacro-prefix-map=3D/big/sw/u-boot/=3D -g -fstack-usage -Wno-format-nonlit= eral -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=3Ddate-t= ime -Wno-packed-not-aligned -D__KERNEL__ -D__UBOOT__ -D__SANDBOX__ -U_FORTIFY_SOURCE -fPIC -I/usr/local/include/SDL2 -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE -pipe -Iinclude -I/big/sw/u-boot/include -I/big/sw/u-boot/arch/sandbox/include -include /big/sw/u-boot/include/linux/kconfig.h -nostdinc -isystem /usr/local/lib/gcc11/gcc/x86_64-portbld-freebsd14.0/11.3.0/include=20 -DDO_DEPS_ONLY -dM /big/sw/u-boot/include/common.h > u-boot.cfg.tmp && { gr= ep 'define CONFIG_' u-boot.cfg.tmp | sed '/define CONFIG_IS_ENABLED(/d;/define CONFIG_IF_ENABLED_INT(/d;/define CONFIG_VAL(/d;' > u-boot.cfg; rm u-boot.cfg.tmp; } || { rm u-boot.cfg.tmp; false; } In file included from /big/sw/u-boot/include/compiler.h:8, from /big/sw/u-boot/include/env_internal.h:77, from /big/sw/u-boot/include/common.h:31: /usr/local/lib/gcc11/gcc/x86_64-portbld-freebsd14.0/11.3.0/include/stddef.h= :54:10: fatal error: sys/_types.h: No such file or directory 54 | #include <sys/_types.h> | ^~~~~~~~~~~~~~ compilation terminated. gmake[3]: *** [/big/sw/u-boot/scripts/Makefile.autoconf:82: u-boot.cfg] Err= or 1 gmake[2]: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'. Stop. gmake[1]: *** [Makefile:177: sub-make] Error 2 gmake: *** [Makefile:15: __sub-make] Error 2 Simple way to reproduce it without using u-boot: $ printf "#include <stddef.h>\nmain(){}" > a.c $ gcc11 -nostdinc -isystem /usr/local/lib/gcc11/gcc/x86_64-portbld-freebsd14.0/11.3.0/include -E -c a= .c The output is: # 0 "a.c" # 0 "<built-in>" # 0 "<command-line>" # 1 "a.c" # 1 "/usr/local/lib/gcc11/gcc/x86_64-portbld-freebsd14.0/11.3.0/include/stddef.= h" 1 3 4 In file included from a.c:1: /usr/local/lib/gcc11/gcc/x86_64-portbld-freebsd14.0/11.3.0/include/stddef.h= :54:10: fatal error: sys/_types.h: No such file or directory 54 | #include <sys/_types.h> | ^~~~~~~~~~~~~~ compilation terminated. Shall we have enough includes to support such a compilation with -isystem ? -c a.c --=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-267678-7788>