obsproject / obs-plugintemplate

GNU General Public License v2.0
307 stars 141 forks source link

Using threading.h breaks windows build #36

Closed univrsal closed 2 years ago

univrsal commented 2 years ago

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

28.0.0-beta2

OBS Studio Version (Other)

No response

OBS Studio Log URL

n/a

OBS Studio Crash Log URL

No response

Expected Behavior

Including the obs header <util/threading.h> breaks the build on windows as the header includes "../../deps/w32-pthreads/pthread.h" That file isn't present in the plugin dependencies and so the CI fails for windows. Here's a test project I made based on the template: https://github.com/univrsal/test123 And here's the CI log: https://github.com/univrsal/test123/runs/7821655312?check_suite_focus=true

I use that header in tuna to set the name of a separate thread via os_thread_set_name (https://github.com/obsproject/obs-studio/blob/master/libobs/util/threading.h#L95) which used to work fine with the old CI I used, but I'm trying to switch to the actions from this template because I have to redo the CI for the move to Qt6.

Current Behavior

The CI fails.

Steps to Reproduce

  1. Create repository from template
  2. Include util/threading.h
  3. CI fails

Anything else we should know?

No response

PatTheMav commented 2 years ago

That's an issue on obs-studio though - as w32-pthreads should be properly added as a library dependency to libobs it should not use a relative include path there.

Please report upstream on obs-studio and reference this issue there.