VMware
8 Replies Last post: Feb 14, 2006 12:31 PM by mlord  

Compile error with 2.6.16-rc1 posted: Jan 29, 2006 10:23 AM

Click to view cf's profile Enthusiast 130 posts since
Jan 25, 2005
I have a 2.6.16-rc1 stuffed with the vmsplit patch floating in -mm, using VMSPLIT_3G_OPT. The first problem is:

The kernel defined by this directory of header files does not have the same
address space size as your running kernel.

which is wrong. The one I am running has its includes at /lib/modules/`uname -r`/build/include, and it is valid. vmware-config.pl does not seem to grasp the new output of gcc; it essentially is

@@VMWARE@@ ((unsigned long)0xB0000000)

rather than

@@VMWARE@@ (0xB0000000)

or whatever it is without the vmsplit patch. I modified vmware-config.pl to continue anyway, and there is another problem, for which the reason seems to be that VMW_HAVE_EPOLL is not defined in the Makefile.

make[1]: Entering directory `/usr/src/linux-2.6.16-rc1'
CC [M] /tmp/vmware-config1/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config1/vmmon-only/linux/driver.h:20,
from /tmp/vmware-config1/vmmon-only/linux/driver.c:49:
/tmp/vmware-config1/vmmon-only/./include/compat_wait.h:60: error: conflicting types for ‘poll_initwait’
include/linux/poll.h:45: error: previous declaration of ‘poll_initwait’ was here
/tmp/vmware-config1/vmmon-only/linux/driver.c:145: warning: initialization from incompatible pointer type
/tmp/vmware-config1/vmmon-only/linux/driver.c:149: warning: initialization from incompatible pointer type
make[2]: *** [/tmp/vmware-config1/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config1/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.16-rc1'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config1/vmmon-only'

Re: Compile error with 2.6.16-rc1

2. Feb 1, 2006 5:08 PM in response to: cf
Click to view petr's profile Champion VMware Employees 7,223 posts since
Jul 10, 2003
You must unpack vmmon & vmnet tarballs (they are in /usr/local/lib/vmware/modules/source), locate Makefile.kernel in them, add -DKBUILD_BASENAME=\"$(DRIVER)\" into them next to -Iinclude2, then repack vmmon & vmnet with this update and rerun vmware-config.pl. It should work after that.

Re: Compile error with 2.6.16-rc1

3. Feb 13, 2006 2:44 PM in response to: petr
Click to view FKereki's profile Enthusiast 21 posts since
Feb 13, 2006
I tried doing that, and it didn't work.

I then tried even RENAMING vmmon and vmnet (so they couldn't be found) and I still got the same error.

By the way, at my machine the path was /usr/lib/vmware/modules/source -- without the /local part.

Any ideas?

Re: Compile error with 2.6.16-rc1

4. Feb 13, 2006 2:57 PM in response to: FKereki
Click to view petr's profile Champion VMware Employees 7,223 posts since
Jul 10, 2003
Either you did not do all steps needed for your system, or you made them incorrectly. Did you recreate vmmon.tar & vmnet.tar with updated Makefile.kernel ? Can you post contents of your fixed Makefile.kernel ?

Re: Compile error with 2.6.16-rc1

5. Feb 14, 2006 5:45 AM in response to: petr
Click to view FKereki's profile Enthusiast 21 posts since
Feb 13, 2006
I'm posting my new Makefile.kernel files below. I edited both files, then tar'ed the directories (vmmon-only and vmnet-only). I still got the same error message. What can I be doing wrong? Would going back to a 2.6.13 kernel fix this?

Thanks!


My new vmnet Makefile.kernel:

#!/usr/bin/make -f
#############################################################
# Copyright 2005 VMware, Inc. All rights reserved. -- VMware Confidential
#############################################################
####
#### VMware vmnet Makefile to be distributed externally
####

vm_check_build = $(shell if $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default -DKBUILD_BASENAME=\"$(DRIVER)\" -Werror -S -o /dev/null -xc $(1) > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi)

CC_WARNINGS := -Wall -Wstrict-prototypes
CC_OPTS := $(GLOBAL_DEFS) $(CC_WARNINGS)

CC_OPTS += -DVME_DEFAULT=$(VMWARE_VER)
CC_OPTS += -DVMW_USING_KBUILD

INCLUDE := -I$(SRCROOT)

EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, )
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/socket.c, -DVMW_HAVE_SK_WMEM_ALLOC, )
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/sk_alloc.c,-DVMW_HAVE_SK_ALLOC_WITH_PROTO, )
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/setnice.c, -DVMW_HAVE_SET_USER_NICE, )

obj-m += $(DRIVER).o

ifneq (,$(filter x86_64%, $(shell $(CC) -dumpmachine)))
MACHINE := x86_64
else
MACHINE := x386
endif

SMAC := smac_linux.$(MACHINE).o

$(DRIVER)-y := driver.o hub.o userif.o netif.o bridge.o procfs.o smac_compat.o $(SMAC)

####
#### Make Targets are beneath here.
####

clean:
rm -rf $(DRIVER).o $(DRIVER).mod.o $(DRIVER).mod.c $(DRIVER).ko .tmp_versions $($(DRIVER)-y) .*.cmd .*.o.flags

My new VMMON Makefile.kernel:

#!/usr/bin/make -f
#############################################################
# Copyright 1998 VMware, Inc. All rights reserved. -- VMware Confidential
#############################################################
####
#### VMware vmmon Makefile to be distributed externally
####

vm_check_build = $(shell if $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default -DKBUILD_BASENAME=\"$(DRIVER)\" -Werror -S -o /dev/null -xc $(1) > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi)

CC_WARNINGS := -Wall -Wstrict-prototypes
CXX_KFLAGS := $(call vm_check_gxx,-fno-exceptions,)
CC_OPTS := $(GLOBAL_DEFS) $(CC_WARNINGS)

CC_OPTS += -DVME_DEFAULT=$(VMWARE_VER)

CC_OPTS += -DVMW_USING_KBUILD -DVMMON -DVMCORE

INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux -I$(SRCROOT)/vmcore

EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)

EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/nopage1.c, -DVMW_NOPAGE_261, )
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/skas1.c, -DVMW_SKAS_MMAP, )
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/ioapic.c, -DVMWARE__FIX_IO_APIC_BASE=FIX_IO_APIC_BASE_0, -DVMWARE__FIX_IO_APIC_BASE=FIX_IO_APIC_BASE )
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, )
EXTRA_CFLAGS += $(shell if [ -f $(HEADER_DIR)/linux/compile.h ]; then echo "-DVMW_HAVE_COMPILE_H"; fi)
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/setnice.c, -DVMW_HAVE_SET_USER_NICE, )

# 2.6.x build system
CFLAGS_task.o := -x c++ $(CXX_KFLAGS)
# 2.4.x build system
CFLAGS_common/task.o := $(CFLAGS_task.o)

obj-m += $(DRIVER).o

$(DRIVER)-y := $(subst $(SRCROOT)/, , $(patsubst %.c, %.o, $(wildcard $(SRCROOT)/linux/*.c $(SRCROOT)/common/*.c $(SRCROOT)/vmcore/*.c)))

clean:
rm -rf $(wildcard $(DRIVER).mod.c $(DRIVER).ko .tmp_versions $(foreach dir,linux/ common/ vmcore/ ./,$(addprefix $(dir),.*.cmd .*.o.flags *.o .*.o.d)))

Re: Compile error with 2.6.16-rc1

6. Feb 14, 2006 9:19 AM in response to: petr
Click to view mlord's profile Lurker 3 posts since
Apr 13, 2005
You must unpack vmmon & vmnet tarballs (they are in
/usr/local/lib/vmware/modules/source), locate
Makefile.kernel in them, add
-DKBUILD_BASENAME=\"$(DRIVER)\" into them next to
-Iinclude2, then repack vmmon & vmnet with this
update and rerun vmware-config.pl. It should work
after that.

Yup, that worked fine here for me. Linux kernel 2.6.16-rc3-git1.

Thanks!

Re: Compile error with 2.6.16-rc1

7. Feb 14, 2006 10:36 AM in response to: FKereki
Click to view petr's profile Champion VMware Employees 7,223 posts since
Jul 10, 2003
I'm posting my new Makefile.kernel files below. I
edited both files, then tar'ed the directories
(vmmon-only and vmnet-only). I still got the same
error message. What can I be doing wrong? Would going
back to a 2.6.13 kernel fix this?

Strange. Files looks correct. Are you modifying vmmon.tar/vmnet.tar in /usr/lib/vmware/..., or in the installation directory? You should be modifying ones in /usr/lib/vmware/... and then you should run vmware-config.pl (not vmware-install.pl). Or, if you modify *.tar in the installation directory, you must run vmware-install.pl after that.

Yes, going back to 2.6.13 fixes problem.

Re: Compile error with 2.6.16-rc1

8. Feb 14, 2006 12:31 PM in response to: cf
Click to view mlord's profile Lurker 3 posts since
Apr 13, 2005
I have a 2.6.16-rc1 stuffed with the vmsplit patch
floating in -mm, using VMSPLIT_3G_OPT. The first
problem is:

The kernel defined by this directory of header files
does not have the same
address space size as your running kernel.
..
The simplest fix is to remove the "return '';" line from vmware-config.pl, from just after where it prints the "address space" warning message.

VMware Beta Programs

Want to be Considered for Future Beta Programs?

Learn More

VMware Developer

Download SDKs, APIs, videos,
training, and more in the Developer community.

Learn More

Developer
Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld
Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

Only VMware ... Delivers Nexus 1000V

Ensure consistent, policy-based network capabilities to virtual machines across your data center.

Learn More

Communities