Daemon icon indicating copy to clipboard operation
Daemon copied to clipboard

CMake 3.22: BOM breaks NaCl compiler test

Open slipher opened this issue 3 years ago • 0 comments

With CMake 3.22 I get this problem, where the pnacl-clang compiler chokes on a BOM:

 Performing configure step for 'nacl-vms'
1>  -- The C compiler identification is unknown
1>  -- The CXX compiler identification is unknown
1>  -- Detecting C compiler ABI info
1>  -- Detecting C compiler ABI info - failed
1>  -- Check for working C compiler: C:/vm/deb-rw/deptest/msvc64-5/pnacl/bin/pnacl-clang.bat
1>  -- Check for working C compiler: C:/vm/deb-rw/deptest/msvc64-5/pnacl/bin/pnacl-clang.bat - broken
1>  CMake Error at C:/Program Files/CMake3.22/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message):
1>    The C compiler
1>
1>      "C:/vm/deb-rw/deptest/msvc64-5/pnacl/bin/pnacl-clang.bat"
1>
1>    is not able to compile a simple test program.
[...]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)

With CMake 3.19 it simply skips the compiler test:

2>  Performing configure step for 'nacl-vms'
2>  -- The C compiler identification is unknown
2>  -- The CXX compiler identification is unknown
2>  -- Detecting C compiler ABI info
2>  -- Detecting C compiler ABI info - done
2>  -- Check for working C compiler: C:/vm/deb-rw/deptest/msvc64-5/pnacl/bin/pnacl-clang.bat - skipped
2>  -- Detecting CXX compiler ABI info
2>  -- Detecting CXX compiler ABI info - done
2>  -- Check for working CXX compiler: C:/vm/deb-rw/deptest/msvc64-5/pnacl/bin/pnacl-clang++.bat - skipped

Observe that with 3.22 it says Detecting C compiler ABI info - failed while with 3.19 Detecting C compiler ABI info - done.

In both cases I was building from the Visual Studio subproject (hence NMake generator).

slipher avatar Jun 15 '22 05:06 slipher