-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[UWP] Could not determine vs dep dependency prefix string #11257
Comments
Ok what is going on here is that meson is using the wrong compiler flags to compile a |
To give more detail. The project thorvg is defined as a cpp project so meson uses the cpp flags for the detection but MSVC sees the |
…language It is possible, albeit possibly inadvisable, for the exact combination of MSVC and "$CXX has C++ specific flags in it" to occur. When this happens, and cl.exe is given a filename ending in .c, it complains that you cannot compile a .c file with that option. Instead, pick the first filename matching that language and use that as the temporary filename. This more or less matches what we do in compiler-time checks. And it's the proper thing to do, rather than assume that cl.exe, when detected as the current C++ compiler, can *also* compile C because it's *also* a C compiler. Fixes mesonbuild#11257
... Aside: you do not need to add either /nologo or /utf-8 since Meson always adds both of those (you can stop Meson from using /utf-8 only by passing your own competing /source-charset). |
I have posted a PR which should fix this. It checks the compiler language and ends up using incdetect.cpp instead of incdetect.c (there is a language -> extensions map which is easy to use for this -- |
@eli-schwartz: To be clear: The flags are coming from CMake and the native/cross files are generated with the flags from CMake. From the description in https://www.reddit.com/r/cpp/comments/ztsabe/comment/j1jw013/?context=3 which is related to #11143 I need to pass all flags via the compiler to force them and not make the project overwrite them (furthermore I am not going to filter them just to make meson happy .... ). Be aware that I also applied:
to make thorvg even compile. Somehow the default_options 'buildtype=debugoptimized' (and maybe 'optimization=s' )took precedence over what vcpkg passes on the command line/native file, resulting in |
You might be interested in always passing
The project should not be overwriting cpp_args, but the native/cross files have less precedence compared to passing Anyway, I am not overly concerned with where you define them :D but I do notice they seem to be getting passed twice, for the most part? |
At any rate, if you have time to give #11259 a test run and see if that solves the problem for you, that would be neat. :) |
does
Seems to work. Will add it as a patch to |
…language It is possible, albeit possibly inadvisable, for the exact combination of MSVC and "$CXX has C++ specific flags in it" to occur. When this happens, and cl.exe is given a filename ending in .c, it complains that you cannot compile a .c file with that option. Instead, pick the first filename matching that language and use that as the temporary filename. This more or less matches what we do in compiler-time checks. And it's the proper thing to do, rather than assume that cl.exe, when detected as the current C++ compiler, can *also* compile C because it's *also* a C compiler. Fixes #11257
…language It is possible, albeit possibly inadvisable, for the exact combination of MSVC and "$CXX has C++ specific flags in it" to occur. When this happens, and cl.exe is given a filename ending in .c, it complains that you cannot compile a .c file with that option. Instead, pick the first filename matching that language and use that as the temporary filename. This more or less matches what we do in compiler-time checks. And it's the proper thing to do, rather than assume that cl.exe, when detected as the current C++ compiler, can *also* compile C because it's *also* a C compiler. Fixes #11257
…language It is possible, albeit possibly inadvisable, for the exact combination of MSVC and "$CXX has C++ specific flags in it" to occur. When this happens, and cl.exe is given a filename ending in .c, it complains that you cannot compile a .c file with that option. Instead, pick the first filename matching that language and use that as the temporary filename. This more or less matches what we do in compiler-time checks. And it's the proper thing to do, rather than assume that cl.exe, when detected as the current C++ compiler, can *also* compile C because it's *also* a C compiler. Fixes #11257
…language It is possible, albeit possibly inadvisable, for the exact combination of MSVC and "$CXX has C++ specific flags in it" to occur. When this happens, and cl.exe is given a filename ending in .c, it complains that you cannot compile a .c file with that option. Instead, pick the first filename matching that language and use that as the temporary filename. This more or less matches what we do in compiler-time checks. And it's the proper thing to do, rather than assume that cl.exe, when detected as the current C++ compiler, can *also* compile C because it's *also* a C compiler. Fixes #11257
Describe the bug
thorvg fails to configure with:
ERROR: Could not determine vs dep dependency prefix string. output: b"Microsoft (R) C/C++ Optimizing Compiler Version 19.34.31937 for x64\r\nCopyright (C) Microsoft Corporation. All rights reserved.\r\n\r\ncl : Command line error D8048 : cannot compile C file 'incdetect.c' with the /ZW option\r\n" b''
cross file:
meson-x64-uwp-dbg.log
(due to #11143 all flags are passed via the compiler)
configure log:
config-x64-uwp-dbg-out.log
meson log:
config-x64-uwp-dbg-meson-log.txt.log
pixman for example works fine with the cross file so what is going on here?
The text was updated successfully, but these errors were encountered: