I have recently upgraded to sys-kernel/linux-headers-2.6.7 and now lvm2 fails to compile. It complains about two files included from /usr/include/linux In file included from /usr/include/linux/wait.h:12, from /usr/include/linux/fs.h:12, from device/dev-io.c:34 I have tried this on two seperate computers and am able to reproduce the same compilation error every time. I have tried with several sets of CFLAGS and it will not compile. The reason that it is complaining about mcpu in the error message that I have posted is those are defaults built into portage and I am using gcc 3.4.0. That is a run with zero CFLAGS specified. With normal CFLAGS it produced the same error in the same spot. LVM2 compiles fine against headers 2.6.5 with gcc3.4.0 on both of the machines that produce this error now. Reproducible: Always Steps to Reproduce: 1. Emerge linux-headers-2.6.7 2. Emerge lvm2 2.00.15 Actual Results: Compiler error. Expected Results: Successful Compilation. Error: s -Wmissing-declarations -Wnested-externs -Winline -O2 device/dev-io.c -o device/dev-io.o `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. In file included from /usr/include/linux/prefetch.h:14, from /usr/include/linux/list.h:5, from /usr/include/linux/wait.h:12, from /usr/include/linux/fs.h:12, from device/dev-io.c:34: /usr/include/asm/processor.h:406: error: parse error before numeric constant /usr/include/asm/processor.h:406: error: `print_log' declared as function returning an array /usr/include/asm/processor.h:406: error: field `print_log' declared as a function /usr/include/asm/processor.h:494: error: parse error before numeric constant In file included from /usr/include/linux/wait.h:12, from /usr/include/linux/fs.h:12, from device/dev-io.c:34: /usr/include/linux/list.h:64: error: conflicting types for 'list_add' ../include/list.h:33: error: previous definition of 'list_add' was here /usr/include/linux/list.h:160: error: conflicting types for 'list_del' ../include/list.h:55: error: previous definition of 'list_del' was here /usr/include/linux/list.h:234: error: conflicting types for 'list_empty' ../include/list.h:61: error: previous definition of 'list_empty' was here device/dev-io.c: In function `dev_open_flags': device/dev-io.c:328: warning: passing arg 1 of `list_add' from incompatible pointer type device/dev-io.c:328: warning: passing arg 2 of `list_add' from incompatible pointer type device/dev-io.c: In function `_close': device/dev-io.c:357: warning: passing arg 1 of `list_del' from incompatible pointer type make[1]: *** [device/dev-io.o] Error 1 make[1]: *** Waiting for unfinished jobs.... `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. make[1]: Leaving directory `/var/tmp/portage/lvm2-2.00.15/work/LVM2.2.00.15/lib' make: *** [lib] Error 2 !!! ERROR: sys-fs/lvm2-2.00.15 failed. !!! Function src_compile, Line 23, Exitcode 2 !!! compile problem Emerge Info: [~] > emerge info Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.4.0, glibc-2.3.4.20040605-r1, 2.6.7-gentoo) ================================================================= System uname: 2.6.7-gentoo i686 Intel(R) Celeron(TM) CPU 1066MHz Gentoo Base System version 1.4.16 distcc 2.14 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-mtune=pentium3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/GNUstep/Apps/Login.app /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mtune=pentium3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS=" http://gentoo.mirrors.pair.com/ http://cudlug.cudenver.edu/gentoo/ http://mirrors.tds.net/gentoo/ ftp://mirrors.tds.net/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="/usr/local/portage /usr/local/bmg-main" SYNC="rsync://xenophobia/gentoo-portage" USE="X acpi alsa avi berkdb crypt cscope cups encode fbcon foomaticdb gdbm gif gpm gtk gtk2 imlib java jpeg libg++ libwww mad mikmod mmx motif mozilla mpeg ncurses nls nptl offensive oggvorbis opengl oss pam pcmcia pdflib perl plotutils png ppds python qt quicktime readline sdl slang spell sse ssl svga tcpd tetex truetype usb x86 xml2 xmms xv xvid zlib"
Just for completeness. It compiles fine against the 2.6.5 version of the linux-header files. However, it still fails against the latest version of the 2.6.7-r1 header files with the same error. Header file versions used: * sys-kernel/linux-headers Latest version available: 2.6.7-r1 Latest version installed: 2.6.7-r1 Size of downloaded files: 34,269 kB Homepage: http://www.kernel.org/ http://www.gentoo.org/ Description: Linux 2.6.7 headers from kernel.org
linux-headers-2.6.6-r1 also worked for me. I am using an IBM eServer, xSeries 305 which has a ServerWorks board Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.6) ================================================================= System uname: 2.6.6 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz Gentoo Base System version 1.4.16 distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j6" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl apm arts avi berkdb crypt cups encode foomaticdb gdbm gif gtk gtk2 imlib innodb jpeg kerberos krb4 krb5 libg++ libwww mad mikmod mpeg ncurses nls nptl oggvorbis opengl oss pam pdflib perl png python quicktime readline samba sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xv zlib"
Is this still an issue or has it taken care of itself with newer kernel headers/lvm2 software? Reopen if its still a problem.