Parallels Tools build fails under new kernel 4.11.3

Discussion in 'Linux Virtual Machine' started by Mark Fine, Jun 1, 2017.

  1. Mark Fine

    Mark Fine Pro

    Messages:
    482
    Culprit is a prlfs_getattr in prl_fs/inode.c on lines 762, 783, and 800:

    CC [M] /var/lib/dkms/parallels-tools/12.2.0.41591/build/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.o
    /var/lib/dkms/parallels-tools/12.2.0.41591/build/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:762:20: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    .getattr = prlfs_getattr,
    ^~~~~~~~~~~~~
    /var/lib/dkms/parallels-tools/12.2.0.41591/build/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:762:20: note: (near initialization for 'prlfs_file_iops.getattr')
    /var/lib/dkms/parallels-tools/12.2.0.41591/build/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:783:20: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    .getattr = prlfs_getattr,
    ^~~~~~~~~~~~~
    /var/lib/dkms/parallels-tools/12.2.0.41591/build/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:783:20: note: (near initialization for 'prlfs_dir_iops.getattr')
    /var/lib/dkms/parallels-tools/12.2.0.41591/build/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:800:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
    .getattr = prlfs_getattr,
    ^~~~~~~~~~~~~
    /var/lib/dkms/parallels-tools/12.2.0.41591/build/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:800:14: note: (near initialization for 'prlfs_symlink_iops.getattr')
    cc1: some warnings being treated as errors
    scripts/Makefile.build:294: recipe for target '/var/lib/dkms/parallels-tools/12.2.0.41591/build/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.o' failed

    prlfs_getattr in Tools is declared as:
    static int prlfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
    getattr in 4.10.17 was declared as:
    int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
    (an exact match)

    new getattr in 4.11.3 is declared as:
    int (*getattr) (const struct path *, struct kstat *, u32, unsigned int);
    so, doesn't seem like this is a simple fix.

    Happy Thursday.
     
    Last edited: Jun 1, 2017
  2. rkulikov

    rkulikov Parallels Developers

    Messages:
    313
    Yep. Unfortunately 12.2.0 version supports Linux guest kernels up to 4.10.
     
  3. christian.vrl

    christian.vrl Bit poster

    Messages:
    4
    Hi, I am a use of version 12.2.0 pro . I am also affected by this problem , please solve it as soon as possbile , I only use Parallels because I believe you guys are quick on this support .
     
  4. AlbertoP2

    AlbertoP2 Bit poster

    Messages:
    9
    It's anoying this too-frequent problems with Fedora updates. I know Fedora and Linux evolves too quickly, but I think this is something a virtual platform should be aware and collaborate more deeply with OS providers. Also for me, it takes long time for solving this issues. Any clue about how long Parallels will take to release a patched version?
     
  5. Mark Fine

    Mark Fine Pro

    Messages:
    482
    Works now with Desktop 12.2.1 update.
    Removed the kernel exclude from dnf.cnf and even upgraded to 4.11.7... that works too. Looks like we're back in business.

    Thanks guys!
     
    Last edited: Jul 1, 2017
  6. rkulikov

    rkulikov Parallels Developers

    Messages:
    313
    Here we are. In Parallels Desktop 12.2.1 we support Linux kernels up to brand new 4.12.
     
    christian.vrl likes this.
  7. Mark Fine

    Mark Fine Pro

    Messages:
    482
    Thanks, @rkulikov
    (I'm not ready for F26, lol...)
     
  8. ChristianL3

    ChristianL3 Bit poster

    Messages:
    3
    It seems to still fail for me. I have parallels 12.2.1 and a vm with debian linux which I just upgraded to kernel 4.12, and I get this when I try to install the tools:

    CC [M] /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o
    In file included from /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:38:0:
    /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_compat.h: In function 'wait_for_completion_interruptible':
    /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_compat.h:137:8: error: implicit declaration of function 'signal_pending' [-Werror=implicit-function-declaration]
    if (signal_pending(current)) {
    ^~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    /usr/src/linux-headers-4.12.0-1-common/scripts/Makefile.build:307: recipe for target '/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o' failed
    make[5]: *** [/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o] Error 1
    /usr/src/linux-headers-4.12.0-1-common/Makefile:1532: recipe for target '_module_/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg' failed
    make[4]: *** [_module_/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg] Error 2
     

    Attached Files:

  9. Mark Fine

    Mark Fine Pro

    Messages:
    482
    Interesting. Builds under Fedora 26 with kernel 4.12.9 just fine. How can so many different distributions be so... different.
     
  10. rkulikov

    rkulikov Parallels Developers

    Messages:
    313
  11. BrennerS

    BrennerS Bit poster

    Messages:
    8
    Dear from Parallels,
    I could not install parallel tools on my mac using parallels 10.4 (29337), debian 9.4.0, on mac OS Sierra 10.12.6.
    Please see last page of the parallels-tools-install.log file bellow.
    I have spent a lot of time reading the knowledge base and trying to solve from modifying code to installing headers, etc, but hitherto with no success.
    Could you please help me?
    Kind regards,
    Brenner

    ...
    /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:866:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

    sbuf = vmalloc(ssize);

    ^

    /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:888:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

    dst = vmalloc(dsize);

    ^

    cc1: some warnings being treated as errors

    /usr/src/linux-headers-4.9.0-6-common/scripts/Makefile.build:298: recipe for target '/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o' failed

    make[5]: *** [/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o] Error 1

    /usr/src/linux-headers-4.9.0-6-common/Makefile:1517: recipe for target '_module_/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg' failed

    make[4]: *** [_module_/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg] Error 2

    Makefile:152: recipe for target 'sub-make' failed

    make[3]: *** [sub-make] Error 2

    Makefile:8: recipe for target 'all' failed

    make[2]: *** [all] Error 2

    make[2]: Leaving directory '/usr/src/linux-headers-4.9.0-6-686-pae'

    /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile.v26:29: recipe for target 'prl_tg' failed

    make[1]: *** [prl_tg] Error 2

    make[1]: Leaving directory '/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg'

    Makefile.kmods:23: recipe for target 'installme' failed

    make: *** [installme] Error 2

    make: Leaving directory '/usr/lib/parallels-tools/kmods'

    Error: could not build kernel modules

    Error: failed to install kernel modules

    2018-06-25T23:36:22+0100: execCmd: ./install --install [143]

    2018-06-25T23:36:22+0100: Error: An error occurred when installing Parallels Tools. Please go to /var/log/parallels-tools-install.log for more information.

    2018-06-25T23:36:23+0100: Exiting with code 1
     

    Attached Files:

  12. Mark Fine

    Mark Fine Pro

    Messages:
    482
    I no longer have that version of Parallels installed (I have 13.3.2) so I can't check the code to see what it's doing. The hasty answer would be one of three things:
    1. cast sbuf and dst as integer pointers instead of integers by adding the asterisk where it's originally declared (e.g., int *sbuf or int *dst). Hopefully it's just done locally since they're within 22 lines of each other and it won't affect anything else.
    2. cast the result of each vmalloc as an integer by adding (int) before vmalloc() (e.g., sbuf = (int)vmalloc(ssize); and dst = (int)vmalloc(dsize);). SAA for the local issue.
    3. manually rebuild prltg.c using -Wno-error in CFLAGS. It'll build, but I have no idea if it would work without errors or create memory problems.

    Again, without seeing the code it's hard to tell if 1 or 2 won't create other problems elsewhere, so 3 is probably the best option if in fact sbuf and dst were originally cast as integers.
     
  13. BrennerS

    BrennerS Bit poster

    Messages:
    8
    Thank you Mark Fine for your reply,
    I still could not get it built. See log file bellow, or attached.
    I am not sure if I could execute the 3rd step properly.
    Could you instruct me where should I add the -Wno-error to CFLAGS?
    I have also uploaded the code with most changes, hope it helps.
    kind regards,
    Brenner


    #------------------------------------------------------------------------------------------
    #changes in code
    #step 1
    kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:388: TG_BUFFER *sbuf;
    kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:603: TG_BUFFER *sbuf;
    kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:680: TG_BUFFER *sbuf;
    kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:738: TG_BUFFER *sbuf;
    kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:811: TG_BUFFER *sbuf = NULL;
    kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:930: TG_BUFFER *sbuf;
    kmods/prl_tg/Toolgate/Guest/Linux/Interfaces/prltg.h:31: TG_BUFFER *sbuf;
    kmods/prl_fs/Toolgate/Guest/Linux/Interfaces/prltg.h:31: TG_BUFFER *sbuf;
    kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:770: TG_PAGED_REQUEST *dst;
    kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:812: TG_PAGED_REQUEST *dst;

    #step 2
    kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:777: dst = (int)vmalloc(dsize);
    kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:867: sbuf = (int)vmalloc(ssize);
    kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:889: dst = (int)vmalloc(dsize);


    #-----------------------------------------------------------------------------------------------------------
    # last page of installation log file
    ...
    'get_user_pages' makes pointer from integer without a cast [-Wint-conversion]
    sbuf->Writable, 0,
    ^~~~
    In file included from /usr/src/linux-headers-4.9.0-6-common/include/linux/scatterlist.h:7:0,
    from /usr/src/linux-headers-4.9.0-6-common/include/linux/dmapool.h:14,
    from /usr/src/linux-headers-4.9.0-6-common/include/linux/pci.h:1274,
    from /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:11:
    /usr/src/linux-headers-4.9.0-6-common/include/linux/mm.h:1304:6: note: expected 'struct vm_area_struct **' but argument is of type 'unsigned char:1'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
    ^~~~~~~~~~~~~~
    /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:482:8: error: too many arguments to function 'get_user_pages'
    got = get_user_pages(current, current->mm,
    ^~~~~~~~~~~~~~
    In file included from /usr/src/linux-headers-4.9.0-6-common/include/linux/scatterlist.h:7:0,
    from /usr/src/linux-headers-4.9.0-6-common/include/linux/dmapool.h:14,
    from /usr/src/linux-headers-4.9.0-6-common/include/linux/pci.h:1274,
    from /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:11:
    /usr/src/linux-headers-4.9.0-6-common/include/linux/mm.h:1304:6: note: declared here
    long get_user_pages(unsigned long start, unsigned long nr_pages,
    ^~~~~~~~~~~~~~
    /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c: In function 'call_tg_sync':
    /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:778:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    dst = (int)vmalloc(dsize);
    ^
    /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c: In function 'prl_tg_write':
    /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:868:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    sbuf = (int)vmalloc(ssize);
    ^
    /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:890:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    dst = (int)vmalloc(dsize);
    ^
    cc1: some warnings being treated as errors
    /usr/src/linux-headers-4.9.0-6-common/scripts/Makefile.build:298: recipe for target '/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o' failed
    make[5]: *** [/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o] Error 1
    /usr/src/linux-headers-4.9.0-6-common/Makefile:1517: recipe for target '_module_/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg' failed
    make[4]: *** [_module_/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg] Error 2
    Makefile:152: recipe for target 'sub-make' failed
    make[3]: *** [sub-make] Error 2
    Makefile:8: recipe for target 'all' failed
    make[2]: *** [all] Error 2
    make[2]: Leaving directory '/usr/src/linux-headers-4.9.0-6-686-pae'
    /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile.v26:29: recipe for target 'prl_tg' failed
    make[1]: *** [prl_tg] Error 2
    make[1]: Leaving directory '/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg'
    Makefile.kmods:23: recipe for target 'installme' failed
    make: *** [installme] Error 2
    make: Leaving directory '/usr/lib/parallels-tools/kmods'
    Error: could not build kernel modules
    Error: failed to install kernel modules
    2018-06-26T13:59:21+0100: execCmd: ./install --install [143]
    2018-06-26T13:59:21+0100: Error: An error occurred when installing Parallels Tools. Please go to /var/log/parallels-tools-install.log for more information.
    2018-06-26T13:59:22+0100: Exiting with code 1
     

    Attached Files:

  14. Mark Fine

    Mark Fine Pro

    Messages:
    482
    Uh oh... I probably should have been a little clearer. By saying 'options' I meant doing either 1, 2 or 3; not all three of them. Basically doing what you call step 2 negated what you did in step 1, which would ultimately generate a similar error (and it did). In fact, because there's only 3 changes made, might want to back out all of what you did for step 1 and just keep what you did in step 2. This would keep the original code as close to as it was intended as possible.

    Incidentally, if you wanted to do step 3, you would have to manually add CFLAGS=-Wno-error when calling make (e.g., make CFLAGS=-Wno-error), but I'm not sure what other things are being configured when tools' ./install is run.
     
  15. BrennerS

    BrennerS Bit poster

    Messages:
    8
    Thank you again.
    I have tried each step separately with no success.
    Attached after step 1 (install.out.txt) and after trying step 3 (make_prl_tg.txt).
    What else could I try?
    Kind regards,
    Brenner
     

    Attached Files:

  16. Mark Fine

    Mark Fine Pro

    Messages:
    482
    Yeah, seems there's an incompatibility that's a lot deeper than just those two variables.
    Frankly, and I know this is a cop out answer, it might be that the solution is to upgrade your copy of Parallels to a version that supports Debian 9.x. Parallels 11 shows it supports 7.x and 8.x, so not sure Parallels 10 is a viable answer. Parallels 13 is listed as supporting it.
     
  17. BrennerS

    BrennerS Bit poster

    Messages:
    8
    Dear Mark, I have to try it again.
    Once I notice some advance I started to think it is possible to get parallel tools working.
    After reinstalling debian and modifying as described in the link bellow I got fewer errors.
    If you look at the attached logfile the first error message is related to a missing function: 'page_cache_get'.
    /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:314:2: error: implicit declaration of function 'page_cache_get' [-Werror=implicit-function-declaration]
    Do you have any idea how to overcome this error?
    Following error messages in the logfile seem to be related.
    Kind regards,
    Brenner
     

    Attached Files:

  18. Mark Fine

    Mark Fine Pro

    Messages:
    482
    Pretty sure that means there's a function called page_cache_get (and page_cache_release) that is needed and referenced by Parallels Tools that either was renamed or no longer exists in the kernel headers (assuming Debian's headers have been updated and correct). Means you would have to track down where it is or write the interface yourself at a minimum - There are several other problems indicated after that.

    That's why I said the incompatibility was a lot deeper than just a couple of variable castings, as originally thought before I understood what you were working with. Parallels 13 just addressed serious incompatibilities with kernel 4.15.x (and currently works with 4.17.x, btw) whereas I think Parallels 10 was barely compatible with kernel 4.anything. I'm guessing Debian 9 is using a current kernel release, not one that's three years old.

    Bottom line: You're basically trying to shoehorn something from 3 years ago into a current version of Debian without having full knowledge of the code architecture of either. Trying to code through that is echelons above my capability.
     
  19. BrennerS

    BrennerS Bit poster

    Messages:
    8
    Dear Mark Fine, Thank you for your suggestion. Using the link bellow I have also noticed Debian 9 is not listed as supported guest operating system in Parallels 13 (nor 12,11,10). Link: https://www.parallels.com/products/desktop/resources/
    Is that right? You wrote it is compatible. Could you please confirm that? Perhaps I could try the Parallels 13 before purchasing it. Is that possible? (I would use the same mac with parallels 10 on side). In the case of a purchase I probably have to wait for a better moment.
    Kind regards,
    Brenner
     
  20. Mark Fine

    Mark Fine Pro

    Messages:
    482
    9.x is supported in 13 per the knowledgebase: https://kb.parallels.com/en/124223. You can't go by the manuals because they are written early.
    As for trying first... Using two versions of Parallels side-by-side may be a problem because they use the same Library space in several areas of macOS. Upgraded versions also update the control files within VMs themselves. Not sure side-by-side, nor going to 13 then trying to go back to 10 is going to be very successful.
     

Share This Page