Link Search Menu Expand Document
Table of contents
  1. Introduction
  2. Commands
  3. Bebugging Record
    1. Hints
    2. Error 1: cmake failed
    3. Error 4: GLIBCXX_3.4.26 not found


denseflow is the recommended tool by mmaction2 for extracting frames from videos, especially for the optical flows. This post record errors and solutions I have encountered.

If you have root access of your device, i.e,. sudo, solution of most problems can be easily found from Google. This post assume NO root access.


We follow the in denseflow of current version (2022-07-28). Before running the below commands, make sure you have installed a CUDA in the main environment (it’s NOT the cudatoolkit installed by conda)

# ZZROOT is the root dir of all the installation
# you may put these lines into your `.bashrc` or `.zshrc`.
export ZZROOT=$HOME/app
export PATH=$ZZROOT/bin:$PATH

# fetch install scripts
git clone
cd setup

# opencv depends on ffmpeg for video decoding
# ffmpeg depends on nasm, yasm, libx264, libx265, libvpx

# you may put this line into your .bashrc
export OpenCV_DIR=$ZZROOT

# install boost
# you may put this line into your .bashrc

# install hdf5

# finally, install denseflow

Bebugging Record


  • All files brought by the setup are put in ~/app by default. In case your want to restart/give up, just delete this folder.
  • After every installation, e.g., ./, remember to read the print log (last few rows should be enough) for checking if the installation succeed.

Error 1: cmake failed

The below error happends when running the commands:

  • cmake -DCMAKE_INSTALL_PREFIX=$HOME/app -DUSE_HDF5=no -DUSE_NVFLOW=no .., which comes from the of denseflow;
  • ./ ```shell CMake Error at CMakeLists.txt:19 (find_package): By not providing “FindOpenCV.cmake” in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by “OpenCV”, but CMake did not find one.

    Could not find a package configuration file provided by “OpenCV” with any of the following names:

    OpenCVConfig.cmake opencv-config.cmake

    Add the installation prefix of “OpenCV” to CMAKE_PREFIX_PATH or set “OpenCV_DIR” to a directory containing one of the above files. If “OpenCV” provides a separate development package or SDK, be sure it has been installed.

– Configuring incomplete, errors occurred! See also “/home/s1141196/PolyU/denseflow/build/CMakeFiles/CMakeOutput.log”. See also “/home/s1141196/PolyU/denseflow/build/CMakeFiles/CMakeError.log”.

This simply means that the installation of `opencv` was failed, can be verified by excuting the `./` again. There seems to be some solutions requiring root access, you may google it by yourself.

## Error 2: x265 not found using pkg-config
The error `x265 not found using pk-config` happens when running the `./`.

I found two issues[(1)]([(2)]( mention this error and they both state this error can be solved by:

conda install pkg-config

By the way, my conda install stucks and this is solved by `conda update --all --yes`.

## Error 3: unsupported GNU version! gcc versions later than 8 are not supported!
This error happens when running `./`. Interestingly, it may not be printed in the first try of installation (but actually was failed).

In file included from /usr/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
[ 35%] Linking CXX static library ../lib/liblibtiff.a
[ 37%] Built target libtiff
CMake Error at (message):
  Error generating

make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/build.make:65: modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/] Error 1
make[1]: *** [CMakeFiles/Makefile2:3724: modules/core/CMakeFiles/opencv_core.dir/all] Error 2


I found it’s because the imcompability betweent the versions of CUDA and GCC. Check CUDA-GCC and found that my CUDA is 10.2 but GCC is 9.3.0.

Downgrading the GCC version to lower than 8 can work with CUDA 10.2, which can be easily solved with root access:

Otherwise, excuting the ./ to install gcc==7.5.0:

gcc --version # check installation

If gcc==7.5.0 installation failed, you may refer to this issue to see if you can find a solution. Or you can manually edit the ./ changing the gcc to higher version, e.g. 8.5.0, and see if it helps. My suggestion: install gcc==8.5.0 if Ubuntu 20.04, otherwise gcc==7.5.0.

Error 4: GLIBCXX_3.4.26 not found

This error happens when running ./ Specially, it only happens when I install gcc by ./

cmake: /home/s1141196/app/lib64/ version `GLIBCXX_3.4.26' not found (required by cmake)
cmake: /home/s1141196/app/lib64/ version `GLIBCXX_3.4.26' not found (required by /usr/lib/x86_64-linux-gnu/

Solution There should be a correct in your system:

strings /usr/lib/x86_64-linux-gnu/ | grep GLIBC   #check if 'GLIBCXX_3.4.26' in the list

So we repalce the /home/s1141196/app/lib64/ with the /usr/lib/x86_64-linux-gnu/

cp /usr/lib/x86_64-linux-gnu/ /home/s1141196/app/lib64/
ln -s

If the system also not work, then try to download a valid one from internet.