Skip to content

After this patch it is very hard to build lldb (debug version) on Windows. #104895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
medismailben opened this issue Aug 20, 2024 · 3 comments · Fixed by #104896
Closed

After this patch it is very hard to build lldb (debug version) on Windows. #104895

medismailben opened this issue Aug 20, 2024 · 3 comments · Fixed by #104896

Comments

@medismailben
Copy link
Member

          After this patch it is very hard to build lldb (debug version) on Windows.

We got the errors like the following

D:\llvm-project\lldb\source\Plugins\ScriptInterpreter\Python\Interfaces\ScriptedThreadPlanPythonInterface\ScriptedThreadPlanPythonInterface.cpp: 
fatal error C1041: cannot open program database 'D:\build-lldb\tools\lldb\source\Plugins\ScriptInterpreter\Python\Interfaces\ScriptedThreadPlanPythonInterface\CMakeFiles\lldbPluginScriptInterpreterPythonScriptedThreadPlanPythonInterface.dir\lldbPluginScriptInterpreterPythonScriptedThreadPlanPythonInterface.pdb'; 
if multiple CL.EXE write to the same .PDB file, please use /FS

Note MAX_PATH is 260 on Windows. But the length of the path to .pdb is 262.
It is necessary to use 7 chars or less folder in the root of a disk to build lldb (debug version) on Windows using Microsoft VC++.
You must reduce the length of the paths.

Originally posted by @slydiman in #101672 (comment)

medismailben added a commit to medismailben/llvm-project that referenced this issue Aug 20, 2024
This patch tries to fix an issue with the windows debug builds where the
PDB file for python scripted interfaces cannot be opened since its path
length exceed the windows `MAX_PATH` limit:

llvm#101672 (comment)

This patch addresses the issue by building all the interfaces as a
single library plugin that initiliazes each component as part of its
`Initialize` method, instead of building each interface as its own
library plugin.

This keeps the build artifact path length smaller while respecting the
naming convention and without making any exception in the build system.

Fixes llvm#104895.

Signed-off-by: Med Ismail Bennani <[email protected]>
@Naville
Copy link
Contributor

Naville commented Aug 20, 2024

Yeah MSBuild still lacks long path support. Use another generator like Ninja instead

@llvmbot
Copy link
Member

llvmbot commented Aug 20, 2024

@llvm/issue-subscribers-lldb

Author: Med Ismail Bennani (medismailben)

After this patch it is very hard to build lldb (debug version) on Windows. We got the errors like the following ``` D:\llvm-project\lldb\source\Plugins\ScriptInterpreter\Python\Interfaces\ScriptedThreadPlanPythonInterface\ScriptedThreadPlanPythonInterface.cpp: fatal error C1041: cannot open program database 'D:\build-lldb\tools\lldb\source\Plugins\ScriptInterpreter\Python\Interfaces\ScriptedThreadPlanPythonInterface\CMakeFiles\lldbPluginScriptInterpreterPythonScriptedThreadPlanPythonInterface.dir\lldbPluginScriptInterpreterPythonScriptedThreadPlanPythonInterface.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS ``` Note MAX_PATH is 260 on Windows. But the length of the path to .pdb is 262. It is necessary to use 7 chars or less folder in the root of a disk to build lldb (debug version) on Windows using Microsoft VC++. You must reduce the length of the paths.

Originally posted by @slydiman in #101672 (comment)

@AaronBallman
Copy link
Collaborator

It might be nice to rename ScriptedThreadPlanPythonInterface.cpp to something a bit less wordy; it would be nice if there was a post-commit buildbot that built lldb on Windows with MSVC (not ninja) to help catch this sort of thing to avoid regressions.

medismailben added a commit that referenced this issue Aug 20, 2024
This patch tries to fix an issue with the windows debug builds where the
PDB file for python scripted interfaces cannot be opened since its path
length exceed the windows `MAX_PATH` limit:

#101672 (comment)

This patch addresses the issue by building all the interfaces as a
single library plugin that initiliazes each component as part of its
`Initialize` method, instead of building each interface as its own
library plugin.

This keeps the build artifact path length smaller while respecting the
naming convention and without making any exception in the build system.

Fixes #104895.

Signed-off-by: Med Ismail Bennani <[email protected]>
adrian-prantl pushed a commit to swiftlang/llvm-project that referenced this issue Oct 11, 2024
This patch tries to fix an issue with the windows debug builds where the
PDB file for python scripted interfaces cannot be opened since its path
length exceed the windows `MAX_PATH` limit:

llvm#101672 (comment)

This patch addresses the issue by building all the interfaces as a
single library plugin that initiliazes each component as part of its
`Initialize` method, instead of building each interface as its own
library plugin.

This keeps the build artifact path length smaller while respecting the
naming convention and without making any exception in the build system.

Fixes llvm#104895.

Signed-off-by: Med Ismail Bennani <[email protected]>
(cherry picked from commit 3565332)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants