xmos / xcore_iot

Other
29 stars 39 forks source link

Add a general common_issues document #495

Closed keithm-xmos closed 1 year ago

keithm-xmos commented 1 year ago

Seed with the the byte-order mark CMake issue on Windows.

Issue

xcc2clang.exe: error: no such file or directory:

Solution

Those strange characters at the beginning of the path are known as a byte-order mark (BOM). CMake adds them to the beginning of the response files it generates during the configure step. Why does it add them? Because the MSVC compiler toolchain requires them. However, some compiler toolchains, like gcc and xcc, do not ignore the BOM. Why did CMake think the compiler toolchain was MSVC and not the XTC toolchain? Because of a bug in which certain versions of CMake and certain versions of Visual Studio do not play nice together. The good news is that this appears to have been addressed in CMake version 3.22.3. Update to CMake version 3.22.2 or newer.