-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libobs: threading.h includes w32-pthreads as a relative path #7155
Comments
Using a relative path for the pthread.h header by w32-pthreads breaks compilation of plugins which include threading.h from libobs (as w32-pthreads will exist at a different location relative to the libobs header). As w32-pthreads (and its include directory) is added to the libobs target by CMake, the pthread.h header will be found even when using system header notation. Fixes obsproject#7155
Using a relative path for the pthread.h header by w32-pthreads breaks compilation of plugins which include threading.h from libobs (as w32-pthreads will exist at a different location relative to the libobs header). As w32-pthreads (and its include directory) is added to the libobs target by CMake, the pthread.h header will be found even when using system header notation. Fixes obsproject#7155
Using a relative path for the pthread.h header by w32-pthreads breaks compilation of plugins which include threading.h from libobs (as w32-pthreads will exist at a different location relative to the libobs header). As w32-pthreads (and its include directory) is added to the libobs target by CMake, the pthread.h header will be found even when using system header notation. Fixes #7155
When I hard reset When I build a plugin (
After the build and its failure my HEAD detaches to 43a49dc and when I next look at the files Is this normal? Does the |
Nevermind, I see that obs-ndi buildspec.json is:
I can fix that... |
I'm also having this problem, and changing the build spec as @paulpv suggests above has not fixed my Windows build in GitHub actions. I get the exact same cannot find pthreads.h error. This is on the obs-ptz plugin. You can see the result here: |
@glikely 🤷♂️ Those deps look to be up to date. |
This obviously cannot work if |
Operating System Info
Windows 10
Other OS
No response
OBS Studio Version
28.0.0-rc1
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 for plugins using the plugin template on windows as the header includes "../../deps/w32-pthreads/pthread.h". That file isn't present in the plugin dependencies and so the build fails. 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 a plugin 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 build fails.
Steps to Reproduce
Anything else we should know?
I was told to report this here instead of in the plugin template. The original issue is here obsproject/obs-plugintemplate#36
The text was updated successfully, but these errors were encountered: