2.6.20 woes

Discussion in 'Parallels Workstation for Windows and Linux' started by wvaladez, Feb 7, 2007.

  1. wvaladez

    wvaladez Junior Member

    Messages:
    12
    Installed the new 2.6.20 linux kernel this morning, and now parallels fails to compile. I removed parallels and reinstalled the 2.2.2112 ebuild. I had to change the code per the 2.6.19 fix on these forums about HW_CHECKSUM errors, and parallels-config still fails with the following in the build log:


    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c: In function `prlnet_nopage':
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1179: error: dereferencing pointer to incomplete type
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1185: error: dereferencing pointer to incomplete type
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1187: error: dereferencing pointer to incomplete type
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1201: error: `VM_FAULT_MINOR' undeclared (first use in this function)
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1201: error: (Each undeclared identifier is reported only once
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1201: error: for each function it appears in.)
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1212: warning: implicit declaration of function `vmalloc_to_page'
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1212: warning: assignment makes pointer from integer without a cast
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1214: warning: implicit declaration of function `get_page'
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c: At top level:
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1218: error: variable `prlnet_vmops' has initializer but incomplete type
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1219: error: unknown field `nopage' specified in initializer
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1220: warning: excess elements in struct initializer
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1220: warning: (near initialization for `prlnet_vmops')
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c: In function `prlnet_mmap':
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1229: error: dereferencing pointer to incomplete type
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1233: error: dereferencing pointer to incomplete type
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1233: error: dereferencing pointer to incomplete type
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1239: error: dereferencing pointer to incomplete type
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1240: error: dereferencing pointer to incomplete type
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c: At top level:
    /usr/lib/parallels/drivers/drv_net/linux/prlnet.c:1218: error: storage size of `prlnet_vmops' isn't known
    make[4]: *** [/usr/lib/parallels/drivers/drv_net/linux/prlnet.o] Error 1
    make[3]: *** [_module_/usr/lib/parallels/drivers/drv_net/linux] Error 2
    make[3]: Leaving directory `/usr/src/linux-2.6.20-gentoo'
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/usr/lib/parallels/drivers/drv_net/linux'
    make[1]: *** [vmbridge] Error 2
    make[1]: Leaving directory `/usr/lib/parallels/drivers'
    make: *** [build] Error 2

    I have tried commenting the lines with errors out, to predictable success. Any ideas?
     
    Last edited: Mar 12, 2007
  2. daniel76

    daniel76 Bit poster

    Messages:
    1
    Solution

    I had the same problem .I solved this with adding :

    #include <linux/mm.h>

    to the /usr/lib/parallels/drivers/drv_net/linux/prlnet.c file add line number 14.


    Daniel

    No it works :)
     
  3. wvaladez

    wvaladez Junior Member

    Messages:
    12
    Making progress.

    OK, including that line in prlnet.c and following the fix in these posts:

    http://forums.parallels.com/thread8088.html

    http://forums.parallels.com/thread6035.html

    in addition to upgrading my kernel headers package to the 2.6.20 version seems to let parallels-config compile the drivers succesfully. Now it's not loading the hypervisor module but I haven't given up on getting that to work. Others seem to have gotten 2.6.20 to work with parallels so we shall see...
     
    Last edited: Mar 12, 2007
  4. wvaladez

    wvaladez Junior Member

    Messages:
    12
    kernel module format

    ok, the hypervisor and related modules are not being loaded. The modules are being built with .o extensions but the .ko module files are not being created. Nothing is reported as failed in the compile so I'm kind of at a loss.

    Also, the ebuild posted on the download page for parallels-linux fails with the following, so maybe there's something different in the ebuild version than building with ./install.sh in the tgz file:

    (Note that this same ebuild builds on my wife's thinkpad in 2.6.18 just fine.)


    !!! Invalid or corrupt dependency specification:

    invalid atom: '<x11-libs/qt-4*'

    ('ebuild', '/', 'app-emulation/parallels-workstation-2.2.2112', 'merge')

    virtual/os-headers >=x11-libs/qt-3.0.5 <x11-libs/qt-4* >=sys-libs/libstdc++-v3-3*

    This package can not be installed. Please notify the
    'app-emulation/parallels-workstation-2.2.2112' package maintainer about
    this problem.
     
    Last edited: Mar 14, 2007
  5. wvaladez

    wvaladez Junior Member

    Messages:
    12
    Still not loading hypervisor, but more info...

    Well hypervisor still isn't loading. modprobe -l doesn't list any of the parallels modules, but if I do

    modinfo /lib/modules/2.6.20-r1/kernel/drivers/misc/parallels/hypervisor.o

    it lists

    filename: /lib/modules/2.6.20-r1/kernel/drivers/misc/parallels/hypervisor.o
    author: Parallels
    description: Parallels hypervisor

    but if I try to insmod the .o file I get

    insmod /lib/modules/2.6.20-r1/kernel/drivers/misc/parallels/hypervisor.o
    insmod: error inserting '/lib/modules/2.6.20-r1/kernel/drivers/misc/parallels/hypervisor.o': -1 Invalid module format

    and dmesg reports

    No module found in object

    so I don't really know what to do. It seems that the kernel module .ko objects not being created is the root of the problem but as far as I can tell there is no directive in the Makefile to create .ko modules.

    This is running on a linux 2.6.20 system with gcc4 and glibc-nptl, with matching kernel headers. The entire system was compiled with gcc4, including the kernel. glibc reflects the correct kernel headers and gcc version. Also the module-init-tools are the latest from portage. I guess people using 2.6.20 will just have to wait for the next release from parallels.
     
  6. wvaladez

    wvaladez Junior Member

    Messages:
    12
    not linking

    ok, poking around a little more it seems that the problem is the modules not being linked. During the build process it's supposed to do something along the lines of

    ld hypervisor.o

    for every .o files parallels needs. This creates the .ko files needed to load a module in 2.6. When I manually attempt to link one of the files like the example above it throws all kinds of errors, starting with:

    ld hypervisor.o
    ld: warning: cannot find entry symbol _start; defaulting to 0000000008049000
    hypervisor.o: In function `hyper_wrap_page_to_pfn':
    : undefined reference to `mem_map'
    hypervisor.o: In function `cleanup_module':
    : undefined reference to `kfree'
    hypervisor.o: In function `init_module':
    ....etc etc etc

    So it seems that the drivers are being built but just can't be linked. Useful to know, but still doesn't give me a usable install.
     
  7. romracer

    romracer Bit poster

    Messages:
    3
    To compile on 2.6.19 or 2.6.20 should only require changes to the prlnet.c driver. These are similar changes the Cisco VPN client needs and have already been posted in this thread and others. I've put the fixes together in one file and uploaded it here

    Extract the .c file and copy it to /usr/lib/parallels/drivers/drv_net/linux/ overwriting the original. Then re-run parallels-config.

    In your case, it sounds as though your kernel sources are installed incorrectly. Check /usr/src and also /lib/modules/`uname -r`/build and make sure they link to the proper kernel sources.

    I take no credit for finding the fixes, I merely put them together to help others out
     

    Attached Files:

  8. wvaladez

    wvaladez Junior Member

    Messages:
    12
    I don't think you read my thread. I am aware of the changes needed to prlnet.c and have changed them already. It compiles just fine, that's not the issue. I also know that the kernel sources are installed correctly because I built the kernel myself and if they weren't installed correctly a lot more than parallels would break. This is on a gentoo system so there isn't a standalone binary kernel package (that I know of). My modules are linked to the correct kernel source and there is only one source tree on this sytem, 2.6.20-r1. In addition the kernel headers are installed as 2.6.20-r1. Modules that rely on the sources being installed and /usr/src/linux pointing to the same uname -r as /lib/modules/`uname -r`/ work too, like kqemu, and alsa-driver. Maybe you should read the threads more carefully...

    Also, why zip a single 36k c file?

    Regardless it seems parallels may issue a new parallels-workstation beta soon so maybe all this will be automagically fixed in that release.
     
  9. Negative

    Negative Bit poster

    Messages:
    8
    New portage system is more strict to asterisks.
    Fix "<x11-libs/qt-4* >=sys-libs/libstdc++-v3-3*" strings to
    Code:
        <x11-libs/qt-4.0.0
        >=sys-libs/libstdc++-v3-3.0.0
    and run
    Code:
    ebuild parallels-workstation-2.2.2112.ebuild digest 
    in directory contains parallels-workstation-2.2.2112.ebuild file
     

Share This Page