AliceVision
AliceVision copied to clipboard
[Issue] Error in building from source | vulkan | ffmpeg | popsift | in ubuntu 24.04 cuda 12.6
Following the build instructions in:
Ubuntu 24.04 Cuda 12.6 gcc 12.3 g++ 12.3
This step works
cmake -DALICEVISION_BUILD_DEPENDENCIES=ON -DCMAKE_INSTALL_PREFIX=$PWD/../install ../AliceVision
When running
make -j10
I get the following error:
CC libavutil/hwcontext_vulkan.o src/libavutil/hwcontext_vulkan.c:362:7: error: ‘VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME’ undeclared here (not in a function); did you mean ‘VK_KHR_VIDEO_ENCODE_H264_EXTENSION_NAME’? 362 | { VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | VK_KHR_VIDEO_ENCODE_H264_EXTENSION_NAME src/libavutil/hwcontext_vulkan.c:363:7: error: ‘VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME’ undeclared here (not in a function); did you mean ‘VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME’? 363 | { VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME src/libavutil/hwcontext_vulkan.c:364:7: error: ‘VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME’ undeclared here (not in a function); did you mean ‘VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME’? 364 | { VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME make[3]: *** [/home/anurag/Codes/build/ffmpeg/ffbuild/common.mak:81: libavutil/hwcontext_vulkan.o] Error 1 make[2]: *** [CMakeFiles/ffmpeg.dir/build.make:86: external/src/ffmpeg-stamp/ffmpeg-build] Error 2 make[1]: *** [CMakeFiles/Makefile2:550: CMakeFiles/ffmpeg.dir/all] Error 2 make: *** [Makefile:136: all] Error 2
Changing lines 362-364 in /build/external/src/ffmpeg-build/src/libavutil/hwcontext_vulkan.c
{ VK_KHR_VIDEO_ENCODE_H264_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, { VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, { VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME, FF_VK_EXT_NO_FLAG },
fixed the issue but new issue arrises
src/libavcodec/x86/mathops.h: Assembler messages: src/libavcodec/x86/mathops.h:125: Error: operand type mismatch forshr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for shr' src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for shr'
using patch fixed this issue: (build/external/src/ffmpeg-build/src/libavcodec/x86/mathops.h) https://git.ffmpeg.org/gitweb/ffmpeg.git/blob_plain/effadce6c756247ea8bae32dc13bb3e6f464f0eb:/libavcodec/x86/mathops.h
but then issue comes from popsift: ` from /home/anurag/Codes/build/popsift/src/popsift/s_filtergrid.cu:21: /usr/local/cuda-12.6/include/nvtx3/nvToolsExt.h:941:45: error: macro "nvtxRangePop" passed 1 arguments, but takes just 0 941 | NVTX_DECLSPEC int NVTX_API nvtxRangePop(void); | ^ /home/anurag/Codes/build/popsift/src/popsift/s_filtergrid.cu:16: note: macro "nvtxRangePop" defined here 16 | #define nvtxRangePop() | In file included from /usr/local/cuda-12.6/include/nvtx3/nvtxDetail/nvtxImpl.h:389, from /usr/local/cuda-12.6/include/nvtx3/nvToolsExt.h:1494: /usr/local/cuda-12.6/include/nvtx3/nvtxDetail/nvtxImplCore.h:103:45: error: macro "nvtxRangePop" passed 1 arguments, but takes just 0 103 | NVTX_DECLSPEC int NVTX_API nvtxRangePop(void) | ^ /home/anurag/Codes/build/popsift/src/popsift/s_filtergrid.cu:16: note: macro "nvtxRangePop" defined here 16 | #define nvtxRangePop() | CMake Error at popsift_generated_s_filtergrid.cu.o.Release.cmake:220 (message): Error generating /home/anurag/Codes/build/external/popsift_build/src/CMakeFiles/popsift.dir/popsift/./popsift_generated_s_filtergrid.cu.o
make[5]: *** [src/CMakeFiles/popsift.dir/build.make:182: src/CMakeFiles/popsift.dir/popsift/popsift_generated_s_filtergrid.cu.o] Error 1 make[4]: *** [CMakeFiles/Makefile2:124: src/CMakeFiles/popsift.dir/all] Error 2 make[3]: *** [Makefile:136: all] Error 2 make[2]: *** [CMakeFiles/popsift.dir/build.make:86: external/src/popsift-stamp/popsift-build] Error 2 make[1]: *** [CMakeFiles/Makefile2:733: CMakeFiles/popsift.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 `
Link to issue in postfix: https://github.com/microsoft/vcpkg/issues/43785
Any help on how to fix this issue will be highly appriciated.