can't find libpthread_nonshared.a

asked 2019-08-08 06:36:24 -0600

updated 2019-08-08 10:27:30 -0600

I am trying to build opencv from source and I inserted cmake instructions, then when I enter make command, it reaches 11% and then shows the following error

/usr/bin/ld: cannot find /usr/lib/libpthread_nonshared.a collect2: error: ld returned 1 exit status make[2]: * [modules/core/CMakeFiles/opencv_core.dir/build.make:1435: lib/libopencv_core.so.3.4.4] Error 1 make[1]: [CMakeFiles/Makefile2:2342: modules/core/CMakeFiles/opencv_core.dir/all] Error 2 make: ** [Makefile:163: all] Error 2 (base) [hassanalsamahi@D-Link build]$

Cmake instructions:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \ -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules -D BUILD_TESTS=OFF -D INSTALL_PYTHON_EXAMPLES=ON -D INSTALL_C_EXAMPLES=OFF -D BUILD_EXAMPLES=ON ..

cmake output:

-- Looking for ccache - not found -- Found ZLIB: /lib64/libz.so (found suitable version "1.2.11", minimum required is "1.2.3") -- Found ZLIB: /lib64/libz.so (found version "1.2.11") -- Found OpenEXR: /lib64/libIlmImf.so -- Looking for linux/videodev.h -- Looking for linux/videodev.h - found -- Looking for linux/videodev2.h -- Looking for linux/videodev2.h - found -- Looking for sys/videoio.h -- Looking for sys/videoio.h - not found -- Checking for module 'libavresample' -- Package 'libavresample', required by 'virtual:world', not found -- found Intel IPP (ICV version): 2019.0.0 [2019.0.0 Gold] -- at: /home/hassanalsamahi/opencv/build/3rdparty/ippicv/ippicv_lnx/icv -- found Intel IPP Integration Wrappers sources: 2019.0.0 -- at: /home/hassanalsamahi/opencv/build/3rdparty/ippicv/ippicv_lnx/iw -- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off -- Could NOT find Atlas (missing: Atlas_CLAPACK_INCLUDE_DIR Atlas_BLAS_LIBRARY) -- Could NOT find BLAS (missing: BLAS_LIBRARIES) -- LAPACK requires BLAS -- A library with LAPACK API not found. Please specify library location. -- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) -- Could NOT find Flake8 (missing: FLAKE8_EXECUTABLE) -- Found VTK 8.2.0 (/usr/lib/cmake/vtk-8.2/UseVTK.cmake) -- OpenCV Python: during development append to PYTHONPATH: /home/hassanalsamahi/opencv/build/python_loader -- Caffe: NO -- Protobuf: NO -- Glog: NO -- freetype2: YES -- harfbuzz: YES -- HDF5: Using hdf5 compiler wrapper to determine C configuration -- Module opencv_ovis disabled because OGRE3D was not found -- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available. -- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake. -- Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components. -- Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h -- Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h -- Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags -- HDF5: Using hdf5 compiler wrapper to determine C configuration -- freetype2: YES -- harfbuzz: YES -- Tesseract: YES -- OpenCL samples are skipped: OpenCL SDK is required -- Pylint: registered 162 targets. Build 'check_pylint' target to run checks ("cmake --build . --target

check_pylint" or "make check_pylint")

-- General configuration for OpenCV 3.4.4 =====================================

-- Version control ...

(more)
edit retag flag offensive close merge delete

Comments

and I inserted cmake instructions,

please add your cmdline & the cmake output to your question

berak gravatar imageberak ( 2019-08-08 10:19:24 -0600 )edit
1

@berak I've added them

HassanAlsamahi gravatar imageHassanAlsamahi ( 2019-08-08 10:27:58 -0600 )edit