Error source file is not valid UTF-8 when sharing project code from Ubuntu host to macOS guest

307 views Asked by At

I have a Ubuntu host and a vmware macOS guest. When I share a project code from Ubuntu, the code cannot be built in macOS because of error source file is not valid UTF-8. We can use any example of Qt/QML to reproduce this error. I think this is because of "end of line", "end of file" differents. Can you tell me if there are any option/flag in qmake that tell qmake or clang knows about this? Thanks!

Addition info: I found the reason but not found the solution. This is because of vmware shared folders in macosx guest is under /Volumes/VMware Shared Folders. I must copy the source to another path to build success. I tried to create a symlink but this cannot be built too. I don't want to copy/paste code each time I pull/commit. It's so inconvenient. Can you give me some hints? Thank you very much!
Addition info: I cannot read/write those vmware shared folder directly.
Some more info: https://communities.vmware.com/thread/175917.
Addition info: Now I can read/write by change both setting in host and guest for the sharing folder. But the issue is still here. I think this is because of the space in the name /Volumes/VMware Shared Folders. How can I change this default shared name or mount this to my folder?
Additon info: Tried this but still failed: sudo mount -t vmhgfs ".host:/VMware Shared Folders" /Users/username/sharefolder

1

There are 1 answers

0
chsZ On

I faced the same problem today. Finally I give up sharing folder over VMware, and turn to sshfs, which is hosted by WSL in the host windows system, everything works.

btw, install sshfs on OSX:

brew cask install osxfuse
brew install sshfs
sudo chown ${whoami}  /usr/local/share/man/man1 
brew link sshfs