CNA-GAP-059: In a MinGW-w64 cross tree CnaTests gets a Wine CROSSCOMPILING_EMULATOR only when the default renderer is DIRECTX9

CNA snapshot 3b43bd86  ·  Known Issues › Functional gaps  ·  source links pinned to 3b43bd86

✓

Evidence basis: source-verified at the pinned commit. Claims on this page were checked by reading the CNA source at commit 3b43bd86; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.

For any other default renderer (for example SDL_GPU, the toolchain file's own usage example) gtest discovery (DISCOVERY_MODE PRE_TEST) and ctest try to execute the Windows CnaTests binary directly on the Linux host.

Identifier
CNA-GAP-059
Category
Functional gap
Subsystem
Build & CI
Status
Open
Verified against
CNA 3b43bd86 (3b43bd8687ed46523d873f9bec4b32bd8481dcb5)
Evidence basis
Source-verified: read at TARGET, not executed
Tests touching this area
None
Affected contract
cmake/UnitTests.cmake CnaTests CROSSCOMPILING_EMULATOR chain; cross-compiled CTest runs

Expected behaviour

CNA's comment above the chain says a cross-compiled CnaTests.exe needs a Wine wrapper, "or every ctest invocation in this build tree fails outright trying to exec a Windows PE natively on the Linux host".

Actual behaviour at TARGET

Inside if(CMAKE_CROSSCOMPILING), UnitTests.cmake sets CROSSCOMPILING_EMULATOR only for a DIRECTX9 default. Any other default - including SDL_GPU, which mingw-w64.cmake uses in its own usage example - gets no emulator, while CNA_BUILD_TESTS defaults to ON.

Source locations

Evidence

Checked by reading the named sources at 3b43bd86; nothing was built or executed for this entry. Whether a host silently succeeds depends on binfmt_misc handing PE files to Wine; on a host without that, the result follows from the missing property.

Focused reproduction

No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.

Current tests

No workflow cross-compiles CnaTests with MinGW at all; the cross builds recorded in CNA's history are local runs.

Regression test

A generic Wine emulator fallback for every other default (or a configure warning), plus a configure-only CI check of a MinGW SDL_GPU tree with tests on.

Blast radius

Linux-hosted MinGW cross builds with tests enabled and a default renderer other than DIRECTX9. DIRECTX9 cross trees and native builds are unaffected.

Workaround

Configure with -DCNA_BUILD_TESTS=OFF, or set CMAKE_CROSSCOMPILING_EMULATOR to a Wine wrapper yourself.

The same subject is explained at several altitudes. These are the neighbouring pages at each one.