VideoProcessingFramework: Cmake: Makefile:148: recipe for target 'all' failed; make: *** [all] Error 2
Describe the bug
I get the following issue when I try to cmake:
[ 31%] Building CXX object PyNvCodec/TC/CMakeFiles/TC.dir/src/Tasks.cpp.o
In file included from /home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp:25:0:
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/inc/NppCommon.hpp:21:22: error: ‘NppStreamContext’ has not been declared
NppStreamContext &nppCtx);
^~~~~~~~~~~~~~~~
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/inc/NppCommon.hpp:25:37: error: expected ‘)’ before ‘&’ token
explicit NppLock(NppStreamContext &nppCtx);
^
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/inc/NppCommon.hpp:29:3: error: ‘NppStreamContext’ does not name a type; did you mean ‘VideoContext’?
NppStreamContext &ctx;
^~~~~~~~~~~~~~~~
VideoContext
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp:828:3: error: ‘NppStreamContext’ does not name a type; did you mean ‘AVFormatContext’?
NppStreamContext nppCtx;
^~~~~~~~~~~~~~~~
AVFormatContext
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp: In constructor ‘VPF::ResizeSurface_Impl::ResizeSurface_Impl(uint32_t, uint32_t, VPF::Pixel_Format, CUcontext, CUstream)’:
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp:833:37: error: ‘nppCtx’ was not declared in this scope
SetupNppContext(cu_ctx, cu_str, nppCtx);
^~~~~~
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp:833:37: note: suggested alternative: ‘nppZCC’
SetupNppContext(cu_ctx, cu_str, nppCtx);
^~~~~~
nppZCC
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp: At global scope:
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp:892:3: error: ‘NppStreamContext’ does not name a type; did you mean ‘AVFormatContext’?
NppStreamContext nppCtx;
^~~~~~~~~~~~~~~~
AVFormatContext
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp: In member function ‘virtual VPF::TaskExecStatus VPF::NppResizeSurfacePacked3C_Impl::Execute(VPF::Surface&)’:
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp:878:18: error: ‘nppCtx’ was not declared in this scope
NppLock lock(nppCtx);
^~~~~~
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp:878:18: note: suggested alternative: ‘nppZCC’
NppLock lock(nppCtx);
^~~~~~
nppZCC
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp:880:16: error: ‘nppiResize_8u_C3R_Ctx’ was not declared in this scope
auto ret = nppiResize_8u_C3R_Ctx(pSrc, nSrcStep, oSrcSize, oSrcRectROI,
^~~~~~~~~~~~~~~~~~~~~
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp:880:16: note: suggested alternative: ‘nppiResize_8u_C3R’
auto ret = nppiResize_8u_C3R_Ctx(pSrc, nSrcStep, oSrcSize, oSrcRectROI,
^~~~~~~~~~~~~~~~~~~~~
nppiResize_8u_C3R
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp: In member function ‘virtual VPF::TaskExecStatus VPF::NppResizeSurfacePlanar420_Impl::Execute(VPF::Surface&)’:
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp:937:20: error: ‘nppCtx’ was not declared in this scope
NppLock lock(nppCtx);
^~~~~~
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp:937:20: note: suggested alternative: ‘nppZCC’
NppLock lock(nppCtx);
^~~~~~
nppZCC
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp:939:18: error: ‘nppiResize_8u_C1R_Ctx’ was not declared in this scope
auto ret = nppiResize_8u_C1R_Ctx(pSrc, nSrcStep, oSrcSize, oSrcRectROI,
^~~~~~~~~~~~~~~~~~~~~
/home/stian/LocalProjects/build/VideoProcessingFramework/PyNvCodec/TC/src/Tasks.cpp:939:18: note: suggested alternative: ‘nppiResize_8u_C1R’
auto ret = nppiResize_8u_C1R_Ctx(pSrc, nSrcStep, oSrcSize, oSrcRectROI,
^~~~~~~~~~~~~~~~~~~~~
nppiResize_8u_C1R
PyNvCodec/TC/CMakeFiles/TC.dir/build.make:94: recipe for target 'PyNvCodec/TC/CMakeFiles/TC.dir/src/Tasks.cpp.o' failed
make[2]: *** [PyNvCodec/TC/CMakeFiles/TC.dir/src/Tasks.cpp.o] Error 1
CMakeFiles/Makefile2:347: recipe for target 'PyNvCodec/TC/CMakeFiles/TC.dir/all' failed
make[1]: *** [PyNvCodec/TC/CMakeFiles/TC.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2
To Reproduce Steps to reproduce the behavior: I used the following script to build:
# Export paths to Video Codec SDK and FFMpeg
export PATH_TO_SDK=/home/stian/Downloads/Installers/Nvidia/Video_Codec_SDK_11.0.10
export PATH_TO_FFMPEG=/usr/bin/ffmpeg
# Clone repo and start building process
git clone https://github.com/NVIDIA/VideoProcessingFramework.git
# Export path to CUDA compiler (you may need this sometimes if you install drivers from Nvidia site):
export CUDACXX=/usr/local/cuda/bin/nvcc
# Now the build itself
cd VideoProcessingFramework
export INSTALL_PREFIX=$(pwd)/install
mkdir -p install
mkdir -p build
cd build
# If you want to generate Pytorch extension, set up corresponding CMake value GENERATE_PYTORCH_EXTENSION
cmake .. \
-DFFMPEG_DIR:PATH="$PATH_TO_FFMPEG" \
-DVIDEO_CODEC_SDK_DIR:PATH="$PATH_TO_SDK" \
-DGENERATE_PYTHON_BINDINGS:BOOL="1" \
-DGENERATE_PYTORCH_EXTENSION:BOOL="0" \
-DPYTHON_LIBRARY=/home/stian/miniconda3/lib/libpython3.7m.so \
-DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_PREFIX"
make && make install
I then see the error given above.
Expected behavior I expect it to complete the build and install successfully.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Ubuntu LTS 18.04
- Nvidia driver version: 455.28
- CUDA Version: 10.0
- Video Codec SDK Version: 11.0.10
- Python Version: 3.7
- GCC: 7.5.0
Additional context As you can see from the script I used to build, I try to disable PyTorch as I don’t needed for my application. Can I avoid having to install PyTorch or do I really need that? I would prefer to avoid needing to install almost 500 MB just for the tensors in PyTorch.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 41 (15 by maintainers)
Commits related to this issue
- Update NvCodecCliOptions.cpp Addressing issue #130 — committed to NVIDIA/VideoProcessingFramework by rarzumanyan 4 years ago
Hello, I combined @StianHanssen Dockerfile and a Dockerfile from @u93 in #132 and it worked for me. Sharing it here if you guys are still interested:
Of course you need to place your copy of Video Codec SDK alongside your dockerfile for this to work. And also feel free to chose a different base image, anything with cuda should work with the respective apt install setup.
Inside the container:
python3 -c "import PyNvCodec as nvc"
You also need to copy in and execute your own scripts from the workdir/app
.Works like a charm. Thanks @StianHanssen and @u93 for doing most of the legwork. Cheers.
@StianHanssen
This issue is caused by bug in VPF source code.
NV_ENC_H264_PROFILE_SVC_TEMPORAL_SCALABILTY
symbol was removed starting from Video Codec SDK 11. I’ve pushed the patch to master branch which checks the API version. With latest commitdocker build.
finishes successfully. Thanks for bringing this up!@rarzumanyan I am not asking you to publish a Docker image, or distributing it, it is a Dockerfile that does one more step compared to the script you provide in your install instructions on the Wiki - On top of doing the installation it sets up the environment.
I am just talking about people being able to see the Dockerfile mentioned here under issues and get a very specific and clearly defined way to install this framework. If there is a problem with that as well, then that is fine too so long as you could use it as a debug tool to get to the bottom of this issue. I don’t mind deleting the gist if you wish.
Thank you for taking some time to look at this!
@StianHanssen
I doubt it’s legal to distribute Video Codec SDK without explicit EULA acceptance. This is the main reason
pip install vpf
and CI isn’t yet supported.I’ll check VPF build under Docker but that’s not an option for a distribution.
@StianHanssen
To my best knowledge 10.1 should be fine.