gcc -D__KERNEL__ -I/usr/src/linux-2.4.30/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -fno-unit-at-a-time -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.30/include/linux/modversions.h -DHAVE_LINUX_SPINLOCK_HEADER -DRTC_LOCK -DEXPECT_OK -D__NO_VERSION__ -I/var/tmp/portage/oprofile-0.8.2/work/oprofile-0.8.2/module/x86 -I/var/tmp/portage/oprofile-0.8.2/work/oprofile-0.8.2 -I/var/tmp/portage/oprofile-0.8.2/work/oprofile-0.8.2/libutil -I/var/tmp/portage/oprofile-0.8.2/work/oprofile-0.8.2/libop -nostdinc -iwithprefix include -DKBUILD_BASENAME=oprofile -c -o oprofile.o oprofile.c oprofile.c:118: error: conflicting types for 'op_do_profile' oprofile.h:144: error: previous declaration of 'op_do_profile' was here oprofile.c:118: error: conflicting types for 'op_do_profile' oprofile.h:144: error: previous declaration of 'op_do_profile' was here make[4]: *** [oprofile.o] Error 1 make[4]: Leaving directory `/var/tmp/portage/oprofile-0.8.2/work/oprofile-0.8.2/module' make[3]: *** [_mod_/var/tmp/portage/oprofile-0.8.2/work/oprofile-0.8.2/module] Error 2 make[3]: Leaving directory `/usr/src/linux-2.4.30' make[2]: *** [module] Error 1 make[2]: Leaving directory `/var/tmp/portage/oprofile-0.8.2/work/oprofile-0.8.2' Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.6.11.6 i686) ================================================================= System uname: 2.6.11.6 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz Gentoo Base System version 1.6.10 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Apr 12 2005, 16:26:38)] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.5, 1.9.5, 1.4_p6, 1.6.3, 1.8.5-r3, 1.7.9-r1 sys-devel/binutils: 2.15.92.0.2-r8 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.4.19-r1, 2.6.11 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -mmmx -msse -msse2 -fomit-frame-pointer -march=pentium4 -funroll-loops -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/bind /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O3 -mmmx -msse -msse2 -fomit-frame-pointer -march=pentium4 -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp.muni.cz/pub/linux/gentoo http://gentoo.mirror.icd.hu/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/" LINGUAS="cs cz en" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 FFmpeg X Xaw3d aalib acpi adns afs alsa apache2 apm arts ati avcodec avi berkdb bidi bitmap-fonts bonobo caca cdparanoia cdr crypt cscope cups curl dba dga directfb divx divx4 divx4linux divx5 divx5linux dv dvb dvd dvdr dvdread emacs emacs-w3 emboss encode esd ethereal evo f77 faac faad faad2 fam fame fbcon ffmpeg flac flash foomaticdb fortran fvwm fvwm2 gb gd gdbm ggi gif gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile i8x0 icc imagemagick imlib imlib2 innodb java jpeg junit lcms leim libg++ libwww live lpthread lzo lzw-tiff mad mcal mesa mikmod mmx mmx2 motif mozilla mp3 mpeg mule mysql ncurses network nls nptl ogg oggvorbis opengl oss pam pda pdflib perl php php4 plotutils png ppds pthread pthreads python qt qtx quicktime readline rtc ruby samba scanner sdl slang slp speex spell sse sse2 ssl svga tcltk tcpd tetex tex theora thread threads tiff truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vorbis win32 winvidix wmf xml xml2 xmms xosd xv xvid xvmc yv12 zeo zlib video_cards_radeon linguas_cs linguas_cz linguas_en" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Created attachment 57300 [details, diff] A patch to fix the compilation issue described in the bug.
Created attachment 57301 [details] An updated ebuild
Please download the patch and put it in /usr/portage/dev-util/oprofile/files. Then replace the oprofile ebuild with the one attached to this bug. See whether it fixes the compilation problem.
Yes, this fixes the problem. Confirmed by compiling while /usr/src/linux was a symlink to /usr/src/linux-2.4.30-bk3 and also that it did not break 2.6 build when pointing to 2.6.11.6 tree. Thanks!
Nice, patch commited to CVS.