# Windows Build: Cannot open source file: 'tools\\lldb\\bindings\\python\\LLDBWrapPython.cpp': No such file or directory

**URL:** <https://forums.swift.org/t/windows-build-cannot-open-source-file-tools-lldb-bindings-python-lldbwrappython-cpp-no-such-file-or-directory/42330>\
**Category:** Windows\
**Created:** [November 29, 2020, 2:43am UTC](https://forums.swift.org/t/windows-build-cannot-open-source-file-tools-lldb-bindings-python-lldbwrappython-cpp-no-such-file-or-directory/42330 "2020-11-29T02:43:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![WildCat](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/wildcat/32/9374_2.png) [@WildCat](https://forums.swift.org/u/WildCat)\
**Post date:** [November 29, 2020, 2:43am UTC](https://forums.swift.org/t/windows-build-cannot-open-source-file-tools-lldb-bindings-python-lldbwrappython-cpp-no-such-file-or-directory/42330/1 "2020-11-29T02:43:50Z")

</div>

Environment:

```swift
Edition	Windows 10 Pro
Version	20H2
Installed on	‎11/‎18/‎2020
OS build	19042.630
Experience	Windows Feature Experience Pack 120.2212.31.0
Microsoft Visual Studio Enterprise 2019
Version 16.8.2

```

Repro step and output:

```swift
S:\>ninja -C S:\b\1
ninja: Entering directory `S:\b\1'
[2/804] Performing build step for 'libdispatch'
ninja: no work to do.
[3/802] Building CXX object tools\lldb\source\API\CMakeFiles\liblldb.dir\ __\__ \bindings\python\LLDBWrapPython.cpp.obj
FAILED: tools/lldb/source/API/CMakeFiles/liblldb.dir/ __/__ /bindings/python/LLDBWrapPython.cpp.obj
C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\cl.exe /nologo /TP -DEXPORT_LIBLLDB -DGTEST_HAS_RTTI=0 -DLLDB_CONFIGURATION_RELEASE -DLLDB_ENABLE_SWIFT -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D __STDC_CONSTANT_MACROS -D__ STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -Itools\lldb\source\API -IS:\llvm-project\lldb\source\API -Itools\lldb\source -IS:\llvm-project\lldb\include -Itools\lldb\include -Iinclude -IS:\llvm-project\llvm\include -I"C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__ qbz5n2kfra8p0\include" -IS:\llvm-project\llvm\..\clang\include -Itools\lldb\..\clang\include -IS:\swift\include -Itools\lldb\..\swift\include -IS:\llvm-project\lldb\source\. /DWIN32 /D_WINDOWS /Zc:inline /Zi /Zc:strictStrings /Oi /Zc:rvalueCast /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd4324 -w14062 -we4238 /Gw /MD /O2 /Ob2 -wd4018 -wd4068 -wd4150 -wd4201 -wd4251 -wd4521 -wd4530 /EHs-c- /GR- -UNDEBUG -std:c++14 /W0 /showIncludes /Fotools\lldb\source\API\CMakeFiles\liblldb.dir\ __\__ \bindings\python\LLDBWrapPython.cpp.obj /Fdtools\lldb\source\API\CMakeFiles\liblldb.dir\ /FS -c tools\lldb\bindings\python\LLDBWrapPython.cpp
cl : Command line warning D9025 : overriding '/W4' with '/W0'
c1xx: fatal error C1083: Cannot open source file: 'tools\lldb\bindings\python\LLDBWrapPython.cpp': No such file or directory
[28/802] Building CXX object tools\swift\lib\ClangImporter\CMakeFiles\swiftClangImporter.dir\ImportDecl.cpp.obj
ninja: build stopped: subcommand failed.

```

I'm following the documentation ([swift/WindowsBuild.md at main · apple/swift · GitHub](https://github.com/apple/swift/blob/main/docs/WindowsBuild.md#MSVC)) to build Swift on Windows. But stuck on this point.

In addition, I believe there should be a mistake in the "Build the toolchain" section:

```swift
-D CMAKE_INSTALL_PREFIX=C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr ^

```

Because `C:\Library` does not exist.

---

<div class="post-metadata">

**Author:** ![Michael\_Gottesman](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/michael_gottesman/32/280_2.png) [@Michael\_Gottesman](https://forums.swift.org/u/Michael_Gottesman)\
**Post date:** [November 29, 2020, 4:46am UTC](https://forums.swift.org/t/windows-build-cannot-open-source-file-tools-lldb-bindings-python-lldbwrappython-cpp-no-such-file-or-directory/42330/2 "2020-11-29T04:46:00Z")

</div>

@compnerd

---

<div class="post-metadata">

**Author:** ![compnerd](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/compnerd/32/2165_2.png) [@compnerd](https://forums.swift.org/u/compnerd)\
**Post date:** [November 29, 2020, 6:50pm UTC](https://forums.swift.org/t/windows-build-cannot-open-source-file-tools-lldb-bindings-python-lldbwrappython-cpp-no-such-file-or-directory/42330/3 "2020-11-29T18:50:57Z")

</div>

The `CMAKE_INSTALL_PREFIX` isn't a mistake, that is the correct path - it will be created during installation.

The error that you are seeing is likely due to an out-of-date checkout of `llvm-project`; are you sure you are at the current `swift/master` of the repository?. The file is at [llvm-project/LLDBWrapPython.cpp at swift/main · apple/llvm-project (github.com)](https://github.com/apple/llvm-project/blob/swift/main/lldb/bindings/python/static-binding/LLDBWrapPython.cpp)

This location was changed by @JDevlieghere during the last switch, and he might be a better person to diagnose the issue.

---

<div class="post-metadata">

**Author:** ![WildCat](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/wildcat/32/9374_2.png) [@WildCat](https://forums.swift.org/u/WildCat)\
**Post date:** [December 1, 2020, 3:53pm UTC](https://forums.swift.org/t/windows-build-cannot-open-source-file-tools-lldb-bindings-python-lldbwrappython-cpp-no-such-file-or-directory/42330/4 "2020-12-01T15:53:20Z")

</div>

Thanks for your reply!

I believe it is the `swift/main` branch:

```swift
C:\swift_build>cd llvm-project

C:\swift_build\llvm-project>git branch
* swift/main

```

After pulling latest changes of `llvm-project`, this issue is resolved.

Thank you!
