VMware Communities
VOrlovsky
Contributor
Contributor

Clang error while trying to build Xcode project residing in shared folder

I've got the same issue as https://communities.vmware.com/t5/VMware-Workstation-Pro/cant-compile-code-on-vmware-shared-folder/t...

though my configuration is completely legal - I have macOS 13 as a host and macOS 12 as a guest.

I'm trying to build a legacy project with Xcode and I'm constantly getting the following error while building project located in VMware shared folder:

 

clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: armv7-apple-ios9.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: error: unable to execute command: Segmentation fault: 11
clang: note: diagnostic msg: Error generating preprocessed source(s).

 

If I copy this project as-is to some location inside my macOS 12 VM the error is gone so the project itself is not the reason.

Can you please tell what's the cause of such behaviour and how can it be avoided (for shared folders)?

0 Kudos
4 Replies
RDPetruska
Leadership
Leadership

Try using standard networked file sharing.  The VMware Shared Folders feature has never been robust, and is meant for quick transfer of files to/from a guest.

0 Kudos
VOrlovsky
Contributor
Contributor

I've already tried to share folder from guest OS to host, but it appeared to be slow, way slower than sharing folders between two real Mac devices in my network (e.g. it may take up to a minute to save 10KB file after editing). Do you mean I should try to share host folder to guest?

Just to be clear - my goal is to be able to edit source code from my host OS, but to build and run it from guest. The idea behind it is to allow Xcode to access all project files at maximum speed, while editing just several source files will (in theory) require less interaction with file system.

0 Kudos
ColoradoMarmot
Champion
Champion

Building software across host and VM has been a performance problem for years.  NAS is definitely the best 'simultaneous' access option (shared folders are quite slow when accessing many small files).

The best performance is to use a USB drive that is mounted either to the host or guest - but of course, it can't be mounted to both at the same time.

0 Kudos
VOrlovsky
Contributor
Contributor

Thanks, guys.

Sharing a host machine folder as a network resource appeared to be faster than a vice-versa approach, but it was completely screwed by stable freezing upon finish of building process - XCode hangs for 10min+ and it doesn't often restore after it. IMO that is mostly caused by macOS itself, its slow and unreliable networking implementation.

I should rather try to use NAS or Docker-OSX instead of VMware.

0 Kudos