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

cuda_rules triggers assert "Something went wrong in makefile parsing to get headers. The target should be an object file." #181

Open
axbycc-mark opened this issue Apr 6, 2024 · 0 comments

Comments

@axbycc-mark
Copy link

I'm using the cuda_rules https://github.com/bazel-contrib/rules_cuda project to generate a cuda_library target.
Running :refresh_all triggers the assert here https://github.com/hedronvision/bazel-compile-commands-extractor/blob/4689147cf4b1c2d507fd8bbb8eb748a7bbaad4ef/refresh.template.py#L176C45-L176C102.

The function documentation mentions this clang or gcc.
Parse a set of headers from the contents of a *.d dependency file generated by clang (or gcc)

On my system, it is somehow encountering an nvcc generated file, erroring out with the following.

Something went wrong in makefile parsing to get headers. The target should be an object file. Output:
Failed to run D:/TMP/marki/tmpxft_00007f68_00000000-2.bat (The directory name is invalid.

).
nvcc fatal   : Could not set up the environment for Microsoft Visual Studio using 'D:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/HostX64/x64/../../../../../../../VC/Auxiliary/Build/vcvars64.bat'

Commenting out the assert, and just returning empty set() here allows the :refresh_all to seemingly generate a correct (or at least very usable) compile_commands.json.

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

No branches or pull requests

1 participant