title: OpenCV compile error Linking CXX shared library ../../lib/libopencv_highgui.so /lib/libbz2.so.1: could not read symbols: File in wrong format
body: <p>I'm trying to install OpenCV-2.4.9 on my CentOS 6.4. machine.<br>
  I downloaded the source in ~/Downloads/opencv-2.4.9.<br>
  from there, I did 'mkdir build; cd build'. Then did  </p>
  
  <p><code>cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON --enable-shared ..</code></p>
  
  <p>and did 'make -j2'.<br>
  Below is the message I got  (this is result of re-running using just 'make')</p>
  
  <pre><code>[  3%] Built target libtiff
  [  4%] Built target opencv_core_pch_dephelp
  [  4%] Built target pch_Generate_opencv_core
  [  6%] Built target opencv_core
  [  6%] Built target opencv_ts_pch_dephelp
  [  6%] Built target pch_Generate_opencv_ts
  [  6%] Built target opencv_imgproc_pch_dephelp
  [  7%] Built target pch_Generate_opencv_imgproc
  [ 11%] Built target opencv_imgproc
  [ 11%] Built target opencv_flann_pch_dephelp
  [ 11%] Built target pch_Generate_opencv_flann
  [ 12%] Built target opencv_flann
  [ 12%] Built target opencv_highgui_pch_dephelp
  [ 12%] Built target pch_Generate_opencv_highgui
  Linking CXX shared library ../../lib/libopencv_highgui.so
  /lib/libbz2.so.1: could not read symbols: File in wrong format
  collect2: ld returned 1 exit status
  make[2]: *** [lib/libopencv_highgui.so.2.4.9] Error 1
  make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
  make: *** [all] Error 2
  </code></pre>
  
  <p>I did some search, but no good answers. Can anybody give me a hint on what's wrong?</p>