Fix compiler error due to missing pthread header (Bugfix #2953)


Added by Stefan Huber almost 12 years ago. Updated over 11 years ago.


Status:Done Start date:2013-04-11
Priority:Normal Due date:
Assignee:Alexander Smorkalov % Done:

0%

Category:build/install
Target version:3.0
Affected version:branch 'master' (2.4.9) Operating System:
Difficulty: HW Platform:
Pull request:https://github.com/Itseez/opencv/pull/990

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.


0001-Fix-compiler-error-due-to-missing-pthread-header.patch (655 Bytes) Stefan Huber, 2013-04-11 02:39 pm


Associated revisions

Revision 37b67fa5
Added by Alexander Smorkalov over 11 years ago

Fix compiler error due to missing pthread header (Issue #2953)

Revision b63a7e66
Added by Vadim Pisarevsky over 10 years ago

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

Also available in: Atom PDF