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: port_comparison bench has duplicate gs_timer symbols #4786
rust/obs-c-oracle/oracle/source_profiler_host.c 39-85 defines stand-ins for gs_timer_destroy, gs_timer_begin, gs_timer_end, gs_timer_get_data and gs_timer_range_create ... gs_timer_range_get_data under their real names. Since the timer and timer-range dispatch moved to Rust (obs-graphics, the last in #4595), obs-graphics exports the same symbols.
Class
Logic error (test build: duplicate symbols).
How it is reached
On master (060646c), soldr cargo test -p obs-c-oracle --locked --bench port_comparison fails to link on Linux:
rust-lld: error: duplicate symbol: gs_timer_destroy
>>> defined at ... in archive libobs_graphics-....rlib
>>> defined at source_profiler_host.c
...
rust-lld: error: duplicate symbol: gs_timer_range_get_data
error: could not compile `obs-c-oracle` (bench "port_comparison")
The unit-test build doesn't see it because it doesn't link obs-graphics' copies next to the oracle the same way; the bench does. No upstream issue.
Proposed fix and failing test
Refit the source profiler oracle the way the other ported symbols were: rename its stand-ins (as source_profiler.c already does with #define gs_timer_range_* oracle_sp_range_*) or drop the ones the Rust now provides, so only one definition of each gs_timer_* reaches the link. RED is the bench link failing as above; GREEN is soldr cargo test -p obs-c-oracle --locked --bench port_comparison passing, with the source profiler parity tests unchanged.
Claiming: the duplicate gs_timer_* stand-ins in the port_comparison bench (batched with #4615, which reports the same link failure).
RED: reproduce the bench link failure on current master (soldr cargo test -p obs-c-oracle --locked --bench port_comparison, eight duplicate symbol: gs_timer_* errors) and record it.
GREEN: drop the eight stand-ins from rust/obs-c-oracle/oracle/source_profiler_host.c that obs-graphics now defines (gs_timer_destroy/begin/end/get_data, gs_timer_range_destroy/begin/end/get_data), keeping gs_timer_create, gs_timer_range_create and the other libobs stand-ins that are still C. With no graphics context the Rust entry points do nothing and return false, as the stand-ins did. Check that the bench links and passes its allocation check, and that the source profiler parity tests are unchanged.
Run the local gates (--test-diff, lint, dylint, cross, Windows MSVC clippy and link).
Fixed by PR #4811 (merge commit 267f78e): it dropped the eight gs_timer_* / gs_timer_range_* do-nothing stand-ins from rust/obs-c-oracle/oracle/source_profiler_host.c, so only the Rust obs-graphics definitions reach the link and the port_comparison bench links and passes again. It also closed #4615, which reported the same failure. A new parity test, shim_timers_are_obs_graphics_dispatch, now fails in PR CI if a stand-in ever wins the link again.
Left: nothing, so there is no follow-up issue. The master push run of the merge commit was cancelled by newer pushes (concurrency group), so Tier 2, Qt, cross, Windows and macOS have not run on exactly this commit; the later master runs cover them.
Activity
rdoupe commentedon Nov 13, 2026
Claiming: the duplicate
gs_timer_*stand-ins in theport_comparisonbench (batched with #4615, which reports the same link failure).soldr cargo test -p obs-c-oracle --locked --bench port_comparison, eightduplicate symbol: gs_timer_*errors) and record it.rust/obs-c-oracle/oracle/source_profiler_host.cthatobs-graphicsnow defines (gs_timer_destroy/begin/end/get_data,gs_timer_range_destroy/begin/end/get_data), keepinggs_timer_create,gs_timer_range_createand the other libobs stand-ins that are still C. With no graphics context the Rust entry points do nothing and return false, as the stand-ins did. Check that the bench links and passes its allocation check, and that the source profiler parity tests are unchanged.--test-diff, lint, dylint, cross, Windows MSVC clippy and link).PR expected within a few hours.
rdoupe commentedon Nov 13, 2026
Fixed by PR #4811 (merge commit 267f78e): it dropped the eight
gs_timer_*/gs_timer_range_*do-nothing stand-ins fromrust/obs-c-oracle/oracle/source_profiler_host.c, so only the Rustobs-graphicsdefinitions reach the link and theport_comparisonbench links and passes again. It also closed #4615, which reported the same failure. A new parity test,shim_timers_are_obs_graphics_dispatch, now fails in PR CI if a stand-in ever wins the link again.Left: nothing, so there is no follow-up issue. The master push run of the merge commit was cancelled by newer pushes (concurrency group), so Tier 2, Qt, cross, Windows and macOS have not run on exactly this commit; the later master runs cover them.
obs-c-oracle: Drop timer stand-ins Rust defines (obs-rust#4811)