0

I am trying to build llvm from source following their instructions under the using visual studio section. When I run the command cmake -DLLVM_ENABLE_PROJECTS=clang -G "Visual Studio 17 2022" -A x64 -Thost=x64 ..\llvm, everything appears fine, until i see the following:

-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
CMake Error at C:/Users/[REDACTED]/Desktop/llvm-project/build/CMakeFiles/CMakeTmp/CMakeLists.txt:23 (set):
  Syntax error in cmake code at

    C:/Users/[REDACTED]/Desktop/llvm-project/build/CMakeFiles/CMakeTmp/CMakeLists.txt:23

  when parsing string

    C:\Users\[REDACTED]\Desktop\llvm-project\build/CMakeFiles/CMakeTmp

  Invalid character escape '\U'.


CMake Error at cmake/modules/GetErrcMessages.cmake:32 (try_run):
  Failed to configure test project build system.
Call Stack (most recent call first):
  cmake/config-ix.cmake:477 (get_errc_messages)
  CMakeLists.txt:986 (include)


-- Configuring incomplete, errors occurred!

I think I can deal with the first three lines, but what do I do about the fact that it is improperly escaped?

8
  • Use / for your path separator not \
    – drescherjm
    Commented Mar 21 at 23:06
  • @drescherjm It appears that you cannot change the path separator on windows, (answers.microsoft.com/en-us/windows/forum/all/…) Commented Mar 21 at 23:41
  • My guess would be something in REDACTED is confusing cmake Commented Mar 22 at 1:29
  • 1
    The llvm build instructions admonish you "do not install into a path containing spaces (e.g. c:\Documents and Settings\...) as it will fail."
    – Botje
    Commented Mar 22 at 8:53
  • 1
    You might not be able to change the default directory separator, or the fact that "\" is the root directory name, but C:/Users is still a valid directory name, using a non-default separator.
    – BoP
    Commented Mar 22 at 11:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.