Mailing List Archive

glibc fails to compile for lack of stddef.h that is present
Oddity: I have multiple gentoo systems here happily using the
kernel headers, including stddef.h.

One of them, screwed up in a variety of other ways, blows up building
glibc for lack of an extant header file:

# ls -l /usr/include/linux/stddef.h;
-rw-r--r-- 1 root root 131 Sep 12 22:40 /usr/include/linux/stddef.h

i.e., the header is there.
Checking, I've built glibc before:

# emerge --search sys-libs/glibc

[ Results for search key : sys-libs/glibc ]
Searching...

* sys-libs/glibc
Latest version available: 2.32-r6
Latest version installed: 2.32-r1
Size of files: 21,811 KiB
Homepage: https://www.gnu.org/software/libc/
Description: GNU libc C library
License: LGPL-2.1+ BSD HPND ISC inner-net rc PCRE

[ Applications found : 1 ]

But emerge blows up:

root@steamer:package.use # emerge =sys-libs/glibc-2.32-r1;
Calculating dependencies... done!

emerge: there are no ebuilds to satisfy "=sys-libs/glibc-2.32-r1".
root@steamer:package.use # emerge sys-libs/glibc;
Calculating dependencies... done!

>>> Verifying ebuild manifests
>>> Running pre-merge checks for sys-libs/glibc-2.32-r6
* Checking general environment sanity.
make -j4 glibc-test CC=x86_64-pc-linux-gnu-gcc
x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -Wl,-O1 -Wl,--as-needed glibc-test.c -o glibc-test
In file included from glibc-test.c:1:
? /usr/include/unistd.h:226:10: fatal error: stddef.h: No such file or directory
? 226 | #include <stddef.h>
? | ^~~~~~~~~~
? compilation terminated.
make: *** [<builtin>: glibc-test] Error 1
emake failed

So far as I know /usr/include/linux is on the standard -I path,
or am I missing something?


# emerge --info sys-libs/glibc;
Portage 3.0.1 (python 3.6.12-final-0, default/linux/amd64/17.1, gcc-9.3.0, glibc-2.32-r1, 5.6.13-gentoo.av x86_64)
=================================================================
System Settings
=================================================================
System uname: Linux-5.6.13-gentoo.av-x86_64-Intel-R-_Core-TM-_i7-7500U_CPU_@_2.70GHz-with-gentoo-2.7
KiB Mem: 16060584 total, 1608000 free
KiB Swap: 33425404 total, 33425404 free
Timestamp of repository gentoo: Sun, 14 Feb 2021 16:00:01 +0000
Head commit of repository gentoo: 4ceda2219fdacd7a7095774c7485ffe378f8d550
sh bash 5.0_p18
ld GNU ld (Gentoo 2.34 p4) 2.34.0
app-shells/bash: 5.0_p18::gentoo
dev-lang/perl: 5.30.3-r1::gentoo
dev-lang/python: 2.7.18-r2::gentoo, 3.6.12::gentoo, 3.7.7-r2::gentoo, 3.8.3::gentoo, 3.9.0_beta1::gentoo
dev-util/cmake: 3.17.3::gentoo
dev-util/pkgconfig: 0.29.2::gentoo
sys-apps/baselayout: 2.7-r1::gentoo
sys-apps/openrc: 0.41.2::gentoo
sys-apps/sandbox: 2.20::gentoo
sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake: 1.13.4-r2::gentoo, 1.16.2::gentoo
sys-devel/binutils: 2.34-r1::gentoo
sys-devel/gcc: 9.2.0-r3::gentoo, 9.3.0::gentoo
sys-devel/gcc-config: 2.3.2::gentoo
sys-devel/libtool: 2.4.6-r6::gentoo
sys-devel/make: 4.3::gentoo
sys-kernel/linux-headers: 5.8::gentoo (virtual/os-headers)
sys-libs/glibc: 2.32-r1::gentoo
Repositories:

gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
sync-rsync-verify-max-age: 24
sync-rsync-verify-jobs: 1
sync-rsync-verify-metamanifest: yes
sync-rsync-extra-opts:

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="rsync://rsync.us.gentoo.org/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X Xaw3d acl acpi alsa alsa-plugin amd64 bash-completion berkdb bluray bzip2 caps cdparanoia cleartype cli corefonts crypt cups dbus device-mapper dri elogind evdev ffmpeg foomatic fortran gcc4 gd gdbm gimp gsm gtk gzip iconv imap java jpeg libglvnd libtirpc lm_sensors lvm2 mad maildir md5sum mga mjpeg mp3 mpeg mtp multilib ncurses nls nptl ntfsdecrypt ntfsprogs ogg openmp openssl pam pcre perl png pnm ppm pulseaudio qt3support readline sasl scanner sdl seccomp speech; split-usr sqlite ssl svg tcpd tiff truetype type1 udev unicode upekbsapi vorbis x264 xanim xattr zeroconf zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default auth
z_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" L10N="utf8,en_US,en_US.utf8" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="
lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby26" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="intel i965;" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
Package Settings
=================================================================

sys-libs/glibc-2.32-r1::gentoo was built with the following:
USE="caps (crypt) gd multiarch (multilib) ssp (static-libs) -audit (-cet) -compile-locales -custom-cflags -doc -headers-only -nscd -profile (-selinux) -static-pie -suid -systemtap -test (-vanilla)" ABI_X86="(64)"
CFLAGS="-march=native -pipe -O2"
CXXFLAGS="-march=native -pipe -O2"
FEATURES="multilib-strict sandbox unknown-features-warn binpkg-dostrip pid-sandbox binpkg-logs usersandbox usersync ebuild-locks preserve-libs ipc-sandbox sfperms network-sandbox binpkg-docompress unmerge-logs parallel-fetch xattr qa-unresolved-soname-deps distlocks clean-logs merge-sync fixlafiles userpriv parallel-install unmerge-orphans assume-digests news protect-owned config-protect-if-modified strict userfetch"