Skip to content
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

NoMallocThreadPool: include pthread if using pthread #417

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

1480c1
Copy link
Contributor

@1480c1 1480c1 commented Aug 25, 2024

Using clang with libc++ does not include pthread.h implicitly through by default, so using pthread_t will cause a compilation error.

[1/41] Building CXX object source/Lib/vvenc/CMakeFiles/vvenc.dir/__/CommonLib/MCTF.cpp.o
FAILED: source/Lib/vvenc/CMakeFiles/vvenc.dir/__/CommonLib/MCTF.cpp.o
ccache D:\clang\msys64\clang64\bin\ccache.exe  clang++ -DHAVE_PTHREADS -DTARGET_SIMD_X86 -DVVENC_SOURCE -D_WIN32_WINNT=0x0600 -ID:/clang/build/vvenc-git/source/Lib/vvenc/../../../include -ID:/clang/build/vvenc-git/build-64bit -ID:/clang/build/vvenc-git/source/Lib/vvenc/. -ID:/clang/build/vvenc-git/source/Lib/vvenc/.. -ID:/clang/build/vvenc-git/source/Lib/vvenc/../DecoderLib -ID:/clang/build/vvenc-git/source/Lib/vvenc/../EncoderLib -ID:/clang/build/vvenc-git/source/Lib/vvenc/../CommonLib -ID:/clang/build/vvenc-git/source/Lib/vvenc/../CommonLib/x86 -ID:/clang/build/vvenc-git/source/Lib/vvenc/../CommonLib/arm -ID:/clang/build/vvenc-git/source/Lib/vvenc/../apputils -ID:/clang/build/vvenc-git/source/Lib/vvenc/../../../thirdparty/nlohmann_json/single_include -isystem D:/clang/build/vvenc-git/source/Lib/vvenc/../../../thirdparty -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -DVVENC_ENABLE_THIRDPARTY_JSON -DVVENC_ENABLE_THIRDPARTY_JSON -O3 -DNDEBUG -std=gnu++14 -fvisibility=hidden -fvisibility-inlines-hidden -msse4.1 -Wall -Werror -Wno-deprecated-register -Wno-unused-const-variable -Wno-unknown-attributes -MD -MT source/Lib/vvenc/CMakeFiles/vvenc.dir/__/CommonLib/MCTF.cpp.o -MF source\Lib\vvenc\CMakeFiles\vvenc.dir\__\CommonLib\MCTF.cpp.o.d -o source/Lib/vvenc/CMakeFiles/vvenc.dir/__/CommonLib/MCTF.cpp.o -c D:/clang/build/vvenc-git/source/Lib/CommonLib/MCTF.cpp
In file included from D:/clang/build/vvenc-git/source/Lib/CommonLib/MCTF.cpp:52:
D:/clang/build/vvenc-git/source/Lib/vvenc/../Utilities/NoMallocThreadPool.h:505:5: error: unknown type name 'pthread_t'
  505 |     pthread_t m_id       = 0;
      |     ^
1 error generated.

Using clang with libc++ does not include pthread.h implicitly through
<thread> by default, so using pthread_t will cause a compilation error.

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
@adamjw24
Copy link
Member

adamjw24 commented Sep 2, 2024

Thanks!

@adamjw24 adamjw24 merged commit a1996a8 into fraunhoferhhi:master Sep 2, 2024
8 checks passed
@1480c1 1480c1 deleted the mingw64/clang/pthread branch September 25, 2024 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants