Summary: | sys-libs/glibc - emerge on profile 17.1 fails when "/usr/lib/include" (untracked by package manager) exists | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Laslo Hunhold <dev> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexander, dev, rzubaly, sam, slyfox, thomas |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=833620 | ||
Whiteboard: | 17.1 profiles | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 506276 | ||
Attachments: | build.log |
Description
Laslo Hunhold
2018-01-03 19:06:29 UTC
Looks like your gcc in -m32 mode searches for headers in nonexistent location. Let's check if gcc -m32 is working at all. Do both these commands succeed for you? $ echo '#include <stddef.h>' | gcc -x c -c -m32 - -o a.o $ echo '#include <stddef.h>' | gcc -x c -c - -o a.o (In reply to Sergei Trofimovich from comment #1) > Looks like your gcc in -m32 mode searches for headers in nonexistent > location. > > Let's check if gcc -m32 is working at all. Do both these commands succeed > for you? > > $ echo '#include <stddef.h>' | gcc -x c -c -m32 - -o a.o > $ echo '#include <stddef.h>' | gcc -x c -c - -o a.o /tmp $ echo '#include <stddef.h>' | gcc -x c -c -m32 - -o a.o /tmp $ echo $? 0 /tmp $ echo '#include <stddef.h>' | gcc -x c -c - -o a.o /tmp $ echo $? 0 Yes, this seems to work. (In reply to Laslo Hunhold from comment #2) > (In reply to Sergei Trofimovich from comment #1) > > Looks like your gcc in -m32 mode searches for headers in nonexistent > > location. > > > > Let's check if gcc -m32 is working at all. Do both these commands succeed > > for you? > > > > $ echo '#include <stddef.h>' | gcc -x c -c -m32 - -o a.o > > $ echo '#include <stddef.h>' | gcc -x c -c - -o a.o > > /tmp $ echo '#include <stddef.h>' | gcc -x c -c -m32 - -o a.o > /tmp $ echo $? > 0 > /tmp $ echo '#include <stddef.h>' | gcc -x c -c - -o a.o > /tmp $ echo $? > 0 > > Yes, this seems to work. That's unexpected. Let's try to explore the failure then. I presume the command was ran from directory: '/var/tmp/portage/sys-libs/glibc-2.26-r5/work/glibc-2.26/csu' And it was: gawk -f ../scripts/gen-as-const.awk ../sysdeps/x86/cpu-features-offsets.sym \ | x86_64-pc-linux-gnu-gcc -m32 -Wl,-O1 -Wl,--as-needed -S -o /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/cpu-features-offsets.hT3 -std=gnu11 -fgnu89-inline -O2 -Wall -Wundef -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -frounding-math -fstack-protector-all -march=native -pipe -Wstrict-prototypes -Wold-style-definition -mpreferred-stack-boundary=4 -ftls-model=initial-exec -U_FORTIFY_SOURCE -I../include -I/var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/csu -I/var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl -I../sysdeps/unix/sysv/linux/i386/i686 -I../sysdeps/i386/i686/nptl -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/x86/nptl -I../sysdeps/i386/nptl -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu/multiarch -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686/multiarch -I../sysdeps/i386/i686 -I../sysdeps/i386/fpu -I../sysdeps/x86/fpu/include -I../sysdeps/x86/fpu -I../sysdeps/i386 -I../sysdeps/x86 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/float128 -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/include -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed -isystem /usr/include -D_LIBC_REENTRANT -include /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h -DTOP_NAMESPACE=glibc -x c - \ -MD -MP -MF /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/cpu-features-offsets.h.dT -MT '/var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/cpu-features-offsets.h.d /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/cpu-features-offsets.h' Try to reproduce it by running it as-is in that directory. If it fails the same way add '-v' flag to gcc invocation, for example by changing ' -m32 ' to ' -m32 -v ' and post the output. I'm interested in headers directory list. (In reply to Sergei Trofimovich from comment #3) Sorry for the late response. > That's unexpected. Let's try to explore the failure then. > > I presume the command was ran from directory: > '/var/tmp/portage/sys-libs/glibc-2.26-r5/work/glibc-2.26/csu' > And it was: > [...] > Try to reproduce it by running it as-is in that directory. If it fails the > same way add '-v' flag to gcc invocation, for example by changing ' -m32 ' > to ' -m32 -v ' and post the output. I'm interested in headers directory list. Exactly! It failed the same way; With -v added, it gives the following output: Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/7.2.0/x86_64-pc-linux-gnu-gcc Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-7.2.0/work/gcc-7.2.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/7.2.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.2.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.2.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.2.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include/g++-v7 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/7.2.0/python --enable-languages=c,c++,go,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --disable-nls --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 7.2.0 p1.1' --disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --enable-vtable-verify --enable-libvtv --enable-lto --without-isl --enable-libsanitizer --enable-default-pie --enable-default-ssp Thread model: posix gcc version 7.2.0 (Gentoo 7.2.0 p1.1) COLLECT_GCC_OPTIONS='-m32' '-v' '-S' '-o' '/var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/cpu-features-offsets.hT3' '-std=gnu11' '-fgnu89-inline' '-O2' '-Wall' '-Wundef' '-Wwrite-strings' '-fmerge-all-constants' '-fno-strict-aliasing' '-frounding-math' '-fstack-protector-all' '-march=native' '-pipe' '-Wstrict-prototypes' '-Wold-style-definition' '-mpreferred-stack-boundary=4' '-ftls-model=initial-exec' '-U' '_FORTIFY_SOURCE' '-I' '../include' '-I' '/var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/csu' '-I' '/var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl' '-I' '../sysdeps/unix/sysv/linux/i386/i686' '-I' '../sysdeps/i386/i686/nptl' '-I' '../sysdeps/unix/sysv/linux/i386' '-I' '../sysdeps/unix/sysv/linux/x86' '-I' '../sysdeps/x86/nptl' '-I' '../sysdeps/i386/nptl' '-I' '../sysdeps/unix/sysv/linux/include' '-I' '../sysdeps/unix/sysv/linux' '-I' '../sysdeps/nptl' '-I' '../sysdeps/pthread' '-I' '../sysdeps/gnu' '-I' '../sysdeps/unix/inet' '-I' '../sysdeps/unix/sysv' '-I' '../sysdeps/unix/i386' '-I' '../sysdeps/unix' '-I' '../sysdeps/posix' '-I' '../sysdeps/i386/i686/fpu/multiarch' '-I' '../sysdeps/i386/i686/fpu' '-I' '../sysdeps/i386/i686/multiarch' '-I' '../sysdeps/i386/i686' '-I' '../sysdeps/i386/fpu' '-I' '../sysdeps/x86/fpu/include' '-I' '../sysdeps/x86/fpu' '-I' '../sysdeps/i386' '-I' '../sysdeps/x86' '-I' '../sysdeps/wordsize-32' '-I' '../sysdeps/ieee754/float128' '-I' '../sysdeps/ieee754/ldbl-96/include' '-I' '../sysdeps/ieee754/ldbl-96' '-I' '../sysdeps/ieee754/dbl-64' '-I' '../sysdeps/ieee754/flt-32' '-I' '../sysdeps/ieee754' '-I' '../sysdeps/generic' '-I' '..' '-I' '../libio' '-I' '.' '-nostdinc' '-isystem' '/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/include' '-isystem' '/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed' '-isystem' '/usr/include' '-D' '_LIBC_REENTRANT' '-include' '/var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc-modules.h' '-D' 'MODULE_NAME=libc' '-include' '../include/libc-symbols.h' '-D' 'TOP_NAMESPACE=glibc' '-MD' '-MP' '-MF' '/var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/cpu-features-offsets.h.dT' '-MT' '/var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/cpu-features-offsets.h.d /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/cpu-features-offsets.h' /usr/libexec/gcc/x86_64-pc-linux-gnu/7.2.0/cc1 -quiet -nostdinc -v -I ../include -I /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/csu -I /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl -I ../sysdeps/unix/sysv/linux/i386/i686 -I ../sysdeps/i386/i686/nptl -I ../sysdeps/unix/sysv/linux/i386 -I ../sysdeps/unix/sysv/linux/x86 -I ../sysdeps/x86/nptl -I ../sysdeps/i386/nptl -I ../sysdeps/unix/sysv/linux/include -I ../sysdeps/unix/sysv/linux -I ../sysdeps/nptl -I ../sysdeps/pthread -I ../sysdeps/gnu -I ../sysdeps/unix/inet -I ../sysdeps/unix/sysv -I ../sysdeps/unix/i386 -I ../sysdeps/unix -I ../sysdeps/posix -I ../sysdeps/i386/i686/fpu/multiarch -I ../sysdeps/i386/i686/fpu -I ../sysdeps/i386/i686/multiarch -I ../sysdeps/i386/i686 -I ../sysdeps/i386/fpu -I ../sysdeps/x86/fpu/include -I ../sysdeps/x86/fpu -I ../sysdeps/i386 -I ../sysdeps/x86 -I ../sysdeps/wordsize-32 -I ../sysdeps/ieee754/float128 -I ../sysdeps/ieee754/ldbl-96/include -I ../sysdeps/ieee754/ldbl-96 -I ../sysdeps/ieee754/dbl-64 -I ../sysdeps/ieee754/flt-32 -I ../sysdeps/ieee754 -I ../sysdeps/generic -I .. -I ../libio -I . -imultilib 32 -MD /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/cpu-features-offsets.d -MF /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/cpu-features-offsets.h.dT -MP -MT /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/cpu-features-offsets.h.d /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/cpu-features-offsets.h -U _FORTIFY_SOURCE -D _LIBC_REENTRANT -D MODULE_NAME=libc -D TOP_NAMESPACE=glibc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/include -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed -isystem /usr/include -include /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc-modules.h -include ../include/libc-symbols.h - -march=ivybridge -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -maes -mno-sha -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=ivybridge -quiet -dumpbase - -m32 -mpreferred-stack-boundary=4 -auxbase-strip /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/cpu-features-offsets.hT3 -O2 -Wall -Wundef -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -std=gnu11 -version -fgnu89-inline -fmerge-all-constants -fno-strict-aliasing -frounding-math -fstack-protector-all -ftls-model=initial-exec -o /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/cpu-features-offsets.hT3 GNU C11 (Gentoo 7.2.0 p1.1) version 7.2.0 (x86_64-pc-linux-gnu) compiled by GNU C version 7.2.0, GMP version 6.1.2, MPFR version 3.1.6, MPC version 1.0.3, isl version none GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 #include "..." search starts here: #include <...> search starts here: ../include /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl/csu /var/tmp/portage/sys-libs/glibc-2.26-r5/work/build-x86-x86_64-pc-linux-gnu-nptl ../sysdeps/unix/sysv/linux/i386/i686 ../sysdeps/i386/i686/nptl ../sysdeps/unix/sysv/linux/i386 ../sysdeps/unix/sysv/linux/x86 ../sysdeps/x86/nptl ../sysdeps/i386/nptl ../sysdeps/unix/sysv/linux/include ../sysdeps/unix/sysv/linux ../sysdeps/nptl ../sysdeps/pthread ../sysdeps/gnu ../sysdeps/unix/inet ../sysdeps/unix/sysv ../sysdeps/unix/i386 ../sysdeps/unix ../sysdeps/posix ../sysdeps/i386/i686/fpu/multiarch ../sysdeps/i386/i686/fpu ../sysdeps/i386/i686/multiarch ../sysdeps/i386/i686 ../sysdeps/i386/fpu ../sysdeps/x86/fpu/include ../sysdeps/x86/fpu ../sysdeps/i386 ../sysdeps/x86 ../sysdeps/wordsize-32 ../sysdeps/ieee754/float128 ../sysdeps/ieee754/ldbl-96/include ../sysdeps/ieee754/ldbl-96 ../sysdeps/ieee754/dbl-64 ../sysdeps/ieee754/flt-32 ../sysdeps/ieee754 ../sysdeps/generic .. ../libio . /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/include /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed /usr/include End of search list. GNU C11 (Gentoo 7.2.0 p1.1) version 7.2.0 (x86_64-pc-linux-gnu) compiled by GNU C version 7.2.0, GMP version 6.1.2, MPFR version 3.1.6, MPC version 1.0.3, isl version none GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: be889270f9d56816f14b353acf5e36b0 In file included from ../include/sys/types.h:1:0, from ../include/string.h:6, from ../sysdeps/gnu/ldsodefs.h:24, from ../sysdeps/unix/sysv/linux/ldsodefs.h:25, from <stdin>:2: ../posix/sys/types.h:145:10: fatal error: stddef.h: No such file or directory #include <stddef.h> ^~~~~~~~~~ compilation terminated. Aha! And for completeness the following outputs: $ echo '#include <stddef.h>' | gcc -x c -c -m32 -v - -o a.o $ ls -ld /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/include /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed (In reply to Sergei Trofimovich from comment #5) > Aha! And for completeness the following outputs: The output is as follows: > $ echo '#include <stddef.h>' | gcc -x c -c -m32 -v - -o a.o Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/7.2.0/gcc Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-7.2.0/work/gcc-7.2.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/7.2.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.2.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.2.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.2.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include/g++-v7 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/7.2.0/python --enable-languages=c,c++,go,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --disable-nls --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 7.2.0 p1.1' --disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --enable-vtable-verify --enable-libvtv --enable-lto --without-isl --enable-libsanitizer --enable-default-pie --enable-default-ssp Thread model: posix gcc version 7.2.0 (Gentoo 7.2.0 p1.1) COLLECT_GCC_OPTIONS='-c' '-m32' '-v' '-o' 'a.o' '-mtune=generic' '-march=x86-64' /usr/libexec/gcc/x86_64-pc-linux-gnu/7.2.0/cc1 -quiet -v -imultilib 32 - -quiet -dumpbase - -m32 -mtune=generic -march=x86-64 -auxbase-strip a.o -version -o /tmp/cc6LYq3R.s GNU C11 (Gentoo 7.2.0 p1.1) version 7.2.0 (x86_64-pc-linux-gnu) compiled by GNU C version 7.2.0, GMP version 6.1.2, MPFR version 3.1.6, MPC version 1.0.3, isl version none GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include /usr/local/include /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed /usr/include End of search list. GNU C11 (Gentoo 7.2.0 p1.1) version 7.2.0 (x86_64-pc-linux-gnu) compiled by GNU C version 7.2.0, GMP version 6.1.2, MPFR version 3.1.6, MPC version 1.0.3, isl version none GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: be889270f9d56816f14b353acf5e36b0 COLLECT_GCC_OPTIONS='-c' '-m32' '-v' '-o' 'a.o' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/as -v --32 -o a.o /tmp/cc6LYq3R.s GNU assembler version 2.29.1 (x86_64-pc-linux-gnu) using BFD version (Gentoo 2.29.1 p3) 2.29.1 COMPILER_PATH=/usr/libexec/gcc/x86_64-pc-linux-gnu/7.2.0/:/usr/libexec/gcc/x86_64-pc-linux-gnu/7.2.0/:/usr/libexec/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/32/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-c' '-m32' '-v' '-o' 'a.o' '-mtune=generic' '-march=x86-64' > $ ls -ld /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/include > /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed drwxr-xr-x 3 root root 4096 Sep 19 2014 /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/include drwxr-xr-x 2 root root 4096 Jan 9 15:54 /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed So yes, from what I noticed, the problem seems to be that it does not search in "/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include" during the glibc-emerge. Do you have any idea why that happens? (In reply to Laslo Hunhold from comment #6) > (In reply to Sergei Trofimovich from comment #5) > > Aha! And for completeness the following outputs: > > The output is as follows: > > > $ echo '#include <stddef.h>' | gcc -x c -c -m32 -v - -o a.o > > Using built-in specs. > COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/7.2.0/gcc > Target: x86_64-pc-linux-gnu > Configured with: > /var/tmp/portage/sys-devel/gcc-7.2.0/work/gcc-7.2.0/configure > --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr > --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/7.2.0 > --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include > --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.2.0 > --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.2.0/man > --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.2.0/info > --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include/g++-v7 > --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/7.2.0/python > --enable-languages=c,c++,go,fortran --enable-obsolete --enable-secureplt > --disable-werror --with-system-zlib --disable-nls --enable-checking=release > --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 7.2.0 p1.1' > --disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix > --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib > --with-multilib-list=m32,m64 --disable-altivec > --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp > --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx > --enable-vtable-verify --enable-libvtv --enable-lto --without-isl > --enable-libsanitizer --enable-default-pie --enable-default-ssp > Thread model: posix > gcc version 7.2.0 (Gentoo 7.2.0 p1.1) > COLLECT_GCC_OPTIONS='-c' '-m32' '-v' '-o' 'a.o' '-mtune=generic' > '-march=x86-64' > /usr/libexec/gcc/x86_64-pc-linux-gnu/7.2.0/cc1 -quiet -v -imultilib 32 - > -quiet -dumpbase - -m32 -mtune=generic -march=x86-64 -auxbase-strip a.o > -version -o /tmp/cc6LYq3R.s > GNU C11 (Gentoo 7.2.0 p1.1) version 7.2.0 (x86_64-pc-linux-gnu) > compiled by GNU C version 7.2.0, GMP version 6.1.2, MPFR version > 3.1.6, MPC version 1.0.3, isl version none > GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 > ignoring nonexistent directory > "/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/ > include" > #include "..." search starts here: > #include <...> search starts here: > /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include > /usr/local/include > /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed > /usr/include > End of search list. > GNU C11 (Gentoo 7.2.0 p1.1) version 7.2.0 (x86_64-pc-linux-gnu) > compiled by GNU C version 7.2.0, GMP version 6.1.2, MPFR version > 3.1.6, MPC version 1.0.3, isl version none > GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 > Compiler executable checksum: be889270f9d56816f14b353acf5e36b0 > COLLECT_GCC_OPTIONS='-c' '-m32' '-v' '-o' 'a.o' '-mtune=generic' > '-march=x86-64' > /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ > as -v --32 -o a.o /tmp/cc6LYq3R.s > GNU assembler version 2.29.1 (x86_64-pc-linux-gnu) using BFD version (Gentoo > 2.29.1 p3) 2.29.1 > COMPILER_PATH=/usr/libexec/gcc/x86_64-pc-linux-gnu/7.2.0/:/usr/libexec/gcc/ > x86_64-pc-linux-gnu/7.2.0/:/usr/libexec/gcc/x86_64-pc-linux-gnu/:/usr/lib/ > gcc/x86_64-pc-linux-gnu/7.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/ > gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ > LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/32/:/usr/lib/gcc/x86_64- > pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/lib/../lib/:/usr/lib/gcc/ > x86_64-pc-linux-gnu/7.2.0/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/ > usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2. > 0/../../../../x86_64-pc-linux-gnu/lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2. > 0/../../../:/lib/:/usr/lib/ > COLLECT_GCC_OPTIONS='-c' '-m32' '-v' '-o' 'a.o' '-mtune=generic' > '-march=x86-64' > > > $ ls -ld /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/include > > /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed > > drwxr-xr-x 3 root root 4096 Sep 19 2014 > /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/include > drwxr-xr-x 2 root root 4096 Jan 9 15:54 > /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include-fixed > > So yes, from what I noticed, the problem seems to be that it does not search > in "/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include" during the glibc-emerge. > Do you have any idea why that happens? Diffing against the empty chroot I've migrated to 17.1 I see the following differences: 1. I don't have this directory: /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/include Can you show what it resolves to? Say, via realpath: $ realpath /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/include And what is in there. 2. gcc did not ignore /usr/local/include for you. Do you have anything there that could fool system headers? 3. What does 'find /usr/ -name stddef.h' find? (In reply to Sergei Trofimovich from comment #7) > Diffing against the empty chroot I've migrated to 17.1 I see the following > differences: > 1. I don't have this directory: > /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/include > > Can you show what it resolves to? Say, via realpath: > > $ realpath /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/include > > And what is in there. It just resolves to /usr/lib/include and only contains an empty "sodium" directory, probably from the olden days when I tested out a local libsodium build. > 2. gcc did not ignore /usr/local/include for you. Do you have anything there > that could fool system headers? No, /usr/local/include only contains some old headers for local things (wayland-headers for testing, toxcore-headers), but nothing that would fool system headers in any way. > 3. What does 'find /usr/ -name stddef.h' find? Modulo headers found within /usr/local/MATLAB, /usr/gnat and /usr/src/linux* (which are obviously not of interest), it finds stddef.h in the following places: /usr/x86_64-pc-linux-musl/usr/include/linux/stddef.h /usr/x86_64-pc-linux-musl/usr/include/stddef.h /usr/lib/gcc/x86_64-pc-linux-musl/7.2.0/include/stddef.h /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include/stddef.h /usr/lib/clang/5.0.1/include/stddef.h /usr/share/syslinux/com32/include/bitsize32/stddef.h /usr/share/syslinux/com32/include/stddef.h /usr/share/syslinux/com32/include/bitsize64/stddef.h /usr/share/syslinux/com32/include/bitsize/stddef.h /usr/include/linux/stddef.h /usr/include/c++/v1/stddef.h /usr/include/wine-vanilla-2.20/wine/msvcrt/stddef.h /usr/include/wine-d3d9-2.19/wine/msvcrt/stddef.h /usr/include/wine-staging-2.19/wine/msvcrt/stddef.h Again, we can probably highlight the /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include/ folder we talked about before. Okay, I think I found the problem. The glibc-emerge works as soon as I renamed the "/usr/lib/include" folder to something else. You might want to test this by issuing mkdir /usr/lib/include and then checking if the emerge fails for you on the 17.1 profile. Of course I won't set this to resolved, as the emerge obviously should not fail when this folder is present. (In reply to Laslo Hunhold from comment #9) > Okay, I think I found the problem. > > The glibc-emerge works as soon as I renamed the "/usr/lib/include" folder to > something else. You might want to test this by issuing > > mkdir /usr/lib/include > > and then checking if the emerge fails for you on the 17.1 profile. Yes, you've nailed it! Good work! 'mkdir /usr/lib/include' breaks glibc the same for me. It's caused by the following code: https://sourceware.org/git/?p=glibc.git;a=blob;f=configure.ac;h=ca1282a6b3f8c5369c133a47f5c8239c3f2d32b5;hb=HEAD#l1018 where glibc tries hard to use only two system include paths (and not all include paths gcc knows about): one include and one include-fixed. (In reply to Sergei Trofimovich from comment #10) > Yes, you've nailed it! Good work! Thanks for your help! I'm glad I wasn't just imagining things. > 'mkdir /usr/lib/include' breaks glibc the same for me. > > It's caused by the following code: > https://sourceware.org/git/?p=glibc.git;a=blob;f=configure.ac; > h=ca1282a6b3f8c5369c133a47f5c8239c3f2d32b5;hb=HEAD#l1018 > > where glibc tries hard to use only two system include paths (and not all > include paths gcc knows about): one include and one include-fixed. Very interesting. Well, it seems like it made sense to test the 17.1 with an "old" Gentoo-system with a lot of cruft (it's now almost 6 years old). I'll stay tuned for the fix in the ebuild. *** Bug 687468 has been marked as a duplicate of this bug. *** I did not get to in in 2 years and did not come up with a cheap check in glibc or in ebuilds. Let's close it as WONTFIX and deal with user's build breakages on case-by-case basis. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b522ecb1078aad753b3970d91699053974440e2f commit b522ecb1078aad753b3970d91699053974440e2f Author: Sam James <sam@gentoo.org> AuthorDate: 2022-03-20 21:13:16 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-03-20 21:13:16 +0000 sys-libs/glibc: add safety check for /usr/lib/include This directory isn't used by anything legitimate but it breaks the build in a confusing way. Add a check for it & bail out if it exists. If you do have this directory on your system, back up its contents, then move it away/delete it. Closes: https://bugs.gentoo.org/643302 Closes: https://bugs.gentoo.org/833620 Signed-off-by: Sam James <sam@gentoo.org> sys-libs/glibc/glibc-2.34-r10.ebuild | 8 ++++++++ sys-libs/glibc/glibc-2.35.ebuild | 8 ++++++++ sys-libs/glibc/glibc-9999.ebuild | 8 ++++++++ 3 files changed, 24 insertions(+) (In reply to Larry the Git Cow from comment #14) > sys-libs/glibc: add safety check for /usr/lib/include > > This directory isn't used by anything legitimate but > it breaks the build in a confusing way. > > Add a check for it & bail out if it exists. > > If you do have this directory on your system, > back up its contents, then move it away/delete it. Very nice, thank you very much! This bug was definitely an oddity, and I'm glad to see it fixed. |