[llvm-dev] Building LLVM in WSL fails

Zhang via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 2 17:09:08 PDT 2020


Hi:
I was setting up my LLVM dev environment after migrating to WSL2 and noticed the following CMake configure errors:


```
.....
-- Performing Test LLVM_HAS_ATOMICS - Success
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Success
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG - Failed
-- Performing Test HAS_MAYBE_UNINITIALIZED
-- Performing Test HAS_MAYBE_UNINITIALIZED - Success

: not found
: not found
: not found
: not found
: not found
: not found
: not found
: not found
: not found
/mnt/c/Users/1/Desktop/Development/LLVM/llvm/cmake/config.guess: 71: Syntax error: word unexpected (expecting "in")
CMake Error at cmake/modules/GetHostTriple.cmake:36 (message):
  Failed to execute
  /mnt/c/Users/1/Desktop/Development/LLVM/llvm/cmake/config.guess
Call Stack (most recent call first):
  cmake/config-ix.cmake:395 (get_host_triple)
  CMakeLists.txt:672 (include)

```


Quick Google shows BitCoin ran into the same issue a while ago ( https://github.com/bitcoin/bitcoin/issues/10269 ) and one of WSL developers pointed out that this is due to WSL now merges Windows native $PATH with WSL $PATH and build scripts are not able to handle the unescaped characters.
However manually removing Windows paths from $PATH results in the exact same error. Now I'm confused.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200903/aac7e821/attachment.html>


More information about the llvm-dev mailing list