[llvm-bugs] [Bug 51884] New: Clang build fails when build directory contains space character

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 16 17:38:15 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51884

            Bug ID: 51884
           Summary: Clang build fails when build directory contains space
                    character
           Product: clang
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bsp2bsp-llvm at yahoo.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

Clang build fails when build directory contains space character.

Error messages:

[ 95%] Linking CXX executable ../../../../bin/clang
clang: error: no such file or directory:
'Space/Net/llvm/Build/tools/clang/tools/driver/Info.plist'
make[2]: *** [bin/clang-14] Error 1
make[1]: *** [tools/clang/tools/driver/CMakeFiles/clang.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

The path name is actually:
  'Dev Space/Net/llvm/Build/tools/clang/tools/driver/Info.plist'

This is corrective patch:

cd ".../llvm-project/clang/tools/driver"
patch <<'EOFF'
--- CMakeLists.txt    2021-09-14 13:10:43.000000000 -0700
+++ CMakeLists-fixed.txt    2021-09-14 13:13:16.000000000 -0700
@@ -82,7 +82,7 @@
   set(TOOL_INFO_PLIST_OUT "${CMAKE_CURRENT_BINARY_DIR}/${TOOL_INFO_PLIST}")
   target_link_libraries(clang
     PRIVATE
-    "-Wl,-sectcreate,__TEXT,__info_plist,${TOOL_INFO_PLIST_OUT}")
+    "-Wl,-sectcreate,__TEXT,__info_plist,\"${TOOL_INFO_PLIST_OUT}\"")
   configure_file("${TOOL_INFO_PLIST}.in" "${TOOL_INFO_PLIST_OUT}" @ONLY)

   set(TOOL_INFO_UTI)
EOFF

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210917/a139f562/attachment-0001.html>


More information about the llvm-bugs mailing list