Installing nVidia K2 driver after RHEL6.4 kernel update

I have updated the kernel on our RHEL6.4 from base level up to 2.6.32-696.28.1.el6.x86_64 to patch server against spectre and meltdown. After update, I attempted to re-install the nvidia driver, 361.45.18 and during the install got a retpoline not supported by my gcc error… As a result, I updated my gcc toolchain to support retpoline in kernel compiles, but now I get another error during install. Below is a copy of my install log file. After failed install I also tried a newer version of the driver and get the same message as below. Any help would be greatly appreciated.

nvidia-installer log file ‘/var/log/nvidia-installer.log’
creation time: Tue Jun 26 11:43:44 2018
installer version: 361.45.18

PATH: /nfs/system/scripts/:/usr/lib64/qt-3.3/bin:/nfs/system/fortran/ifort/bin/intel64:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/pbs/default/bin:/opt/pbs/default/sbin:/root/bin

nvidia-installer command line:
./nvidia-installer

Unable to load: nvidia-installer ncurses v6 user interface

Using: nvidia-installer ncurses user interface
-> Detected 40 CPUs online; setting concurrency level to 32.
-> License accepted.
-> Installing NVIDIA driver version 361.45.18.
-> Performing CC sanity check with CC="/usr/bin/cc".
-> Kernel source path: ‘/lib/modules/2.6.32-696.28.1.el6.x86_64/source’
-> Kernel output path: ‘/lib/modules/2.6.32-696.28.1.el6.x86_64/build’
-> Performing rivafb check.
-> Performing nvidiafb check.
-> Performing Xen check.
-> Performing PREEMPT_RT check.
-> Cleaning kernel module build directory.
executing: ‘cd ./kernel; /usr/bin/make -k -j32 clean NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/2.6.32-696.28.1.el6.x86_64/source" SYSOUT="/lib/modules/2.6.32-696.28.1.el6.x86_64/build"’…
rm -f -r conftest
/usr/bin/make “CC=cc” KBUILD_OUTPUT=/lib/modules/2.6.32-696.28.1.el6.x86_64/build KBUILD_VERBOSE= -C /lib/modules/2.6.32-696.28.1.el6.x86_64/source M=/tmp/selfgz5608/NVIDIA-Linux-x86_64-361.45.18/kernel ARCH=x86_64 NV_KERNEL_SOURCES=/lib/modules/2.6.32-696.28.1.el6.x86_64/source NV_KERNEL_OUTPUT=/lib/modules/2.6.32-696.28.1.el6.x86_64/build NV_KERNEL_MODULES=“nvidia nvidia-uvm nvidia-modeset” INSTALL_MOD_DIR=kernel/drivers/video clean
make[1]: Entering directory /usr/src/kernels/2.6.32-696.28.1.el6.x86_64' /usr/bin/make -C /lib/modules/2.6.32-696.28.1.el6.x86_64/build \ KBUILD_SRC=/usr/src/kernels/2.6.32-696.28.1.el6.x86_64 \ KBUILD_EXTMOD="/tmp/selfgz5608/NVIDIA-Linux-x86_64-361.45.18/kernel" -f /usr/src/kernels/2.6.32-696.28.1.el6.x86_64/Makefile \ clean /usr/src/kernels/2.6.32-696.28.1.el6.x86_64/arch/x86/Makefile:134: *** extraneous endif’. Stop.
make[1]: *** [sub-make] Error 2
make[1]: Target clean' not remade because of errors. make[1]: Leaving directory /usr/src/kernels/2.6.32-696.28.1.el6.x86_64’
make: *** [clean] Error 2
ERROR: An error occurred. See /var/log/nvidia-installer.log for details.
-> The command cd ./kernel; /usr/bin/make -k -j32 clean NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/2.6.32-696.28.1.el6.x86_64/source" SYSOUT="/lib/modules/2.6.32-696.28.1.el6.x86_64/build" failed with the following output:

