virtualbox, cmake, nautilus samba mountpoints leading to system and compilers undefined

I am using virtualbox’s bridge adapter on Ubuntu host with guest CentOS 7. I am running samba server on the Ubuntu machine.
I can mount the directory I want from nautilus and the directory appears on the desktop, with a folder like:

“code in 192.xxx.0.85”.

If I launch a terminal on that directory, it points to:

/run/user/1000/gvfs/smb-share:server=192.xxx.0.85,share=code/

However, if I try to run cmake I get:

$ mkdir tmp && cd tmp
$ cmake …
CMake Error at /usr/local/share/cmake-3.24/Modules/CMakeDetermineSystem.cmake:194 (configure_file):
Operation not supported
Call Stack (most recent call first):
CMakeLists.txt:5 (project)

– The C compiler identification is unknown
CMake Error at /usr/local/share/cmake-3.24/Modules/CMakeDetermineCCompiler.cmake:226 (configure_file):
Operation not supported
Call Stack (most recent call first):
CMakeLists.txt:5 (project)

– The CXX compiler identification is unknown
CMake Error at /usr/local/share/cmake-3.24/Modules/CMakeDetermineCXXCompiler.cmake:226 (configure_file):
Operation not supported
Call Stack (most recent call first):
CMakeLists.txt:5 (project)

I am at a loss here. Any ideas on what I could try? cmake and the CMakeLists.txt file work fine when run in the Ubuntu machine as well as in the CentOS 7 machine when using virtualbox’s shared folders (instead of network share), except for hard links which are not supported on shared folders.

Do you get the same error with earlier versions of CMake?

Using strace to find out what operation is not actually supported would be useful. I suspect there’s an issue setting timestamps or permissions, but that’s just a guess.

I was able to solve the issue, by moving the mounting of the file system to /etc/fstab. Now the only thing I am facing is a file stamp issue which makes the project recompile every time I run make.