Open kkartaltepe opened 6 years ago
Since ucrtbased.dll is not intended to be installed execution of the test cases fails.
So the dll is not in PATH, but the .lib is in the library search path, so the tests link against the .lib and can't find the dll?
That's strange. Why does MSVC in debug mode have such a broken setup? How do people run executables linked in debug mode?
FWIW, I have not seen this problem on Windows 8.1 with VS14 in debug mode.
I do not use cmd/powershell so it may be a case of env vars not propagating to meson's testing process. I believe this DLL may be picked up in a normal build from %LIB% (windows LD_LIBRARY_PATH equivalent) (Which is set in my shell but not set globally, similarly to how the MSVC Build Tools command prompts set up environment variables). I havnt tested with the Build Tools command prompts but I suspect that will also display this issue.
--Edit-- I have confirmed the issue also appears when using the MSVC Build Tools command prompt. Most likely it is due to how meson calls out to the start the process in both my case and the case when using a real cmd instance. It probably does not inherit the environment variables.
What are the detailed steps to reproduce this? Starting with which build tools cmd.exe you ran, what VS version you have installed (community or enterprise), etc.
It would also be useful to attach the output of set
from inside the cmd.exe env.
pre) Confirm you do not have some ill begotten ucrtbased.dll in %WINDIR%/system32 1) Install VS14 build tools. Available here http://landinghub.visualstudio.com/visual-cpp-build-tools 2) run native x64 build prompt 3) attempt to compile any meson project that requires these checks (for example glib) 4) Confirm config.h does not specify the size of computed values (such as SIZEOF_SIZE_T) 5) Cry because meson doesnt bother to report it failed to even run the check.
I've been redoing my build process. so i went ahead and checked up on this and its still occurring. Though it looks like the error is being reported and is due to urctbased
as expected
example of recent compilation attempt: https://i.imgur.com/HBHP4QJ.png
output of set
: https://gist.github.com/kkartaltepe/d68355f72a0059f88caa4c220c83c2d6
Still on the same toolchain, compiling x64 to x86 currently. It looks like it wasnt mentioned earlier but this is using the ninja backend and not the VS backend.
@kkartaltepe, is this still happening now ?
I dont have have a windows machine to compile on or the intention to get one again in the immediate future. Likely its neigh impossible to acquire either windows 8.1 or vs14 build tools though, I dont know if it affected other versions of the compiler or other platforms.
--- edit anyone with a windows platform can try I was simply building an unmodified glib https://gitlab.gnome.org/GNOME/glib
--- edit2 It may require setting the build to debug instead of debugoptimized, im not sure if that default had changed since I first made this report. But in debugoptimized I dont think msvc will link the debug urctd and will instead use the regular and available ucrt.
I hope this is the right place to log this bug. If not please point me in the right direction.
Using ninja backend the sizeof test case builds in debug mode and links against the windows c debug runtime. Since
ucrtbased.dll
is not intended to be installed execution of the test cases fails.Ideally this test would either use release mode to link against
ucrtbase.dll
which should be installed and available or use an alternate method of return so as not to require linking against the c runtime at all.Installing the
ucrtbased.dll
globally works around the issue but is not a solution.Example output logged when error occurs (I use cygwin for my terminal but I use the native toolchain)