Installing vmware: stdarg.h and stddef.h not found

hi , i am trying to install vmware on my system . during the installation in gives me this error any idea how to fix it?

/tmp/modconfig-ZB06lS/vmnet-only/vm_assert.h:43:10: fatal error: stdarg.h: No such file or directory
   43 | #include <stdarg.h>
      |  
/tmp/modconfig-ZB06lS/vmnet-only/vm_basic_defs.h:54:12: fatal error: stddef.h: No such file or directory
   54 | #  include <stddef.h>
      |

Hi @reza0314 , welcome to the forum. Please take a look at the introductory posts in the #start-here category if you’ve not had a chance to yet.

Can you please tell us what commands you’ve run? Are you following some sort of guide/readme? Could you link to it please?

bt clicking the installed icon it tells me som modules are not installed and when i click to install it exits with error 1 and in the log files it said these headers are not found
gnome-shell-screenshot-5trmj0

1 Like

I expect that means you need to install the kernel-headers package for your kernel.

i have installed them befor using these command

sudo dnf install "kernel-devel-$(uname -r)"
sudo dnf install dkms

Hrm, not sure then. Sorry—you’ll have to wait for someone that has recently installed vmware.

There are 2 different packages that contain headers for the kernel.
One is the kernel-devel package which you seem to have installed, and the other is the kernel-headers package. They do contain different things and theoretically only the kernel-devel package is needed for building kernel modules, but maybe for your use you need both.

You also may get better results by doing sudo dnf remove kernel-devel followed by sudo dnf install kernel-devel. It is possible that a new install may get the headers needed to build your module.

2 Likes

reza0314, could you check your VMware’s version?

There is a solution code for 16.2.1:

git clone https://github.com/mkubecek/vmware-host-modules.git
cd vmware-host-modules
git checkout workstation-16.2.1
make
make install
/etc/init.d/vmware start

But I have 16.2.3 and this code doesn’t work on my Fedora 35.

Edit: original post from another merged topic


Hello!
I have a bash script by loungehostmaste from VMware community. But the are some errors:

make[1]: Entering directory '/usr/src/kernels/5.16.16-200.fc35.x86_64'
  CC [M]  /tmp/vmware-1cecb61d-8670-4a7d-b2c7-9ccaef539fd5/vmmon-only/linux/driver.o
In file included from /tmp/vmware-1cecb61d-8670-4a7d-b2c7-9ccaef539fd5/vmmon-only/linux/driverLog.h:33,
                 from /tmp/vmware-1cecb61d-8670-4a7d-b2c7-9ccaef539fd5/vmmon-only/linux/driver.c:46:
/tmp/vmware-1cecb61d-8670-4a7d-b2c7-9ccaef539fd5/vmmon-only/./include/vm_assert.h:43:10: fatal error: stdarg.h: No such file or directory
   43 | #include <stdarg.h>
      |          ^~~~~~~~~~

I’ve checked stdarg.h. It dwells in /usr/lib/gcc/x86_64-redhat-linux/11/include/. But I don’t have any ideas how I can put the header into a scripts’s temporary directory.

Unfortunately I can’t connect to author.

Could you help me?

Script is here: https://dropmefiles.com/Tjy2q .

Obviously I’ve forgotten to remove the ‘vmware-host-modules’ before running my script. It provoked a fatal error for the git command.

So my problem was solved.

Thank you, gentlemen.

3 Likes

after installing kernel-devel …
… I found them in the “linux” subdirectory,

image

this worked.

1 Like

Just incase someone still got the problem. My solution was:

Install kernel devel

sudo dnf install "kernel-devel-$(uname -r)"
sudo dnf install dkms

Install kernel module

sudo CPATH="library headers location" vmware-modconfig --console --install-all

for example:

sudo CPATH=/usr/lib/gcc/x86_64-redhat-linux/11/include vmware-modconfig --console --install-all
// note:
// you can find the stdarg.h file with find command
// $ find /usr/lib -name 'stdarg.h'
1 Like

It seems strange to me that anyone hoping to build kernel modules would not know enough to do their research on requirements. You are installing an out-of-tree package and thus are required to meet the dependencies on your own. Packages that are built for use with fedora are usually in rpm or flatpak form and thus routinely install the needed dependencies for you. Out-of-tree packages do not.

Anything being built for the kernel must have kernel-devel and often kernel-headers installed.