rm -f -r conftest
/usr/bin/make “CC=cc” KBUILD_OUTPUT=/lib/modules/2.6.32-696.28.1.el6.x86_64/build KBUILD_VERBOSE= -C /lib/modules/2.6.32-696.28.1.el6.x86_64/source M=/tmp/selfgz5608/NVIDIA-Linux-x86_64-361.45.18/kernel ARCH=x86_64 NV_KERNEL_SOURCES=/lib/modules/2.6.32-696.28.1.el6.x86_64/source NV_KERNEL_OUTPUT=/lib/modules/2.6.32-696.28.1.el6.x86_64/build NV_KERNEL_MODULES=“nvidia nvidia-uvm nvidia-modeset” INSTALL_MOD_DIR=kernel/drivers/video clean
make[1]: Entering directory /usr/src/kernels/2.6.32-696.28.1.el6.x86_64' /usr/bin/make -C /lib/modules/2.6.32-696.28.1.el6.x86_64/build \ KBUILD_SRC=/usr/src/kernels/2.6.32-696.28.1.el6.x86_64 \ KBUILD_EXTMOD="/tmp/selfgz5608/NVIDIA-Linux-x86_64-361.45.18/kernel" -f /usr/src/kernels/2.6.32-696.28.1.el6.x86_64/Makefile \ clean /usr/src/kernels/2.6.32-696.28.1.el6.x86_64/arch/x86/Makefile:134: *** extraneous endif’. Stop.
make[1]: *** [sub-make] Error 2
make[1]: Target clean' not remade because of errors. make[1]: Leaving directory /usr/src/kernels/2.6.32-696.28.1.el6.x86_64’
make: *** [clean] Error 2
-> Building kernel modules
executing: ‘cd ./kernel; /usr/bin/make -k -j32 NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/2.6.32-696.28.1.el6.x86_64/source" SYSOUT="/lib/modules/2.6.32-696.28.1.el6.x86_64/build"’…
/usr/bin/make “CC=cc” KBUILD_OUTPUT=/lib/modules/2.6.32-696.28.1.el6.x86_64/build KBUILD_VERBOSE= -C /lib/modules/2.6.32-696.28.1.el6.x86_64/source M=/tmp/selfgz5608/NVIDIA-Linux-x86_64-361.45.18/kernel ARCH=x86_64 NV_KERNEL_SOURCES=/lib/modules/2.6.32-696.28.1.el6.x86_64/source NV_KERNEL_OUTPUT=/lib/modules/2.6.32-696.28.1.el6.x86_64/build NV_KERNEL_MODULES=“nvidia nvidia-uvm nvidia-modeset” INSTALL_MOD_DIR=kernel/drivers/video modules
make[1]: Entering directory /usr/src/kernels/2.6.32-696.28.1.el6.x86_64' /usr/bin/make -C /lib/modules/2.6.32-696.28.1.el6.x86_64/build \ KBUILD_SRC=/usr/src/kernels/2.6.32-696.28.1.el6.x86_64 \ KBUILD_EXTMOD="/tmp/selfgz5608/NVIDIA-Linux-x86_64-361.45.18/kernel" -f /usr/src/kernels/2.6.32-696.28.1.el6.x86_64/Makefile \ modules /usr/src/kernels/2.6.32-696.28.1.el6.x86_64/arch/x86/Makefile:134: *** extraneous endif’. Stop.
make[1]: *** [sub-make] Error 2
make[1]: Target modules' not remade because of errors. make[1]: Leaving directory /usr/src/kernels/2.6.32-696.28.1.el6.x86_64’
make: *** [modules] Error 2
-> Error.
ERROR: An error occurred while performing the step: “Building kernel modules”. See /var/log/nvidia-installer.log for details.
-> The command cd ./kernel; /usr/bin/make -k -j32 NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/2.6.32-696.28.1.el6.x86_64/source" SYSOUT="/lib/modules/2.6.32-696.28.1.el6.x86_64/build" failed with the following output:

/usr/bin/make “CC=cc” KBUILD_OUTPUT=/lib/modules/2.6.32-696.28.1.el6.x86_64/build KBUILD_VERBOSE= -C /lib/modules/2.6.32-696.28.1.el6.x86_64/source M=/tmp/selfgz5608/NVIDIA-Linux-x86_64-361.45.18/kernel ARCH=x86_64 NV_KERNEL_SOURCES=/lib/modules/2.6.32-696.28.1.el6.x86_64/source NV_KERNEL_OUTPUT=/lib/modules/2.6.32-696.28.1.el6.x86_64/build NV_KERNEL_MODULES=“nvidia nvidia-uvm nvidia-modeset” INSTALL_MOD_DIR=kernel/drivers/video modules
make[1]: Entering directory /usr/src/kernels/2.6.32-696.28.1.el6.x86_64' /usr/bin/make -C /lib/modules/2.6.32-696.28.1.el6.x86_64/build \ KBUILD_SRC=/usr/src/kernels/2.6.32-696.28.1.el6.x86_64 \ KBUILD_EXTMOD="/tmp/selfgz5608/NVIDIA-Linux-x86_64-361.45.18/kernel" -f /usr/src/kernels/2.6.32-696.28.1.el6.x86_64/Makefile \ modules /usr/src/kernels/2.6.32-696.28.1.el6.x86_64/arch/x86/Makefile:134: *** extraneous endif’. Stop.
make[1]: *** [sub-make] Error 2
make[1]: Target modules' not remade because of errors. make[1]: Leaving directory /usr/src/kernels/2.6.32-696.28.1.el6.x86_64’
make: *** [modules] Error 2
ERROR: The nvidia kernel module was not created.
ERROR: Installation has failed. Please see the file ‘/var/log/nvidia-installer.log’ for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.