Unable to install with GPU
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 232
- PR merge metrics
- No merged PRs in 30d
Description
OS (WSL): Distributor ID: Ubuntu | Description: Ubuntu 22.04.4 LTS | Release: 22.04 | Codename: jammy
```ffmpeg -version
ffmpeg version N-118860-g81c50c33b6 Copyright (c) 2000-2025 the FFmpeg developers
built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
configuration: --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared --enable-nvenc
libavutil 59. 60.100 / 59. 60.100
libavcodec 61. 33.102 / 61. 33.102
libavformat 61. 9.107 / 61. 9.107
libavdevice 61. 4.100 / 61. 4.100
libavfilter 10. 9.100 / 10. 9.100
libswscale 8. 13.102 / 8. 13.102
libswresample 5. 4.100 / 5. 4.100
```
Commands:
```
$ git clone --recursive https://github.com/dmlc/decord.git
Cloning into 'decord'...
remote: Enumerating objects: 3211, done.
remote: Counting objects: 100% (513/513), done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 3211 (delta 472), reused 439 (delta 439), pack-reused 2698 (from 1)
Receiving objects: 100% (3211/3211), 20.45 MiB | 11.88 MiB/s, done.
Resolving deltas: 100% (1970/1970), done.
Updating files: 100% (187/187), done.
Submodule '3rdparty/dlpack' (https://github.com/dmlc/dlpack) registered for path '3rdparty/dlpack'
Submodule '3rdparty/dmlc-core' (https://github.com/dmlc/dmlc-core) registered for path '3rdparty/dmlc-core'
Cloning into '["local folder"]/decord/3rdparty/dlpack'...
remote: Enumerating objects: 574, done.
remote: Counting objects: 100% (153/153), done.
remote: Compressing objects: 100% (82/82), done.
remote: Total 574 (delta 98), reused 81 (delta 65), pack-reused 421 (from 2)
Receiving objects: 100% (574/574), 2.21 MiB | 7.42 MiB/s, done.
Resolving deltas: 100% (209/209), done.
Cloning into '["local folder"]/decord/3rdparty/dmlc-core'...
remote: Enumerating objects: 6358, done.
remote: Counting objects: 100% (80/80), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 6358 (delta 56), reused 43 (delta 43), pack-reused 6278 (from 2)
Receiving objects: 100% (6358/6358), 1.73 MiB | 8.18 MiB/s, done.
Resolving deltas: 100% (3845/3845), done.
Submodule path '3rdparty/dlpack': checked out '5c792cef3aee54ad8b7000111c9dc1797f327b59'
Submodule path '3rdparty/dmlc-core': checked out 'd07fb7a443b5db8a89d65a15a024af6a425615a5'
```
```
cd decord
mkdir build
cd build
cmake .. -DUSE_CUDA=ON -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for module 'libavcodec'
-- Found libavcodec, version 61.33.102
-- Checking for module 'libavformat'
-- Found libavformat, version 61.9.107
-- Checking for module 'libavutil'
-- Found libavutil, version 59.60.100
-- Checking for module 'libavdevice'
-- Found libavdevice, version 61.4.100
-- Checking for module 'libavfilter'
-- Found libavfilter, version 10.9.100
-- Checking for module 'libswresample'
-- Found libswresample, version 5.4.100
-- Found libavdevice, device input will be enabled
-- Found FFMPEG or Libav: /usr/local/lib/libavformat.so;/usr/local/lib/libavfilter.so;/usr/local/lib/libavcodec.so;/usr/local/lib/libavutil.so;/usr/local/lib/libswresample.so;/usr/local/lib/libavdevice.so, /usr/local/include
-- The CUDA compiler identification is NVIDIA 12.6.20
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda-12/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Performing Test SUPPORT_CXX11
-- Performing Test SUPPORT_CXX11 - Success
FFMPEG_INCLUDE_DIR = /usr/local/include
FFMPEG_LIBRARIES = /usr/local/lib/libavformat.so;/usr/local/lib/libavfilter.so;/usr/local/lib/libavcodec.so;/usr/local/lib/libavutil.so;/usr/local/lib/libswresample.so;/usr/local/lib/libavdevice.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12
-- Found CUDA_CUDA_LIBRARY=/usr/local/cuda-12/targets/x86_64-linux/lib/stubs/libcuda.so
-- Found CUDA_CUDART_LIBRARY=/usr/local/cuda-12/lib64/libcudart.so
-- Found CUDA_NVRTC_LIBRARY=/usr/local/cuda-12/lib64/libnvrtc.so
-- Found CUDA_CUDNN_LIBRARY=CUDA_CUDNN_LIBRARY-NOTFOUND
-- Found CUDA_CUBLAS_LIBRARY=/usr/local/cuda-12/lib64/libcublas.so
-- Found CUDA_NVIDIA_ML_LIBRARY=/usr/local/cuda-12/targets/x86_64-linux/lib/stubs/libnvidia-ml.so
-- Found CUDA_NVCUVID_LIBRARY=/usr/lib/x86_64-linux-gnu/libnvcuvid.so
-- Build with CUDA support
-- Configuring done
CMake Warning (dev) in CMakeLists.txt:
Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104"
for policy details. Use the cmake_policy command to set the policy and
suppress this warning.
CUDA_ARCHITECTURES is empty for target "decord".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: ["local folder"]/decord/build
[ 5%] Building CXX object CMakeFiles/decord.dir/src/audio/audio_reader.cc.o
[ 5%] Building CXX object CMakeFiles/decord.dir/src/audio/audio_interface.cc.o
[ 13%] Building CXX object CMakeFiles/decord.dir/src/runtime/c_runtime_api.cc.o
[ 13%] Building CXX object CMakeFiles/decord.dir/src/runtime/file_util.cc.o
[ 13%] Building CXX object CMakeFiles/decord.dir/src/runtime/dso_module.cc.o
[ 21%] Building CXX object CMakeFiles/decord.dir/src/runtime/module.cc.o
[ 21%] Building CXX object CMakeFiles/decord.dir/src/runtime/cpu_device_api.cc.o
[ 21%] Building CXX object CMakeFiles/decord.dir/src/runtime/module_util.cc.o
[ 24%] Building CXX object CMakeFiles/decord.dir/src/runtime/ndarray.cc.o
[ 27%] Building CXX object CMakeFiles/decord.dir/src/runtime/registry.cc.o
[ 32%] Building CXX object CMakeFiles/decord.dir/src/runtime/str_util.cc.o
[ 32%] Building CXX object CMakeFiles/decord.dir/src/runtime/system_lib_module.cc.o
[ 37%] Building CXX object CMakeFiles/decord.dir/src/runtime/thread_pool.cc.o
[ 37%] Building CXX object CMakeFiles/decord.dir/src/runtime/threading_backend.cc.o
[ 40%] Building CXX object CMakeFiles/decord.dir/src/runtime/workspace_pool.cc.o
[ 43%] Building CXX object CMakeFiles/decord.dir/src/sampler/random_file_order_sampler.cc.o
In file included from ["local folder"]/decord/src/audio/../../include/decord/audio_interface.h:9,
from ["local folder"]/decord/src/audio/audio_reader.h:10,
from ["local folder"]/decord/src/audio/audio_reader.cc:5:
["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:5: error: ‘AVBSFContext’ was not declared in this scope; did you mean ‘AVIOContext’?
187 | AVBSFContext, Deleterp >;
| ^~~~~~~~~~~~
| AVIOContext
["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:28: error: ‘AVBSFContext’ was not declared in this scope; did you mean ‘AVIOContext’?
187 | AVBSFContext, Deleterp >;
| ^~~~~~~~~~~~
| AVIOContext
["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:48: error: ‘av_bsf_free’ was not declared in this scope; did you mean ‘av_opt_free’?
187 | AVBSFContext, Deleterp >;
| ^~~~~~~~~~~
| av_opt_free
["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:59: error: template argument 1 is invalid
187 | AVBSFContext, Deleterp >;
| ^
["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:59: error: template argument 3 is invalid
["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:61: error: template argument 1 is invalid
187 | AVBSFContext, Deleterp >;
| ^
["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:61: error: template argument 2 is invalid
In file included from ["local folder"]/decord/src/audio/../../include/decord/audio_interface.h:9,
from ["local folder"]/decord/src/audio/audio_reader.h:10,
from["local folder"]/decord/src/audio/audio_interface.cc:5:
["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:5: error: ‘AVBSFContext’ was not declared in this scope; did you mean ‘AVIOContext’?
187 | AVBSFContext, Deleterp >;
| ^~~~~~~~~~~~
| AVIOContext
["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:28: error: ‘AVBSFContext’ was not declared in this scope; did you mean ‘AVIOContext’?
187 | AVBSFContext, Deleterp >;
| ^~~~~~~~~~~~
| AVIOContext
["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:48: error: ‘av_bsf_free’ was not declared in this scope; did you mean ‘av_opt_free’?
187 | AVBSFContext, Deleterp >;
| ^~~~~~~~~~~
| av_opt_free
["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:59: error: template argument 1 is invalid
187 | AVBSFContext, Deleterp >;
| ^
["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:59: error: template argument 3 is invalid
["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:61: error: template argument 1 is invalid
187 | AVBSFContext, Deleterp >;
| ^
["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:187:61: error: template argument 2 is invalid
["local folder"]/decord/src/audio/audio_reader.cc: In member function ‘int decord::AudioReader::Decode(std::string, int)’:
["local folder"]/decord/src/audio/audio_reader.cc:131:52: error: ‘AVCodecParameters’ {aka ‘struct AVCodecParameters’} has no member named ‘channels’
131 | numChannels = tempCodecParameters->channels;
| ^~~~~~~~
["local folder"]/decord/src/audio/audio_reader.cc:151:26: warning: ‘int avcodec_close(AVCodecContext*)’ is deprecated [-Wdeprecated-declarations]
151 | avcodec_close(pCodecContext);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:23,
from ["local folder"]/decord/src/audio/../../include/decord/audio_interface.h:9,
from["local folder"]/decord/src/audio/audio_reader.h:10,
from["local folder"]/decord/src/audio/audio_reader.cc:5:
/usr/local/include/libavcodec/avcodec.h:2417:5: note: declared here
2417 | int avcodec_close(AVCodecContext *avctx);
| ^~~~~~~~~~~~~
["local folder"]/decord/src/audio/audio_reader.cc: In member function ‘void decord::AudioReader::DecodePacket(AVPacket*, AVCodecContext*, AVFrame*, int)’:
["local folder"]/decord/src/audio/audio_reader.cc:213:22: warning: ‘int avcodec_close(AVCodecContext*)’ is deprecated [-Wdeprecated-declarations]
213 | avcodec_close(pCodecContext);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from ["local folder"]/decord/src/audio/../../include/decord/../../src/video/ffmpeg/ffmpeg_common.h:23,
from["local folder"]/decord/src/audio/../../include/decord/audio_interface.h:9,
from["local folder"]/decord/src/audio/audio_reader.h:10,
from["local folder"]/decord/src/audio/audio_reader.cc:5:
/usr/local/include/libavcodec/avcodec.h:2417:5: note: declared here
2417 | int avcodec_close(AVCodecContext *avctx);
| ^~~~~~~~~~~~~
["local folder"]/decord/src/audio/audio_reader.cc: In member function ‘void decord::AudioReader::HandleFrame(AVCodecContext*, AVFrame*)’:
["local folder"]/decord/src/audio/audio_reader.cc:232:99: error: ‘AVFrame’ {aka ‘struct AVFrame’} has no member named ‘channel_layout’; did you mean ‘ch_layout’?
232 | int outNumChannels = av_get_channel_layout_nb_channels(mono ? AV_CH_LAYOUT_MONO : pFrame->channel_layout);
| ^~~~~~~~~~~~~~
| ch_layout
["local folder"]/decord/src/audio/audio_reader.cc:232:30: error: ‘av_get_channel_layout_nb_channels’ was not declared in this scope
232 | int outNumChannels = av_get_channel_layout_nb_channels(mono ? AV_CH_LAYOUT_MONO : pFrame->channel_layout);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
["local folder"]/decord/src/audio/audio_reader.cc: In member function ‘void decord::AudioReader::InitSWR(AVCodecContext*)’:
["local folder"]/decord/src/audio/audio_reader.cc:284:28: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘channel_layout’; did you mean ‘ch_layout’?
284 | if (pCodecContext->channel_layout == 0) {
| ^~~~~~~~~~~~~~
| ch_layout
["local folder"]/decord/src/audio/audio_reader.cc:285:28: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘channel_layout’; did you mean ‘ch_layout’?
285 | pCodecContext->channel_layout = av_get_default_channel_layout( pCodecContext->channels );
| ^~~~~~~~~~~~~~
| ch_layout
["local folder"]/decord/src/audio/audio_reader.cc:285:91: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘channels’
285 | pCodecContext->channel_layout = av_get_default_channel_layout( pCodecContext->channels );
| ^~~~~~~~
["local folder"]/decord/src/audio/audio_reader.cc:285:45: error: ‘av_get_default_channel_layout’ was not declared in this scope
285 | pCodecContext->channel_layout = av_get_default_channel_layout( pCodecContext->channels );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
["local folder"]/decord/src/audio/audio_reader.cc:287:83: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘channel_layout’; did you mean ‘ch_layout’?
287 | av_opt_set_channel_layout(this->swr, "in_channel_layout", pCodecContext->channel_layout, 0);
| ^~~~~~~~~~~~~~
| ch_layout
["local folder"]/decord/src/audio/audio_reader.cc:287:9: error: ‘av_opt_set_channel_layout’ was not declared in this scope; did you mean ‘av_opt_set_chlayout’?
287 | av_opt_set_channel_layout(this->swr, "in_channel_layout", pCodecContext->channel_layout, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| av_opt_set_chlayout
["local folder"]/decord/src/audio/audio_reader.cc:288:110: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘channel_layout’; did you mean ‘ch_layout’?
288 | av_opt_set_channel_layout(this->swr, "out_channel_layout", mono ? AV_CH_LAYOUT_MONO : pCodecContext->channel_layout, 0);
| ^~~~~~~~~~~~~~
| ch_layout
make[2]: *** [CMakeFiles/decord.dir/build.make:76: CMakeFiles/decord.dir/src/audio/audio_interface.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/decord.dir/build.make:90: CMakeFiles/decord.dir/src/audio/audio_reader.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/decord.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.