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

parse_arguments: CannotCache(multiple input files) using /fp:fast with MSVC #950

Closed
Be-ing opened this issue Feb 6, 2021 · 9 comments · Fixed by #962
Closed

parse_arguments: CannotCache(multiple input files) using /fp:fast with MSVC #950

Be-ing opened this issue Feb 6, 2021 · 9 comments · Fixed by #962

Comments

@Be-ing
Copy link
Contributor

Be-ing commented Feb 6, 2021

I am struggling to get sccache working with MSVC using CMake. Maybe there is something already in the CMake project that is messing up sccache. sccache -s shows that every call is noncacheable. The server debug logs show:

[2021-02-06T18:48:39Z DEBUG sccache::server] handle_client: compile
[2021-02-06T18:48:39Z DEBUG sccache::server] check_compiler: Supported compiler
[2021-02-06T18:48:39Z DEBUG sccache::server] parse_arguments: CannotCache(multiple input files): ["/nologo", "/TP", "-DAMD64", "-DCHROMAPRINT_NODLL", "-DFLAC__NO_DLL", "-DMIXXX_BUILD_RELEASE", "-DMIXXX_DEBUG_ASSERTIONS_ENABLED", "-DMIXXX_DEBUG_ASSERTIONS_FATAL", "-DNDEBUG", "-DNOMINMAX", "-DQT_ACCESSIBILITY_SUPPORT_LIB", "-DQT_CONCURRENT_LIB", "-DQT_CORE_LIB", "-DQT_EVENTDISPATCHER_SUPPORT_LIB", "-DQT_FONTDATABASE_SUPPORT_LIB", "-DQT_GUI_LIB", "-DQT_NETWORK_LIB", "-DQT_NODLL", "-DQT_NO_DEBUG", "-DQT_OPENGL_LIB", "-DQT_SCRIPTTOOLS_LIB", "-DQT_SCRIPT_LIB", "-DQT_SQL_LIB", "-DQT_SVG_LIB", "-DQT_TABLET_SUPPORT", "-DQT_TESTCASE_BUILDDIR=\"D:/a/mixxx/mixxx/build\"", "-DQT_TESTLIB_LIB", "-DQT_THEME_SUPPORT_LIB", "-DQT_USE_QSTRINGBUILDER", "-DQT_WIDGETS_LIB", "-DQT_WINDOWSUIAUTOMATION_SUPPORT_LIB", "-DQT_XML_LIB", "-DSETTINGS_FILE=\"mixxx.cfg\"", "-DSFC_SUPPORTS_SET_COMPRESSION_LEVEL", "-DTAGLIB_STATIC", "-DUNICODE", "-DWIN32", "-DWINVER=0x0601", "-D_ATL_MIN_CRT", "-D_CRT_SECURE_NO_WARNINGS", "-D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING", "-D_USE_MATH_DEFINES", "-D_WIN32_WINNT=0x0601", "-D__BATTERY__", "-D__BROADCAST__", "-D__HID__", "-D__HSS1394__", "-D__MAD__", "-D__MEDIAFOUNDATION__", "-D__OPUS__", "-D__QTKEYCHAIN__", "-D__SNDFILE__", "-D__SQLITE3__", "-D__SSE2__", "-D__SSE__", "-D__VINYLCONTROL__", "-D__WINDOWS__", "-Imixxx-lib_autogen\\include", "-I..\\src", "-Isrc", "-I..\\lib\\fidlib", "-I..\\lib\\googletest-1.10.x\\googletest\\include", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\include", "-I..\\lib\\portaudio", "-I..\\lib\\rigtorp\\SPSCQueue\\include", "-I..\\lib\\qtscript-bytearray", "-I..\\lib\\replaygain", "-I..\\lib\\reverb", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\include\\opus", "-I..\\lib\\libebur128\\ebur128", "-I..\\lib\\kaitai", "-I..\\lib\\mp3guessenc-0.27.4", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtConcurrent", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtCore", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\.\\mkspecs\\win32-msvc", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtGui", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtANGLE", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtEventDispatcherSupport", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtFontDatabaseSupport", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtThemeSupport", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtAccessibilitySupport", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtWindowsUIAutomationSupport", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtNetwork", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtOpenGL", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtWidgets", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtScript", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtScriptTools", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtSql", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtSvg", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtTest", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\Qt-5.14.2\\include\\QtXml", "-I..\\lib\\qm-dsp", "-I..\\lib\\qm-dsp\\include", "-I..\\lib", "-IC:\\buildenv\\2.3-j00019-x64-release-fastbuild-static-55e94982-minimal\\include\\taglib", "-I..\\lib\\hidapi\\hidapi", "-I..\\lib\\xwax", "/DWIN32", "/D_WINDOWS", "/W3", "/GR", "/EHsc", "/MD", "/Z7", "/O2", "/Ob1", "/DNDEBUG", "/fp:fast", "/Gy", "-std:c++17", "/showIncludes", "/FoCMakeFiles\\mixxx-lib.dir\\src\\controllers\\colormapper.cpp.obj", "/FdCMakeFiles\\mixxx-lib.dir\\mixxx-lib.pdb", "/FS", "-c", "..\\src\\controllers\\colormapper.cpp"]

Reading #278 (comment) I tried replacing /Zi with /Z7 but that didn't help.

@garyzyg
Copy link

garyzyg commented Feb 10, 2021

That haunts me too.

[2021-02-10T15:50:56Z DEBUG sccache::server] parse_arguments: CannotCache(multiple input files): ["/FoD:\\MyWorkSpace\\Build\\MyPkg\\RELEASE_DDK3790\\X64\\MyPkg\\Application\\MyApp\\MyApp\\OUTPUT\\.\\AutoGen.obj", "/nologo", "/c", "/WX", "/GS-", "/X", "/W4", "/Gs32768", "/D", "UNICODE", "/O1ib2s", "/GL", "/Gy", "/FIAutoGen.h", "/EHs-c-", "/GR-", "/GF", "/ID:\\MyWorkSpace\\MyPkg\\Application\\MyApp", "/ID:\\MyWorkSpace\\Build\\MyPkg\\RELEASE_DDK3790\\X64\\MyPkg\\Application\\MyApp\\MyApp\\DEBUG", "/ID:\\MyWorkSpace\\MdePkg", "/ID:\\MyWorkSpace\\MdePkg\\Include", "/ID:\\MyWorkSpace\\MdePkg\\Include\\X64", "/ID:\\MyWorkSpace\\ShellPkg", "/ID:\\MyWorkSpace\\ShellPkg\\Include", "D:\\MyWorkSpace\\Build\\MyPkg\\RELEASE_DDK3790\\X64\\MyPkg\\Application\\MyApp\\MyApp\\DEBUG\\AutoGen.c"

@Be-ing
Copy link
Contributor Author

Be-ing commented Feb 16, 2021

No response at all in 10 days? I was hoping sccache would be the one compiler cache that supports MSVC and is still maintained.

@Be-ing Be-ing changed the title parse_arguments: CannotCache(multiple input files) using MSVC with CMake parse_arguments: CannotCache(multiple input files) using /fp:fast with MSVC Feb 26, 2021
@Be-ing
Copy link
Contributor Author

Be-ing commented Feb 26, 2021

I found the culprit. Sccache works without using the /fp:fast option. Unfortunately I doubt removing this is acceptable for realtime audio...

@Be-ing
Copy link
Contributor Author

Be-ing commented Feb 26, 2021

@garyzyg I suspect your issue is the stray UNICODE argument. You probably want /utf-8 instead.

@Be-ing
Copy link
Contributor Author

Be-ing commented Feb 26, 2021

fp is incorrectly treated as a Separated argument but it is really Concatenated. Fix is in #962.

@garyzyg
Copy link

garyzyg commented Feb 26, 2021

@garyzyg I suspect your issue is the stray UNICODE argument. You probably want /utf-8 instead.

@Be-ing sccache cached the result after I removed "/O1ib2s". My case looks different from yours.

@Be-ing
Copy link
Contributor Author

Be-ing commented Feb 26, 2021

I don't think there is any /O1ib2s option for MSVC? That would explain why sccache treated it as an extra input file instead of a compiler option.

@garyzyg
Copy link

garyzyg commented Feb 26, 2021

Actually MSVC in WDK 7600.16385.1 accepted this.

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.207 for 80x86

EDK2 used it widely.
https://edk2-docs.gitbook.io/edk-ii-build-specification/appendix_k_third_party_tool_flags

@shaforostoff
Copy link

I think I was hit by this. I solved the issue for myself by downgrading to 0.2.12. The only thing to take care with it is to avoid having spaces after -D

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

Successfully merging a pull request may close this issue.

3 participants