Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nazt/6cc9c365cba99f66f66401c4ca101002 to your computer and use it in GitHub Desktop.
Save nazt/6cc9c365cba99f66f66401c4ca101002 to your computer and use it in GitHub Desktop.
fix parallels tools install issue

install log

cd prl_fs/SharedFolders/Guest/Linux/prl_fs && make CC=cc
make[1]: Entering directory '/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs'
make -C /lib/modules/5.0.0-25-generic/build M=/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs CC=cc
make[2]: Entering directory '/usr/src/linux-headers-5.0.0-25-generic'
  CC [M]  /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.o
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c: In function 'prlfs_remount':
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:119:21: error: 'MS_RDONLY' undeclared (first use in this function); did you mean 'IS_RDONLY'?
  if ( (!((*flags) & MS_RDONLY) && PRLFS_SB(sb)->readonly) ||
                     ^~~~~~~~~
                     IS_RDONLY
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:119:21: note: each undeclared identifier is reported only once for each function it appears in
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:120:21: error: 'MS_MANDLOCK' undeclared (first use in this function); did you mean 'IS_MANDLOCK'?
         ((*flags) & MS_MANDLOCK) )
                     ^~~~~~~~~~~
                     IS_MANDLOCK
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:123:12: error: 'MS_SYNCHRONOUS' undeclared (first use in this function); did you mean 'SB_SYNCHRONOUS'?
  *flags |= MS_SYNCHRONOUS; /* silently don't drop sync flag */
            ^~~~~~~~~~~~~~
            SB_SYNCHRONOUS
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c: In function 'prlfs_fill_super':
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:277:17: error: 'MS_NOATIME' undeclared (first use in this function); did you mean 'S_NOATIME'?
  sb->s_flags |= MS_NOATIME | MS_SYNCHRONOUS;
                 ^~~~~~~~~~
                 S_NOATIME
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:277:30: error: 'MS_SYNCHRONOUS' undeclared (first use in this function); did you mean 'SB_SYNCHRONOUS'?
  sb->s_flags |= MS_NOATIME | MS_SYNCHRONOUS;
                              ^~~~~~~~~~~~~~
                              SB_SYNCHRONOUS
scripts/Makefile.build:284: recipe for target '/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.o' failed
make[3]: *** [/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.o] Error 1
Makefile:1606: recipe for target '_module_/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs' failed
make[2]: Leaving directory '/usr/src/linux-headers-5.0.0-25-generic'
make[2]: *** [_module_/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs] Error 2
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/Makefile.v26:13: recipe for target 'all' failed
make[1]: Leaving directory '/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs'
make[1]: *** [all] Error 2
Makefile.kmods:49: recipe for target 'compile' failed
make: Leaving directory '/usr/lib/parallels-tools/kmods'
make: *** [compile] Error 2
Error: could not build kernel modules
Error during report about failed installation of parallels tools.
Error: failed to install Parallels Guest Tools!
2019-08-27T11:19:22+0800: Started installation of Parallels Guest Tools version '14.1.3.45485'

Error during report about start installation of parallels tools.
Tue Aug 27 11:19:19 CST 2019
Start installation or upgrade of Guest Tools
Makefile:223: ================= WARNING ================
Makefile:224: 'SUBDIRS' will be removed after Linux 5.3
Makefile:225: Please use 'M=' or 'KBUILD_EXTMOD' instead
Makefile:226: ==========================================
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c: In function 'prlfs_remount':
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:119:21: error: 'MS_RDONLY' undeclared (first use in this function); did you mean 'IS_RDONLY'?
  if ( (!((*flags) & MS_RDONLY) && PRLFS_SB(sb)->readonly) ||
                     ^~~~~~~~~
                     IS_RDONLY
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:119:21: note: each undeclared identifier is reported only once for each function it appears in
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:120:21: error: 'MS_MANDLOCK' undeclared (first use in this function); did you mean 'IS_MANDLOCK'?
         ((*flags) & MS_MANDLOCK) )
                     ^~~~~~~~~~~
                     IS_MANDLOCK
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:123:12: error: 'MS_SYNCHRONOUS' undeclared (first use in this function); did you mean 'SB_SYNCHRONOUS'?
  *flags |= MS_SYNCHRONOUS; /* silently don't drop sync flag */
            ^~~~~~~~~~~~~~
            SB_SYNCHRONOUS
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c: In function 'prlfs_fill_super':
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:277:17: error: 'MS_NOATIME' undeclared (first use in this function); did you mean 'S_NOATIME'?
  sb->s_flags |= MS_NOATIME | MS_SYNCHRONOUS;
                 ^~~~~~~~~~
                 S_NOATIME
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:277:30: error: 'MS_SYNCHRONOUS' undeclared (first use in this function); did you mean 'SB_SYNCHRONOUS'?
  sb->s_flags |= MS_NOATIME | MS_SYNCHRONOUS;
                              ^~~~~~~~~~~~~~
                              SB_SYNCHRONOUS
make[3]: *** [/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.o] Error 1
make[2]: *** [_module_/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs] Error 2
make[1]: *** [all] Error 2
make: *** [compile] Error 2
Error: could not build kernel modules
Error during report about failed installation of parallels tools.
Error: failed to install Parallels Guest Tools!
2019-08-27T11:19:22+0800: execCmd: ./install --install [167]
2019-08-27T11:19:22+0800: Error: An error occurred when installing Parallels Tools. Please go to /var/log/parallels-tools-install.log for more information.
2019-08-27T11:20:01+0800: Exiting with code 1
2019-08-27T11:23:11+0800: 
  1. Mount parallels tools disk
  2. Run script bellow
    #!/usr/bin/env bash
    if [[ ! -d "/media/$(whoami)/Parallels Tools" ]]; then
        echo "Please mount parallels tools disk before install"
        exit
    fi
    echo "Copy install files to /tmp/parallels_fixed"
    cp -rf "/media/$(whoami)/Parallels Tools" /tmp/parallels_fixed
    chmod -R 755 /tmp/parallels_fixed
    cd /tmp/parallels_fixed/kmods
    echo "Unpack prl_mod.tar.gz"
    tar -xzf prl_mod.tar.gz
    rm prl_mod.tar.gz
    echo "Patch prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c"
    sed '1i\#include <uapi/linux/mount.h>' -i prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c
    echo "Repack prl_mod.tar.gz"
    tar -zcvf prl_mod.tar.gz . dkms.conf Makefile.kmods > /dev/null
    cd /tmp/parallels_fixed
    echo "Start install"
    sudo ./install
    echo "Remove /tmp/parallels_fixed"
    rm -rf /tmp/parallels_fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment