0

When I try to compile the kernel modules for vmware Workstation 16 on my rhel8 host, I get the following:

> sudo /usr/bin/vmware-config.pl
*snip*
Your kernel was built with "gcc" version "8.3.1", while you are trying to use 
"/bin/gcc" version "8". This configuration is not supported and VMware 
Workstation cannot work in such configuration. Please either recompile your 
kernel with "/bin/gcc" version "8", or restart /usr/bin/vmware-config.pl with 
CC environment variable pointing to the "gcc" version "8.3.1".

Yet /bin/gcc -v gives me:

> /bin/gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC) 

Setting 'export CC=/bin/gcc' doesn't help.

How can I get vmware-config.pl to pick up the correct gcc version?

1 Answer 1

0

I don’t think we can answer that with the information provided. The only suggestion I have is look at the source of the Perl script and see what it’s doing to determine what gcc version you are on. Since gcc -v shows you’re using the right version, and explicitly pointing to the right version still gets the same error, it seems there must be something goofy with how the Perl script is trying to determine the version.

Without the Perl script here it’s hard to say more.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.