CMake juceaide failing in tests (8.0.x)

Hi all, I’m trying to use cmake to build a juce project in a windows container. I have it working on my host pc, and on a linux container, however it fails within the windows container itself, specifically on the running tests step for juceaide:

execute_process(COMMAND "${imported_location}" version
        RESULT_VARIABLE result_variable
        OUTPUT_VARIABLE output
        ERROR_VARIABLE output)

    if(result_variable)
        message(FATAL_ERROR "Testing juceaide failed:\noutput: ${output}")
    endif()

The output, in this case, is empty in the container, causing the error. If I test the same exe on my host pc, it manages to return the current JUCE version.

I’m aware of someone having a similar issue to mine, however the fixes they applied don’t work in my case, and I’ve tried a few different JUCE 8 versions with no luck. I imagine that this error is probably due to the fact my its a headless windows container, but if I could get any sort of clarification on the subject I’d be grateful.

It’s interesting that the executable works on the host but not on the container. My guess is that the executable requires a specific environment (e.g. certain runtime/library versions) that aren’t available on the container for some reason.

Are you able to run the program in the container under a debugger? That might provide some more details that would help to narrow down the problem.

Hi, thanks for the response! I had managed to narrow it down to that previously, and the only dll I could find that was missing was dcomp due to the container being headless, so I kind of brute forced a solution to get dcomp.dll into the container, but even then it wasn’t working, which is why I ended up asking here. Anyways, here’s the output using a debugger:

PS C:\repos\app-vstplugin\build\_deps\juce-build\tools\extras\build\juceaide\juceaide_artefacts\custom> & "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe" -g -G "C:\repos\app-vstplugin\build\_deps\juce-build\tools\extras\build\juceaide\juceaide_artefacts\custom\juceaide.exe" version

Microsoft (R) Windows Debugger Version 10.0.19041.685 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: C:\repos\app-vstplugin\build\_deps\juce-build\tools\extras\build\juceaide\juceaide_artefacts\custom\juceaide.exe version

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
Symbol search path is: srv*
Executable search path is:
ModLoad: 00007ff7`b84f0000 00007ff7`b8d48000   image00007ff7`b84f0000
ModLoad: 00007ffa`b3ae0000 00007ffa`b3ce1000   ntdll.dll
ModLoad: 00007ffa`b0fa0000 00007ffa`b105c000   C:\Windows\System32\KERNEL32.DLL
ModLoad: 00007ffa`b0820000 00007ffa`b0b90000   C:\Windows\System32\KERNELBASE.dll
ModLoad: 00007ffa`afde0000 00007ffa`aff85000   C:\Windows\System32\USER32.dll
ModLoad: 00007ffa`b2aa0000 00007ffa`b2ac6000   C:\Windows\System32\win32u.dll
ModLoad: 00007ffa`b0200000 00007ffa`b022c000   C:\Windows\System32\GDI32.dll
ModLoad: 00007ffa`b00e0000 00007ffa`b01fd000   C:\Windows\System32\gdi32full.dll
ModLoad: 00007ffa`aff90000 00007ffa`b0030000   C:\Windows\System32\msvcp_win.dll
ModLoad: 00007ffa`b0570000 00007ffa`b0680000   C:\Windows\System32\ucrtbase.dll
ModLoad: 00007ffa`af200000 00007ffa`af959000   C:\Windows\System32\SHELL32.dll
ModLoad: 00007ffa`b0230000 00007ffa`b0366000   C:\Windows\System32\ole32.dll
ModLoad: 00007ffa`b0b90000 00007ffa`b0f00000   C:\Windows\System32\combase.dll
ModLoad: 00007ffa`b0370000 00007ffa`b048e000   C:\Windows\System32\RPCRT4.dll
ModLoad: 00007ffa`b0490000 00007ffa`b0567000   C:\Windows\System32\OLEAUT32.dll
ModLoad: 00007ffa`b06d0000 00007ffa`b07b3000   C:\Windows\System32\COMDLG32.dll
ModLoad: 00007ffa`af020000 00007ffa`af0c3000   C:\Windows\System32\msvcrt.dll
ModLoad: 00007ffa`aed90000 00007ffa`aee7a000   C:\Windows\System32\shcore.dll
ModLoad: 00007ffa`ae9c0000 00007ffa`aea1f000   C:\Windows\System32\SHLWAPI.dll
ModLoad: 00007ffa`aea20000 00007ffa`aead1000   C:\Windows\System32\ADVAPI32.dll
ModLoad: 00007ffa`af140000 00007ffa`af1e2000   C:\Windows\System32\sechost.dll
ModLoad: 00007ffa`af0e0000 00007ffa`af107000   C:\Windows\System32\bcrypt.dll
ModLoad: 00007ffa`ae800000 00007ffa`ae871000   C:\Windows\System32\WS2_32.dll
ModLoad: 00007ffa`a17b0000 00007ffa`a1a55000   C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.20348.3451_none_94783cb1eef01314\COMCTL32.dll
ModLoad: 00007ffa`aeae0000 00007ffa`aeb11000   C:\Windows\System32\IMM32.dll
ModLoad: 00007ffa`b1940000 00007ffa`b194a000   C:\Windows\SYSTEM32\VERSION.dll
ModLoad: 00007ffa`a12b0000 00007ffa`a17ad000   C:\Windows\SYSTEM32\WININET.dll
ModLoad: 00007ffa`a5270000 00007ffa`a5297000   C:\Windows\SYSTEM32\WINMM.dll
ModLoad: 00007ffa`ad1a0000 00007ffa`ad1d0000   C:\Windows\SYSTEM32\dwmapi.dll
ModLoad: 00007ffa`a0ce0000 00007ffa`a12a6000   C:\Windows\SYSTEM32\d2d1.dll
ModLoad: 00007ffa`ad0a0000 00007ffa`ad181000   C:\Windows\SYSTEM32\dxgi.dll
ModLoad: 00007ffa`a0a50000 00007ffa`a0cd3000   C:\Windows\SYSTEM32\d3d11.dll
ModLoad: 00007ffa`a9af0000 00007ffa`a9d10000   C:\Windows\SYSTEM32\dbghelp.dll
ModLoad: 00007ffa`a07f0000 00007ffa`a0a4d000   C:\Windows\SYSTEM32\dcomp.dll
ModLoad: 00007ffa`ad080000 00007ffa`ad097000   C:\Windows\SYSTEM32\kernel.appcore.dll
(2d8.6bc): Unknown exception - code c0000139 (first chance)
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\atlmfc.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\concurrency.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\cpp_rest.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\stl.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\Windows.Data.Json.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\Windows.Devices.Geolocation.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\Windows.Devices.Sensors.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\Windows.Media.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\windows.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\winrt.natvis'