FS#71467 - NVCC Segfaults when compiling OpenCV with Contrib
Attached to Project:
Arch Linux
Opened by Alexander Mai (halfpotato) - Thursday, 08 July 2021, 01:19 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Tuesday, 12 October 2021, 22:41 GMT
Opened by Alexander Mai (halfpotato) - Thursday, 08 July 2021, 01:19 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Tuesday, 12 October 2021, 22:41 GMT
|
Details
Description:
NVCC Segfaults when compiling OpenCV when using gcc-11.1 and g++-11.1. Additional info: * g++ and gcc 11.1 nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2021 NVIDIA Corporation Built on Sun_Mar_21_19:15:46_PDT_2021 Cuda compilation tools, release 11.3, V11.3.58 Build cuda_11.3.r11.3/compiler.29745058_0 Steps to reproduce: Download OpenCV 4.5.3 and OpenCV Contrib 4.5.3. (https://github.com/opencv/opencv/releases/tag/4.5.3, https://github.com/opencv/opencv_contrib/releases) Execute: ``` export library=`python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))"` export default_exec=`which python3.9` export python_exec=`which python` cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUDA=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D INSTALL_PYTHON_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.5.3/modules -D PYTHON_EXECUTABLE=$python_exec -D PYTHON_DEFAULT_EXECUTABLE=$default_exec -D PYTHON_INCLUDE_DIRS=$include_dir -D PYTHON3_LIBRARY=$library -D BUILD_EXAMPLES=ON .. make ``` |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Tuesday, 12 October 2021, 22:41 GMT
Reason for closing: Fixed
Additional comments about closing: Seems fixed now. At any rate, we can't really fix this as nvcc is a closed source blob.
Tuesday, 12 October 2021, 22:41 GMT
Reason for closing: Fixed
Additional comments about closing: Seems fixed now. At any rate, we can't really fix this as nvcc is a closed source blob.
FS#70919gcc 11 is not currently usable as the CUDA host compiler.[1] https://aur.archlinux.org/packages/opencv-cuda
[2] PKGBUILD.diff
[3] opencv-cuda-4.5.3-1-x86_64-build.log.xz
opencv-cuda-4.5.3-1-x86_64-bu... (35.2 KiB)
Also looking through the build log I attached previously there are warnings from modules provided by contrib such as:
/build/opencv-cuda/src/opencv_contrib-4.5.3/modules/cudaoptflow/src/cuda/pyrlk.cu(1043): warning: function "tex2D(texture<T, 2, cudaReadModeElementType>, float, float) [with T=float]"
[1] https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=opencv-cuda#n24
[2] https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=opencv-cuda#n67