"неопределенная ссылка на` H5P_CLS_LINK_ACCESS_ID_g '"при установке opencv из исходного кода в RedHat - PullRequest
0 голосов
/ 27 марта 2020

При установке opencv и opencv_contrib из источника:

$ git clone https://github.com/opencv/opencv.git
$ git clone https://github.com/opencv/opencv_contrib.git
$ cd opencv
$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=RELEASE \
    -DCMAKE_INSTALL_PREFIX=/path/2/custom_folder \
    -DINSTALL_C_EXAMPLES=ON \
    -DINSTALL_PYTHON_EXAMPLES=ON \
    -DWITH_TBB=ON \
    -DWITH_V4L=ON \
    -DWITH_QT=ON \
    -DWITH_OPENGL=ON \
    -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
    -DBUILD_EXAMPLES=ON ..
$ make -j24

Я получаю эту ошибку:

.
.
.
[ 37%] Linking CXX executable ../../bin/example_hdf_create_groups
[ 37%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/ocl4dnn/src/ocl4dnn_inner_product.cpp.o
../../lib/libopencv_hdf.so.4.3.0: undefined reference to `H5P_CLS_LINK_ACCESS_ID_g'
../../lib/libopencv_hdf.so.4.3.0: undefined reference to `H5P_CLS_DATASET_CREATE_ID_g'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/example_hdf_create_groups] Error 1
make[1]: *** [modules/hdf/CMakeFiles/example_hdf_create_groups.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 37%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/ocl4dnn/src/ocl4dnn_lrn.cpp.o
[ 37%] Linking CXX executable ../../bin/example_hdf_create_read_write_datasets
[ 37%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/ocl4dnn/src/ocl4dnn_pool.cpp.o
../../lib/libopencv_hdf.so.4.3.0: undefined reference to `H5P_CLS_LINK_ACCESS_ID_g'
../../lib/libopencv_hdf.so.4.3.0: undefined reference to `H5P_CLS_DATASET_CREATE_ID_g'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/example_hdf_create_read_write_datasets] Error 1
make[1]: *** [modules/hdf/CMakeFiles/example_hdf_create_read_write_datasets.dir/all] Error 2
[ 37%] Building CXX object modules/dnn/CMakeFiles/opencv_dnn.dir/src/ocl4dnn/src/ocl4dnn_softmax.cpp.o
.
.
.
[ 41%] Built target opencv_cvv
make: *** [all] Error 2

Я не знаю, как справиться с установкой HDF5?

$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
...