Skip to content

bug: obs-c-oracle: port_comparison bench has duplicate gs_timer symbols #4786

Closed

Description

@rdoupe

Location

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.

Activity

  1. added
    bug
    on Nov 13, 2026
  2. rdoupe commented on Nov 13, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: the duplicate gs_timer_* stand-ins in the port_comparison bench (batched with #4615, which reports the same link failure).

    1. 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.
    2. 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.
    3. Run the local gates (--test-diff, lint, dylint, cross, Windows MSVC clippy and link).

    PR expected within a few hours.

  3. added
    ready
    on Nov 13, 2026
  4. rdoupe commented on Nov 13, 2026

    @rdoupe
    CollaboratorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions