Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#56351 - [opencv] OpenCV 3.3.1 build with CUDA and Python 3.6.3
Attached to Project:
Arch Linux
Opened by Adam Gradzki (agradzki) - Thursday, 16 November 2017, 17:26 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 10 December 2017, 19:47 GMT
Opened by Adam Gradzki (agradzki) - Thursday, 16 November 2017, 17:26 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 10 December 2017, 19:47 GMT
|
DetailsI built atlas-lapack from source to maximize my hardware capabilities. This might also work for regular ATLAS. I have not tested with it. I did not use OpenBLAS at all.
OpenCVFindLAPACK.cmake needs to be edited because of C++ name mangling which prevents the linker from finding the appropriate ATLAS symbols. Edit OpenCVFindLAPACK.cmake Change: if(NOT " ${__content_str}" STREQUAL " ${_lapack_include_str}") file(WRITE "${CBLAS_H_PROXY_PATH}" "${_lapack_include_str}") endif() To: if(NOT " ${__content_str}" STREQUAL " ${_lapack_include_str}") file(WRITE "${CBLAS_H_PROXY_PATH}" "extern 'C' { ${_lapack_include_str} }") endif() ############################################################################# Here is a known good build configuration which worked for me. OPENCV_VERSION="3.3.1" PYTHON_VERSION="3.6.3" CFLAGS="-march=native -O2 -pipe" \ CXXFLAGS="-march=native -O2 -pipe" \ cmake \ -D BUILD_TESTS=OFF \ -D ENABLE_PRECOMPILED_HEADERS=OFF \ -D CMAKE_INSTALL_PREFIX="/opt/opencv_${OPENCV_VERSION}_python_${PYTHON_VERSION}" \ -D OPENCV_EXTRA_MODULES_PATH="../../opencv_contrib-3.3.1/modules" \ -D BUILD_OPENCV_PYTHON2=OFF \ -D BUILD_OPENCV_PYTHON3=ON \ -D CUDA_NVCC_FLAGS="--expt-relaxed-constexpr -ccbin gcc-6" \ -D CUDA_GENERATION=Pascal \ -D WITH_CUDA=ON \ -D ENABLE_FAST_MATH=1 \ -D CUDA_FAST_MATH=1 \ -D WITH_CUBLAS=1 \ -D WITH_EIGEN=ON \ -D BUILD_TIFF=ON \ -D BUILD_OPENCV_JAVA=OFF \ -D BUILD_PERF_TESTS=OFF \ -D CMAKE_BUILD_TYPE=RELEASE \ -D PYTHON3_LIBRARY=$(python -c "import os.path; from distutils.sysconfig import get_config_var; print(os.path.join(get_config_var('LIBDIR'), get_config_var('LDLIBRARY')))") \ -D PYTHON3_EXECUTABLE=$(which python) \ -D PYTHON3_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ -D PYTHON3_PACKAGES_PATH=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") .. |
This task depends upon
Closed by Antonio Rojas (arojas)
Sunday, 10 December 2017, 19:47 GMT
Reason for closing: Fixed
Additional comments about closing: opencv 3.3.1-3
Sunday, 10 December 2017, 19:47 GMT
Reason for closing: Fixed
Additional comments about closing: opencv 3.3.1-3
opencv 3.3.1-3 is built with generic lapack support, you can then plug-in any lapack implementation you want as long as it provides the liblapack.so and libcblas.so libraries. Please test if that works for you.