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

0.7.6 doesn't handle MSVC /Tp option correctly #2062

Open
virtuald opened this issue Jan 29, 2024 · 1 comment
Open

0.7.6 doesn't handle MSVC /Tp option correctly #2062

virtuald opened this issue Jan 29, 2024 · 1 comment

Comments

@virtuald
Copy link

virtuald commented Jan 29, 2024

I'm building a python package using setuptools, so I don't have a ton of control over the command line issued. However, 0.5.3 worked, and the ccache action we're using bumped to 0.7.4 (which I then bumped to 0.7.6) and my compiles are failing now.

You can see in the command line that there's a ... /Tpplayingwithfusion/pwf.cpp ... , which then leads to the following sccache error:

sccache: encountered fatal error
sccache: error: while hashing the input file 'D:/Tpplayingwithfusion/pwf.cpp'
sccache: caused by: while hashing the input file 'D:/Tpplayingwithfusion/pwf.cpp'
sccache: caused by: The system cannot find the path specified. (os error 3)

I presume this is a regression in sccache, since I'm using the same python interpreter/setuptools/etc?

According to the MSVC docs, /Tp is an option that specifies that the following filename is a C++ file regardless of extension: https://learn.microsoft.com/en-us/cpp/build/reference/tc-tp-tc-tp-specify-source-file-type?view=msvc-170

Python's distutils (in setuptools) forces /Tp and /Tc options: https://github.com/pypa/setuptools/blob/04a6bfe785ea45d32357b60a2f9692956c4d8beb/setuptools/_distutils/_msvccompiler.py#L369

Sorry I can't give you a smaller reproducer, but this seems pretty straightforward?

@virtuald
Copy link
Author

virtuald commented Feb 3, 2024

ccache fixed this in ccache/ccache@7b8aaf5. There's apparently a /Fo option also that ccache didn't support, it's possible sccache doesn't either (I haven't checked).

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