Fix compiler error due to missing pthread header (Bugfix #2953)
Description
Compiling current master (e27f4da9) on Debian Squeeze results in the following compilation error:
[ 52%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o
In file included from /home/shuber/src/opencv/modules/highgui/src/cap_ffmpeg.cpp:45:
/home/shuber/src/opencv/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'void ImplMutex::Impl::init()':
/home/shuber/src/opencv/modules/highgui/src/cap_ffmpeg_impl.hpp:417: error: 'pthread_spin_init' was not declared in this scope
/home/shuber/src/opencv/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'void ImplMutex::Impl::destroy()':
/home/shuber/src/opencv/modules/highgui/src/cap_ffmpeg_impl.hpp:418: error: 'pthread_spin_destroy' was not declared in this scope
/home/shuber/src/opencv/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'void ImplMutex::Impl::lock()':
/home/shuber/src/opencv/modules/highgui/src/cap_ffmpeg_impl.hpp:420: error: 'pthread_spin_lock' was not declared in this scope
/home/shuber/src/opencv/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'bool ImplMutex::Impl::trylock()':
/home/shuber/src/opencv/modules/highgui/src/cap_ffmpeg_impl.hpp:421: error: 'pthread_spin_trylock' was not declared in this scope
/home/shuber/src/opencv/modules/highgui/src/cap_ffmpeg_impl.hpp: In member function 'void ImplMutex::Impl::unlock()':
/home/shuber/src/opencv/modules/highgui/src/cap_ffmpeg_impl.hpp:422: error: 'pthread_spin_unlock' was not declared in this scope
make2: * [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o] Error 1
make1: [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: ** [all] Error 2
The attached patch file fixes this.
Associated revisions
Fix compiler error due to missing pthread header (Issue #2953)
Merge pull request #2953 from gongzg:master
History
Updated by Kirill Kornyakov almost 12 years ago
Andrey, actually I have the same issue on my desktop.
- Priority changed from Blocker to Normal
- Target version set to 3.0
- Assignee set to Andrey Kamaev
- Category set to build/install
Updated by Kirill Kornyakov almost 12 years ago
- Tracker changed from Bug to Bugfix
Updated by Daniel Sartori almost 12 years ago
Kirill Kornyakov wrote:
Andrey, actually I have the same issue on my desktop.
Me too.
The patch fixed the problem like a charm. Thanks.
Updated by Alexander Smorkalov over 11 years ago
- Assignee changed from Andrey Kamaev to Alexander Smorkalov
- Pull request set to https://github.com/Itseez/opencv/pull/990
Updated by Vladislav Vinogradov over 11 years ago
- Status changed from Open to Done