You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: obs-c-oracle: no test binary links on a Windows GNU/gnullvm host (pthread comes from the compiler branch, not the target) #291
So cargo test --workspace cannot run at all on that host. CI is unaffected: windows-2025-vs2026 is MSVC, where the branch below is taken.
Why
rust/obs-c-oracle/build.rs:58 chooses the C threading implementation by compiler, not by target:
if oracle.get_compiler().is_like_msvc(){// deps/w32-pthreads/pthread.c + util/threading-windows.c}else{
oracle.file(libobs.join("util/threading-posix.c"));}
is_like_msvc() is false for clang, including LLVM-MinGW targeting Windows, so
the oracle compiles threading-posix.c and expects a system pthread that a GNU
Windows toolchain does not provide. profiler.c calls pthread_mutex_*
directly (and, per the same comment in build.rs, so does task.c), so the
link fails. The target is already known two lines up: let windows = std::env::var_os("CARGO_CFG_WINDOWS").is_some(); (line 31).
Proposed fix
Branch on the target instead of the compiler, i.e. use the deps/w32-pthreads
plus util/threading-windows.c path whenever windows is true. The single-file
pthread build does compile with LLVM-MinGW clang; verified locally:
Two further gaps on that host are outside this repo, listed for anyone
reproducing (I shimmed all three locally, nothing of it is in a PR):
LLVM-MinGW's <intrin.h> does not declare __iso_volatile_load32, __iso_volatile_load8 or _InterlockedExchange8, which libobs/util/threading-windows.h uses on x86/x64.
its <pthread.h> declares pthread_cond_timedwait as an inline wrapper over
winpthreads' pthread_cond_timedwait64 alias, which w32-pthreads does not
export.
How it was reached
Building #143's branch on a Windows 11 host with rustc 1.97.1
(x86_64-pc-windows-gnullvm, LLVM-MinGW 22.1.8). With the shims in place, cargo test --workspace runs: 70 of 71 test binaries pass. The one failure, buffered_file_serializer_parity (STATUS_ACCESS_VIOLATION in defaults_match_oracle), reproduces on unmodified master, so it is separate
from this and may be worth its own issue.
Reproduced from Linux with soldr's mingw-w64 cross toolchain: soldr cargo test --no-run -p obs-util --target x86_64-pc-windows-gnu (GCC 15.3 mingw-w64). The build fails earlier than the link, in libobs/util/threading-windows.h: implicit declaration of function '__iso_volatile_load32', '_InterlockedExchange8', '__iso_volatile_load8'. So the build.rs branch fix alone doesn't make a GNU Windows host build. It also needs those MSVC intrinsics guarded in threading-windows.h, which is a public libobs header and needs an explicit decision first (AGENTS.md: no public header edits as part of a port). Leaving this unclaimed until that call is made; the build.rs half is ready as proposed.
Claiming: #291. The maintainer approved guarding the MSVC-only intrinsics in libobs/util/threading-windows.h. Plan: 1) RED: the oracle's build.rs picks the Windows threading by target, and a x86_64-pc-windows-gnu cross build of the tests fails; 2) GREEN: give threading-windows.h GCC/Clang fallbacks for the MSVC intrinsics, and close any remaining link gaps.
Activity
zackees commentedon Oct 13, 2026
Reproduced from Linux with soldr's mingw-w64 cross toolchain:
soldr cargo test --no-run -p obs-util --target x86_64-pc-windows-gnu(GCC 15.3 mingw-w64). The build fails earlier than the link, inlibobs/util/threading-windows.h:implicit declaration of function '__iso_volatile_load32','_InterlockedExchange8','__iso_volatile_load8'. So thebuild.rsbranch fix alone doesn't make a GNU Windows host build. It also needs those MSVC intrinsics guarded inthreading-windows.h, which is a public libobs header and needs an explicit decision first (AGENTS.md: no public header edits as part of a port). Leaving this unclaimed until that call is made; thebuild.rshalf is ready as proposed.zackees commentedon Oct 13, 2026
Claiming: #291. The maintainer approved guarding the MSVC-only intrinsics in
libobs/util/threading-windows.h. Plan: 1) RED: the oracle'sbuild.rspicks the Windows threading by target, and ax86_64-pc-windows-gnucross build of the tests fails; 2) GREEN: givethreading-windows.hGCC/Clang fallbacks for the MSVC intrinsics, and close any remaining link gaps.ci: Build the tests for x86_64-pc-windows-gnu in the rust-test lane (…
Build the C oracle and libobs util with GCC for Windows (GREEN)
ci: Add the windows-gnu target in the gate lane, not rust-toolchain.toml
ci: Fix the windows-gnu link check broken by the video-io port
ci: Stub the lld lookup in the local gate's lane test