The file kdump.c includes jiffies.h, which uses the macros MSEC_PER_SEC and USEC_PER_SEC which are defined in time.h only if __KERNEL__ is defined - causing the module compilation to fail. As a workaround, I moved the following definitions out of the #ifdef __KERNEL__ section in time.h /* Parameters used to convert the timespec values */ #define MSEC_PER_SEC (1000L) #define USEC_PER_SEC (1000000L) #define NSEC_PER_SEC (1000000000L) #define NSEC_PER_USEC (1000L)
I'll need more info. I myself have been running 2.6.14-gentoo-r5 with openafs for quite some time.
heron@ka6toe ~ $ sudo emerge info Portage 2.0.53 (default-linux/x86/2005.1, gcc-3.3.5-20050130, glibc-2.3.5-r2, 2. 6.14-gentoo-r5 i686) ================================================================= System uname: 2.6.14-gentoo-r5 i686 AMD Sempron(tm) 2400+ Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -mcpu=athlon-xp -fomit-frame-pointer -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/kd e/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/q mail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -mcpu=athlon-xp -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/ distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X acl afs alsa apm arts audiofile avi berkdb bitmap-fonts bzip2 crypt c ups curl eds emboss encode esd exif expat fam foomaticdb fortran gdbm gif glut g nome gpm gstreamer gtk gtk+ gtk2 idn imagemagick imlib ipv6 java jpeg junit kde lcms ldap libg++ libwww mad mikmod mng motif mp3 mpeg mysql ncurses nls ogg oggv orbis opengl oss pam pcre pdflib perl png python qt quicktime readline recode ru by samba sdl slang spell ssl tcpd tiff truetype truetype-fonts type1-fonts udev vorbis xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY heron@ka6toe
For tracking purposes, pasting a previous email from the reporter here as well... --- The file 'jiffies.h' in the linux source tree uses the macros MSEC_PER_SEC and USEC_PER_SEC --- from jiffies.h file --- static inline unsigned int jiffies_to_msecs(const unsigned long j) { #if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ) return (MSEC_PER_SEC / HZ) * j; #elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC) return (j + (HZ / MSEC_PER_SEC) - 1)/(HZ / MSEC_PER_SEC); #else return (j * MSEC_PER_SEC) / HZ; #endif } static inline unsigned int jiffies_to_usecs(const unsigned long j) { #if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ) return (USEC_PER_SEC / HZ) * j; #elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC) return (j + (HZ / USEC_PER_SEC) - 1)/(HZ / USEC_PER_SEC); #else return (j * USEC_PER_SEC) / HZ; #endif } ---- In the file time.h, they are defined, but put in an #ifdef __KERNEL__ block ... --- from time.h --- #ifdef __KERNEL__ /* Parameters used to convert the timespec values */ #define MSEC_PER_SEC (1000L) #define USEC_PER_SEC (1000000L) #define NSEC_PER_SEC (1000000000L) #define NSEC_PER_USEC (1000L) ---- Causing the building of the openafs moduel to fail --- from emege output -- /lib/modules/2.6.14-gentoo-r5/build/include/linux/jiffies.h: In function `jiffies_to_msecs': /lib/modules/2.6.14-gentoo-r5/build/include/linux/jiffies.h:262: error: `MSEC_PER_SEC' undeclared (first use in this function) /lib/modules/2.6.14-gentoo-r5/build/include/linux/jiffies.h:262: error: (Each undeclared identifier is reported only once /lib/modules/2.6.14-gentoo-r5/build/include/linux/jiffies.h:262: error: for each function it appears in.) /lib/modules/2.6.14-gentoo-r5/build/include/linux/jiffies.h:270:47: division by zero in #if /lib/modules/2.6.14-gentoo-r5/build/include/linux/jiffies.h: In function `jiffies_to_usecs': /lib/modules/2.6.14-gentoo-r5/build/include/linux/jiffies.h:273: error: `USEC_PER_SEC' undeclared (first use in this function) /lib/modules/2.6.14-gentoo-r5/build/include/linux/jiffies.h:283:47: division by zero in #if /lib/modules/2.6.14-gentoo-r5/build/include/linux/jiffies.h: In function `msecs_to_jiffies': /lib/modules/2.6.14-gentoo-r5/build/include/linux/jiffies.h:286: error: `MSEC_PER_SEC' undeclared (first use in this function) /lib/modules/2.6.14-gentoo-r5/build/include/linux/jiffies.h:296:47: division by zero in #if ---- I just moved the 4 definitions up - outside the #ifdef __KERNEL__ line. Please let me know if you need further information. I think the options would be to either put the definitions outside of the #ifdef block, or to have the build process have a -D__KERNEL__ flag when building the modules. Thank You, Vance
> I just moved the 4 definitions up - outside the #ifdef __KERNEL__ line. This is peculiar. You shouldn't have to do that. __KERNEL__ should be defined during the compilation process. Looks like something is wrong with your system rather than with the ebuild. Have you done some other editing to your kernel source? Is your /usr/src/linux soft link correct? Can you try re-unpacking the kernel source, just doing "make oldconfig && make modules_prepare" and then re-emerging openafs-kernel? (openafs-kernel-1.4.0 is the package you're trying to merge, right?)
No feedback in two weeks, please reopen if it still occurs after the given suggestions.