make[1]: Leaving directory `/usr/src/linux-2.6.37-gentoo' /var/tmp/paludis/app-emulation-vmware-modules-238.3/work/vmci-only/linux/driver.c: In function ���LinuxDriver_Open���: /var/tmp/paludis/app-emulation-vmware-modules-238.3/work/vmci-only/linux/driver.c:375:4: error: implicit declaration of function ���init_MUTEX��� make[3]: *** [/var/tmp/paludis/app-emulation-vmware-modules-238.3/work/vmci-only/linux/driver.o] Error 1 make[2]: *** [_module_/var/tmp/paludis/app-emulation-vmware-modules-238.3/work/vmci-only] Error 2 make[1]: *** [sub-make] Error 2 make: *** [vmci.ko] Error 2 /usr/libexec/paludis/utils/emake: emake returned error 2 The following patch I found upstream is supposed to deal with this issue: diff -ru original//vmci-only/include/compat_semaphore.h patched//vmci-only/include/compat_semaphore.h --- original//vmci-only/include/compat_semaphore.h 2010-11-11 15:37:25.000000000 -0500 +++ patched//vmci-only/include/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500 @@ -28,7 +28,7 @@ #endif -#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31) +#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) /* * The -rt patch series changes the name of semaphore/mutex initialization * routines (across the entire kernel). Probably to identify locations that @@ -41,7 +41,7 @@ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) #endif #ifndef init_MUTEX - #define init_MUTEX(_m) semaphore_init(_m) + #define init_MUTEX(_m) sema_init(_m,1) #endif #endif It would have to be tested and adapted to the ebuild. Reproducible: Always
These changes allowed compile to complete using ebuild: diff -ru original/vmci-only/include/compat_semaphore.h patched/vmci-only/include/compat_semaphore.h --- original/vmci-only/include/compat_semaphore.h 2010-11-11 15:37:25.000000000 -0500 +++ patched/vmci-only/include/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500 @@ -28,7 +28,7 @@ #endif -#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31) +#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) /* * The -rt patch series changes the name of semaphore/mutex initialization * routines (across the entire kernel). Probably to identify locations that @@ -41,7 +41,7 @@ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) #endif #ifndef init_MUTEX - #define init_MUTEX(_m) semaphore_init(_m) + #define init_MUTEX(_m) sema_init(_m,1) #endif #endif diff -ru original/vmnet-only/compat_semaphore.h patched/vmnet-only/compat_semaphore.h --- original/vmnet-only/compat_semaphore.h 2010-11-11 15:37:23.000000000 -0500 +++ patched/vmnet-only/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500 @@ -28,7 +28,7 @@ #endif -#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31) +#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) /* * The -rt patch series changes the name of semaphore/mutex initialization * routines (across the entire kernel). Probably to identify locations that @@ -41,7 +41,7 @@ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) #endif #ifndef init_MUTEX - #define init_MUTEX(_m) semaphore_init(_m) + #define init_MUTEX(_m) sema_init(_m,1) #endif #endif diff -ru original/vsock-only/shared/compat_semaphore.h patched/vsock-only/shared/compat_semaphore.h --- original/vsock-only/shared/compat_semaphore.h 2010-11-11 13:04:44.000000000 -0500 +++ patched/vsock-only/shared/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500 @@ -28,7 +28,7 @@ #endif -#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31) +#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) /* * The -rt patch series changes the name of semaphore/mutex initialization * routines (across the entire kernel). Probably to identify locations that @@ -41,7 +41,7 @@ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) #endif #ifndef init_MUTEX - #define init_MUTEX(_m) semaphore_init(_m) + #define init_MUTEX(_m) sema_init(_m,1) #endif #endif
diff -ru original/vmmon-only/linux/driver.c patched/vmmon-only/linux/driver.c this change is needed as well: --- original/vmmon-only/linux/driver.c 2010-11-11 13:37:22.000000000 -0700 +++ patched/vmmon-only/linux/driver.c 2010-11-24 12:05:48.924489002 -0700 @@ -145,7 +145,7 @@ #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && \ (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)) -# define kernel_locked_by_current() kernel_locked() +# define kernel_locked_by_current() (current->lock_depth >= 0) #else # define kernel_locked_by_current() 0 #endif
fixed in vmware overlay. thanks.
still fails here. * Preparing vmmon module make -j3 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= auto-build VMWARE_VER=VME_V65 KERNEL_DIR=/usr/src/linux KBUILD_OUTPUT=/lib/modules/2.6.37-gentoo/build Using 2.6.x kernel build system. make -C /lib/modules/2.6.37-gentoo/build SUBDIRS=$PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= modules make[1]: Entering directory `/usr/src/linux-2.6.37-gentoo' make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. CC [M] /var/tmp/portage/app-emulation/vmware-modules-238.3/work/vmmon-only/linux/driver.o /var/tmp/portage/app-emulation/vmware-modules-238.3/work/vmmon-only/linux/driver.c: In function ‘LinuxDriver_Ioctl’: /var/tmp/portage/app-emulation/vmware-modules-238.3/work/vmmon-only/linux/driver.c:1736:7: error: implicit declaration of function ‘unlock_kernel’ /var/tmp/portage/app-emulation/vmware-modules-238.3/work/vmmon-only/linux/driver.c:1742:7: error: implicit declaration of function ‘lock_kernel’ make[3]: *** [/var/tmp/portage/app-emulation/vmware-modules-238.3/work/vmmon-only/linux/driver.o] Error 1 make[2]: *** [_module_/var/tmp/portage/app-emulation/vmware-modules-238.3/work/vmmon-only] Error 2 make[1]: *** [sub-make] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.37-gentoo' make: *** [vmmon.ko] Error 2 emake failed * ERROR: app-emulation/vmware-modules-238.3 failed: * Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= auto-build VMWARE_VER=VME_V65 KERNEL_DIR=/usr/src/linux KBUILD_OUTPUT=/lib/modules/2.6.37-gentoo/build
(In reply to comment #4) > still fails here. Please attach full build.log and grep your .config for CONFIG_LOCK_KERNEL and CONFIG_BLK
Created attachment 259116 [details] build log dagg@Starfleet /usr/src/linux $ cat .config | grep CONFIG_LOCK_KERNEL dagg@Starfleet /usr/src/linux $ cat .config | grep CONFIG_BLK # CONFIG_BLK_DEV_INITRD is not set # CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEV_INTEGRITY is not set CONFIG_BLK_DEV=y # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_DRBD is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_UB is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_BLK_DEV_HD is not set # CONFIG_BLK_DEV_RBD is not set CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SR=y # CONFIG_BLK_DEV_SR_VENDOR is not set # CONFIG_BLK_DEV_MD is not set CONFIG_BLK_DEV_DM=y why didn't you labeled this ebuild as r1?
Works fine here
(In reply to comment #6) > dagg@Starfleet /usr/src/linux $ cat .config | grep CONFIG_LOCK_KERNEL You need to enable CONFIG_LOCK_KERNEL > why didn't you labeled this ebuild as r1? Because those who is running stable (2.6.36) do not need to reinstall.
I had the same issue as DaggyStyle. After adding epatch lines for sk_sleep.patch and iommu_map.patch to the ebuild, it compiled on ~amd64 with tuxonice-sources-2.6.37. :-)
solved here too
With 2.6.33.7-rt30, vmnet still won't compile after patching: /var/tmp/portage/app-emulation/vmware-modules-238.3-r3/work/vmnet-only/driver.c:117:37: error: macro "DEFINE_SEMAPHORE" requires 2 arguments, but only 1 given /var/tmp/portage/app-emulation/vmware-modules-238.3-r3/work/vmnet-only/driver.c:117:1: warning: data definition has no type or storage class /var/tmp/portage/app-emulation/vmware-modules-238.3-r3/work/vmnet-only/driver.c:117:1: warning: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’