Trying to emerge strace-4.5.1 on a system running gentoo-dev-sources and linux-headers-2.6.5. Build fails looking for /usr/include/linux/autoconf.h: if gcc -DHAVE_CONFIG_H -I. -I. -I. -Ilinux/i386 -I./linux/i386 -Ilinux -I./linux -Wall -D_GNU_SOURCE -march=pentium3 -O2 -pipe -MT process.o -MD -MP -MF ".deps/process.Tpo" \ -c -o process.o `test -f 'process.c' || echo './'`process.c; \ then mv ".deps/process.Tpo" ".deps/process.Po"; \ else rm -f ".deps/process.Tpo"; exit 1; \ fi net.c:570: error: `PACKET_ADD_MEMBERSHIP' undeclared here (not in a function) net.c:570: error: initializer element is not constant net.c:570: error: (near initialization for `sockpacketoptions[0].val') if gcc -DHAVE_CONFIG_H -I. -I. -I. -Ilinux/i386 -I./linux/i386 -Ilinux -I./linux -Wall -D_GNU_SOURCE -march=pentium3 -O2 -pipe -MT bjm.o -MD -MP -MF ".deps/bjm.Tpo" \ -c -o bjm.o `test -f 'bjm.c' || echo './'`bjm.c; \ then mv ".deps/bjm.Tpo" ".deps/bjm.Po"; \ else rm -f ".deps/bjm.Tpo"; exit 1; \ fi net.c:570: error: initializer element is not constant net.c:570: error: (near initialization for `sockpacketoptions[0]') net.c:571: error: `PACKET_DROP_MEMBERSHIP' undeclared here (not in a function) net.c:571: error: initializer element is not constant net.c:571: error: (near initialization for `sockpacketoptions[1].val') net.c:571: error: initializer element is not constant net.c:571: error: (near initialization for `sockpacketoptions[1]') net.c:581: error: initializer element is not constant net.c:581: error: (near initialization for `sockpacketoptions[2]') net.c: In function `printsock': net.c:721: error: field `ll' has incomplete type net.c:724: error: field `nl' has incomplete type net.c: At top level: net.c:631: warning: `icmpfilterflags' defined but not used make[1]: *** [net.o] Error 1 make[1]: *** Waiting for unfinished jobs.... In file included from /usr/include/linux/linkage.h:4, from bjm.c:45: /usr/include/linux/config.h:4:28: linux/autoconf.h: No such file or directory make[1]: *** [bjm.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/strace-4.5.1/work/strace-4.5.1' make: *** [all] Error 2 !!! ERROR: dev-util/strace-4.5.1 failed. !!! Function src_compile, Line 32, Exitcode 2 !!! make failed Apparently /usr/include/linux/autoconf.h is part of sys-kernel/linux-headers-2.4.19-r1: mira root # qpkg -v -f /usr/include/linux/autoconf.h sys-kernel/linux-headers-2.4.19-r1 * But not included with the 2.6 headers. Reproducible: Always Steps to Reproduce: 1. Install a 2.6 kernel with linux-headers-2.6.5. I have a rebuilt glibc with nptl. 2. Emerge strace-4.5.1 Actual Results: Make failure in ebuild: if gcc -DHAVE_CONFIG_H -I. -I. -I. -Ilinux/i386 -I./linux/i386 -Ilinux -I./linux -Wall -D_GNU_SOURCE -march=pentium3 -O2 -pipe -MT process.o -MD -MP -MF ".deps/process.Tpo" \ -c -o process.o `test -f 'process.c' || echo './'`process.c; \ then mv ".deps/process.Tpo" ".deps/process.Po"; \ else rm -f ".deps/process.Tpo"; exit 1; \ fi net.c:570: error: `PACKET_ADD_MEMBERSHIP' undeclared here (not in a function) net.c:570: error: initializer element is not constant net.c:570: error: (near initialization for `sockpacketoptions[0].val') if gcc -DHAVE_CONFIG_H -I. -I. -I. -Ilinux/i386 -I./linux/i386 -Ilinux -I./linux -Wall -D_GNU_SOURCE -march=pentium3 -O2 -pipe -MT bjm.o -MD -MP -MF ".deps/bjm.Tpo" \ -c -o bjm.o `test -f 'bjm.c' || echo './'`bjm.c; \ then mv ".deps/bjm.Tpo" ".deps/bjm.Po"; \ else rm -f ".deps/bjm.Tpo"; exit 1; \ fi net.c:570: error: initializer element is not constant net.c:570: error: (near initialization for `sockpacketoptions[0]') net.c:571: error: `PACKET_DROP_MEMBERSHIP' undeclared here (not in a function) net.c:571: error: initializer element is not constant net.c:571: error: (near initialization for `sockpacketoptions[1].val') net.c:571: error: initializer element is not constant net.c:571: error: (near initialization for `sockpacketoptions[1]') net.c:581: error: initializer element is not constant net.c:581: error: (near initialization for `sockpacketoptions[2]') net.c: In function `printsock': net.c:721: error: field `ll' has incomplete type net.c:724: error: field `nl' has incomplete type net.c: At top level: net.c:631: warning: `icmpfilterflags' defined but not used make[1]: *** [net.o] Error 1 make[1]: *** Waiting for unfinished jobs.... In file included from /usr/include/linux/linkage.h:4, from bjm.c:45: /usr/include/linux/config.h:4:28: linux/autoconf.h: No such file or directory make[1]: *** [bjm.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/strace-4.5.1/work/strace-4.5.1' make: *** [all] Error 2 !!! ERROR: dev-util/strace-4.5.1 failed. !!! Function src_compile, Line 32, Exitcode 2 !!! make failed Expected Results: emerge strace to system I'm running a slightly modified system to support 2.6 kernel, glibc with nptl, udev/hotplug, etc. mira root # emerge info Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.3_pre20040420-r0, 2.6.5-gentoo-r1) ================================================================= System uname: 2.6.5-gentoo-r1 i686 Pentium III (Coppermine) Gentoo Base System version 1.4.15 Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium3 -O2 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="ftp://gentoo.ccccom.com http://gentoo.ccccom.com ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="arts avi berkdb crypt directfb encode fbcon foomaticdb gdbm gif imlib jpeg libg++ libwww mad mikmod mpeg ncurses nls nptl pam pdflib perl png python readline sdl slang spell sse ssl svga tcpd truetype x86 xml2 xmms xv zlib" I also tried sys-devel/autoconf-2.59-r3 (currently in ~x86), and still had the same result.
I have linux-headers-2.6.5 too but I don't have problem emerge strace-4.5.1 . Search bugzilla for "/usr/include/linux/config.h:4:28: linux/autoconf.h: No such file or directory"; found someone has the similar error with different packages. bug #36998 and bug #45712 . emerge headers again work for them :)
Thanks. The other reported workarounds worked great. A simple re-emerge didn't work, but after deleting /usr/portage/sys-kernel/linux-headers, emerge sync then emerge linux-headers it added autoconf.h. I did notice that when it did work the emerge appeared to do a "make oldconfig" during the emerge process.
Did you happen to migrate straight from 2.4 headers and then get this issue by any chance?
Tim: Sort of - I had made the move to 2.6.x, udev/hotplug, NPTL all about the same time. Then I tried to emerge strace a few days later and had the problem. So, yes, there was a direct migration from 2.4.x headers -> 2.6.x headers when this happened.
This issue should now be solved with sys-kernel/linux26-headers >= 2.6.6. Please reopen this bug if this issue still occurs. Thanks!