Skip to content
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

Compilation fails when include paths contain spaces #1314

Open
akbyrd opened this issue Aug 19, 2023 · 5 comments
Open

Compilation fails when include paths contain spaces #1314

akbyrd opened this issue Aug 19, 2023 · 5 comments
Assignees
Labels

Comments

@akbyrd
Copy link

akbyrd commented Aug 19, 2023

I'm attempting to use CPT with an Unreal codebase. It ends up failing due to spaces in include paths.
Snippet:

Cannot get all active documents, close all tabs and try again
PROJECT: D:\perforce\...\Engine\Intermediate\ProjectFiles\...vcxproj [DebugGame_Editor|x64]
1: D:\perforce\....cpp

...

clang++: error: no such file or directory: 'Studio\2022\Professional\VC\Tools\MSVC\14.37.32822\include -isystemC:\Program'
clang++: error: no such file or directory: 'Files\Microsoft'
clang++: error: no such file or directory: 'Visual'
clang++: error: no such file or directory: 'Studio\2022\Professional\VC\Tools\MSVC\14.37.32822\atlmfc\include -isystemC:\Program'

It looks like CPT is reading the vcxproj and isn't always escaping paths as expected when translating the msvc commands to clang commands.

@mariru27
Copy link
Contributor

Hi @akbyrd,

Thank you for reporting this problem.

For better understanding, can you give me the element that contains "include paths" in .vcxproj file?

Kind regards,
Marina

@mariru27 mariru27 self-assigned this Aug 28, 2023
@mariru27 mariru27 added the bug label Aug 28, 2023
@mariru27
Copy link
Contributor

mariru27 commented Aug 28, 2023

Also @akbyrd, can you give us the full output log? (set verbosity level to 2 from Settings -> Compile)

@mariru27
Copy link
Contributor

Hi @akbyrd,

Can you set verbosity level to maximum and give us full verbose log? From Settings -> Compile -> Verbosity level

Kind regards,
Marina

@akbyrd
Copy link
Author

akbyrd commented Sep 14, 2023

Apologies for the delay. I've truncated the log once the errors start repeating. Quite a lot more of them end up being emitted but they're duplicates.

CPT Log Verbosity 2.txt

For some additional context:

Unreal has a bit of a unique setup. The .vcxproj file is not actually used to compile directly. The project is configured with NMake commands that invoke an Unreal batch script. The script invokes a program called UnrealBuildTool that in turn invokes the compiler.

UnrealBuildTool can also emit compile_commands.json files for clang.

It's unclear to me if CPT is scraping what it can from vcxproj or doing something else. I don't necessarily expect CPT is actually going to be able to compile the project due to the custom build tool (though it would be awesome if it ended up working out that way), but I would expect it to be failing somewhere other than include paths.

@mariru27
Copy link
Contributor

Hi @akbyrd,

Try to update Clang Power Tools to v2023.9.0
Let me know if you still have the same issue

Kind regards,
Marina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants