Closed lanytcc closed 4 months ago
还有 我自己编译安装时需要安装依赖后,添加-DWITH_FFMPEG=ON编译时才能正确识别到ffmpeg apt-get install pkg-config libavcodec-dev libavformat-dev libswscale-dev libavutil-dev
刚才又踩坑了,没装 libgtk2.0-dev 运行时报错 需要重新编译并且添加编译选项 解决方案见:https://stackoverflow.com/questions/28776053/opencv-gtk2-x-error-unspecified-error-the-function-is-not-implemented
包里面默认就开了 ffmpeg, -DWITH_FFMPEG=ON
也没必要外面单独引用 add_requires("ffmpeg")
是 opencv 里面,没判断 if package:config("ffmpeg") package:add("deps", "ffmpeg")
,缺少 ffmpeg 库依赖而已
https://github.com/xmake-io/xmake-repo/pull/1620
/usr/local/bin/cmake -DCMAKE_OSX_DEPLOYMENT_TARGET= -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DB UILD_opencv_hdf=OFF -DBUILD_opencv_java=OFF -DBUILD_opencv_text=ON -DOPENCV_ENABLE_NONFREE=ON -D OPENCV_GENERATE_PKGCONFIG=ON -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_JAVA= OFF -DOPENCV_FORCE_3RDPARTY_BUILD=ON -DWITH_1394=ON -DWITH_VTK=OFF -DWITH_EIGEN=ON -DWITH_FFMPEG =ON -DWITH_GSTREAMER=OFF -DWITH_GTK=OFF -DWITH_IPP=OFF -DWITH_HALIDE=OFF -DWITH_VULKAN=OFF -DWIT H_JASPER=OFF -DWITH_OPENJPEG=OFF -DWITH_JPEG=ON -DWITH_WEBP=ON -DWITH_OPENEXR=OFF -DWITH_OPENGL= ON -DWITH_PNG=ON -DWITH_TBB=OFF -DWITH_TIFF=ON -DWITH_ITT=OFF -DWITH_PROTOBUF=ON -DWITH_QUIRC=ON -DPARALLEL_ENABLE_PLUGINS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DOPENCV_EXTRA _MODULES_PATH=/Users/ruki/.xmake/cache/packages/2211/o/opencv/4.6.0/resources/opencv_contrib/4.6 .0.tar.gz.dir/opencv_contrib-4.6.0/modules -DCMAKE_INSTALL_PREFIX=/Users/ruki/.xmake/packages/o/ opencv/4.6.0/6e15d05bb2f943e3b8962f9bcab06e74 -DCMAKE_INSTALL_LIBDIR:PATH=lib -G "Unix Makefiles " -DCMAKE_POSITION_INDEPENDENT_CODE=ON /Users/ruki/.xmake/cache/packages/2211/o/opencv/4.6.0/sou
刚才又踩坑了,没装 libgtk2.0-dev 运行时报错 需要重新编译并且添加编译选项 解决方案见:https://stackoverflow.com/questions/28776053/opencv-gtk2-x-error-unspecified-error-the-function-is-not-implemented
只有配置 add_requires("opencv", {configs = {gtk = true}})
才会引入 gtk-3.0 依赖 link flags,并且你需要先手动安装 gtk-3.0-dev
gtk feature 默认没开启
包里面默认就开了 ffmpeg, 也没必要外面单独引用
-DWITH_FFMPEG=ON``add_requires("ffmpeg")
是 opencv 里面,没判断 ,缺少 ffmpeg 库依赖而已
if package:config("ffmpeg") package:add("deps", "ffmpeg")
1620
/usr/local/bin/cmake -DCMAKE_OSX_DEPLOYMENT_TARGET= -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DB UILD_opencv_hdf=OFF -DBUILD_opencv_java=OFF -DBUILD_opencv_text=ON -DOPENCV_ENABLE_NONFREE=ON -D OPENCV_GENERATE_PKGCONFIG=ON -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_JAVA= OFF -DOPENCV_FORCE_3RDPARTY_BUILD=ON -DWITH_1394=ON -DWITH_VTK=OFF -DWITH_EIGEN=ON -DWITH_FFMPEG =ON -DWITH_GSTREAMER=OFF -DWITH_GTK=OFF -DWITH_IPP=OFF -DWITH_HALIDE=OFF -DWITH_VULKAN=OFF -DWIT H_JASPER=OFF -DWITH_OPENJPEG=OFF -DWITH_JPEG=ON -DWITH_WEBP=ON -DWITH_OPENEXR=OFF -DWITH_OPENGL= ON -DWITH_PNG=ON -DWITH_TBB=OFF -DWITH_TIFF=ON -DWITH_ITT=OFF -DWITH_PROTOBUF=ON -DWITH_QUIRC=ON -DPARALLEL_ENABLE_PLUGINS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DOPENCV_EXTRA _MODULES_PATH=/Users/ruki/.xmake/cache/packages/2211/o/opencv/4.6.0/resources/opencv_contrib/4.6 .0.tar.gz.dir/opencv_contrib-4.6.0/modules -DCMAKE_INSTALL_PREFIX=/Users/ruki/.xmake/packages/o/ opencv/4.6.0/6e15d05bb2f943e3b8962f9bcab06e74 -DCMAKE_INSTALL_LIBDIR:PATH=lib -G "Unix Makefiles " -DCMAKE_POSITION_INDEPENDENT_CODE=ON /Users/ruki/.xmake/cache/packages/2211/o/opencv/4.6.0/sou
我刚才尝试将if package:config("ffmpeg") package:add("deps", "ffmpeg")
添加进opencv的on_load里面,重新安装编译会报错,install.txt,我去查了报错内容,是ffmpeg要开启x264支持 ,然后我去看了ffmpeg的lua文件,发现x264默认关闭,我手动打开后重新安装,流程从头跑一遍依旧报错,报错内容还是一样的(也就是上面这个txt文件)。
是我if语句位置添加的不对吗?
试下这个 patch https://github.com/xmake-io/xmake-repo/pull/1620
本地应该能过,不过 ci 上还有一些其他问题
Xmake 版本
v2.7.2+202210100435
操作系统版本和架构
5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
描述问题
opencv 在编译安装是不开启ffmpeg支持部分功能无法正常使用,我尝试在lua文件中添加编译选项(-DWITH_FFMPEG=ON)后报错。 报错内容为如下error1 后来我又尝试add_requires和app_pkg里面把添加了ffmpeg 报错内容为如下error2 加了-vD选项的在标题error3下(是在error2的基础加的-vD)
期待的结果
libopencv正常工作
工程配置
https://github.com/Aizaixyq/pipe_car
这个是项目地址
附加信息和错误日志
error1
error: /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function, std::allocator > const&, bool)':
cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7 cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0x15e): undefined reference to
hw_create_derived_context(AVHWDeviceType, AVBufferRef*)::FreeChildContext::free(AVHWDeviceContext*)': cap_ffmpeg.cpp:(.text._ZZL25hw_create_derived_context14AVHWDeviceTypeP11AVBufferRefEN16FreeChildContext4freeEP17AVHWDeviceContext+0x27): undefined reference to
av_buffer_unref' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionInternalFFMpegRegister::~InternalFFMpegRegister()': cap_ffmpeg.cpp:(.text._ZN22InternalFFMpegRegisterD2Ev[_ZN22InternalFFMpegRegisterD5Ev]+0xb): undefined reference to
av_log_set_callback' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionffmpeg_log_callback(void*, int, char const*, __va_list_tag*)': cap_ffmpeg.cpp:(.text._ZL19ffmpeg_log_callbackPviPKcP13__va_list_tag+0x11): undefined reference to
av_log_get_level' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionCvCapture_FFMPEG::init()': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4initEv+0xcc): undefined reference to
av_init_packet' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4initEv+0x16d): undefined reference toav_init_packet' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
CvCapture_FFMPEG::close()': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x15): undefined reference tosws_freeContext' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x30): undefined reference to
av_frame_free' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x4e): undefined reference toavformat_close_input' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x5f): undefined reference to
av_frame_unref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x75): undefined reference toav_packet_unref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0x96): undefined reference to
av_dict_free' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0xac): undefined reference toav_packet_unref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG5closeEv+0xcd): undefined reference to
av_bsf_free' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionCvCapture_FFMPEG::processRawPacket()': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16processRawPacketEv+0x70): undefined reference to
av_packet_unref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16processRawPacketEv+0x83): undefined reference toav_bsf_send_packet' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16processRawPacketEv+0x9a): undefined reference to
av_bsf_receive_packet' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16processRawPacketEv+0xde): undefined reference toav_bsf_get_by_name' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16processRawPacketEv+0xf2): undefined reference to
av_bsf_alloc' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16processRawPacketEv+0x142): undefined reference toavcodec_parameters_copy' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG16processRawPacketEv+0x14e): undefined reference to
av_bsf_init' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionCvCapture_FFMPEG::grabFrame() [clone .part.0]': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv.part.0+0x3e): undefined reference to
avcodec_receive_frame' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv.part.0+0x58): undefined reference toav_packet_unref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv.part.0+0x6d): undefined reference to
av_read_frame' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv.part.0+0x94): undefined reference toav_packet_unref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv.part.0+0xe7): undefined reference to
avcodec_send_packet' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG9grabFrameEv.part.0+0xf8): undefined reference toavcodec_receive_frame' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
CvCapture_FFMPEG::getProperty(int) const': cap_ffmpeg.cpp:(.text._ZNK16CvCapture_FFMPEG11getPropertyEi+0x198): undefined reference toavcodec_get_name' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZNK16CvCapture_FFMPEG11getPropertyEi+0x25c): undefined reference to
av_guess_sample_aspect_ratio' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZNK16CvCapture_FFMPEG11getPropertyEi+0x281): undefined reference toav_guess_sample_aspect_ratio' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZNK16CvCapture_FFMPEG11getPropertyEi+0x2a1): undefined reference to
avcodec_pix_fmt_to_codec_tag' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionCvCapture_FFMPEG::get_rotation_angle()': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG18get_rotation_angleEv+0x1e): undefined reference to
av_stream_get_side_data' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG18get_rotation_angleEv+0x2b): undefined reference toav_display_rotation_get' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
CvCapture_FFMPEG::seek(long)': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4seekEl+0xcd): undefined reference toav_seek_frame' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4seekEl+0xd6): undefined reference to
avcodec_flush_buffers' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionhw_create_frames(AVCodecContext*, AVBufferRef*, int, int, AVPixelFormat)': cap_ffmpeg.cpp:(.text._ZL16hw_create_framesP14AVCodecContextP11AVBufferRefii13AVPixelFormat+0xb1): undefined reference to
avcodec_get_hw_frames_parameters' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_framesP14AVCodecContextP11AVBufferRefii13AVPixelFormat+0x105): undefined reference toav_hwframe_ctx_init' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_framesP14AVCodecContextP11AVBufferRefii13AVPixelFormat+0x13b): undefined reference to
av_hwframe_ctx_create_derived' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_framesP14AVCodecContextP11AVBufferRefii13AVPixelFormat+0x147): undefined reference toav_buffer_unref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_framesP14AVCodecContextP11AVBufferRefii13AVPixelFormat+0x19c): undefined reference to
av_hwframe_ctx_init' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_framesP14AVCodecContextP11AVBufferRefii13AVPixelFormat+0x50e): undefined reference toav_buffer_unref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_framesP14AVCodecContextP11AVBufferRefii13AVPixelFormat+0x524): undefined reference to
av_hwframe_ctx_alloc' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_framesP14AVCodecContextP11AVBufferRefii13AVPixelFormat+0x73f): undefined reference toav_hwdevice_get_hwframe_constraints' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_framesP14AVCodecContextP11AVBufferRefii13AVPixelFormat+0x75c): undefined reference to
av_hwframe_constraints_free' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionhw_get_format_callback(AVCodecContext*, AVPixelFormat const*)': cap_ffmpeg.cpp:(.text._ZL22hw_get_format_callbackP14AVCodecContextPK13AVPixelFormat+0xa4): undefined reference to
avcodec_get_hw_config' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionhw_check_codec(AVCodec*, AVHWDeviceType, char const*)': cap_ffmpeg.cpp:(.text._ZL14hw_check_codecP7AVCodec14AVHWDeviceTypePKc+0x3e): undefined reference to
av_hwdevice_get_type_name' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionhw_find_codec(AVCodecID, AVHWDeviceType, int (*)(AVCodec const*), char const*, AVPixelFormat*)': cap_ffmpeg.cpp:(.text._ZL13hw_find_codec9AVCodecID14AVHWDeviceTypePFiPK7AVCodecEPKcP13AVPixelFormat+0x44): undefined reference to
av_codec_iterate' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL13hw_find_codec9AVCodecID14AVHWDeviceTypePFiPK7AVCodecEPKcP13AVPixelFormat+0x7d): undefined reference toav_codec_is_encoder' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL13hw_find_codec9AVCodecID14AVHWDeviceTypePFiPK7AVCodecEPKcP13AVPixelFormat+0x93): undefined reference to
avcodec_get_hw_config' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL13hw_find_codec9AVCodecID14AVHWDeviceTypePFiPK7AVCodecEPKcP13AVPixelFormat+0xe9): undefined reference toav_codec_is_encoder' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
hw_create_derived_context(AVHWDeviceType, AVBufferRef*)': cap_ffmpeg.cpp:(.text._ZL25hw_create_derived_context14AVHWDeviceTypeP11AVBufferRef+0x81): undefined reference toav_hwdevice_get_type_name' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL25hw_create_derived_context14AVHWDeviceTypeP11AVBufferRef+0x96): undefined reference to
av_hwdevice_ctx_create_derived' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL25hw_create_derived_context14AVHWDeviceTypeP11AVBufferRef+0xb4): undefined reference toav_buffer_unref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL25hw_create_derived_context14AVHWDeviceTypeP11AVBufferRef+0x498): undefined reference to
av_buffer_ref' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionCvCapture_FFMPEG::retrieveFrame(int, unsigned char**, int*, int*, int*, int*)': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2_S2_+0x93): undefined reference to
av_frame_alloc' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2S2+0xa6): undefined reference toav_hwframe_transfer_data' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2_S2_+0x12d): undefined reference to
sws_getCachedContext' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2S2+0x14d): undefined reference toav_frame_unref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2_S2_+0x16f): undefined reference to
av_frame_get_buffer' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2S2+0x1f2): undefined reference tosws_scale' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG13retrieveFrameEiPPhPiS2_S2_S2_+0x23e): undefined reference to
av_frame_free' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionicv_av_write_frame_FFMPEG(AVFormatContext*, AVStream*, AVCodecContext*, unsigned char*, unsigned int, AVFrame*, int) [clone .constprop.0]': cap_ffmpeg.cpp:(.text._ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamP14AVCodecContextPhjP7AVFramei.constprop.0+0x8c): undefined reference to
av_packet_alloc' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamP14AVCodecContextPhjP7AVFramei.constprop.0+0xa3): undefined reference toavcodec_receive_packet' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamP14AVCodecContextPhjP7AVFramei.constprop.0+0xb2): undefined reference to
av_packet_free' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamP14AVCodecContextPhjP7AVFramei.constprop.0+0xf6): undefined reference toav_packet_rescale_ts' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamP14AVCodecContextPhjP7AVFramei.constprop.0+0x103): undefined reference to
av_write_frame' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamP14AVCodecContextPhjP7AVFramei.constprop.0+0x10e): undefined reference toav_packet_free' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamP14AVCodecContextPhjP7AVFramei.constprop.0+0x127): undefined reference to
avcodec_send_frame' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionCvVideoWriter_FFMPEG::writeFrame(unsigned char const*, int, int, int, int, int)': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x12e): undefined reference to
av_image_fill_arrays' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x165): undefined reference tosws_scale' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x186): undefined reference to
av_frame_alloc' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x1a9): undefined reference toav_hwframe_get_buffer' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x1c1): undefined reference to
av_hwframe_transfer_data' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x200): undefined reference toav_frame_free' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x244): undefined reference to
av_freep' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x260): undefined reference toav_mallocz' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x401): undefined reference to
sws_getContext' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x475): undefined reference toav_image_fill_arrays' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii+0x525): undefined reference to
av_frame_free' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionCvVideoWriter_FFMPEG::close()': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x2c): undefined reference to
sws_freeContext' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x71): undefined reference toav_free' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x7f): undefined reference to
av_free' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x8d): undefined reference toavcodec_close' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x9e): undefined reference to
av_free' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0xb9): undefined reference toavformat_free_context' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0xc2): undefined reference to
av_freep' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x17a): undefined reference toav_write_trailer' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG5closeEv+0x1ad): undefined reference to
avio_close' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionCvVideoWriter_FFMPEG::writeHWFrame(cv::_InputArray const&)': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG12writeHWFrameERKN2cv11_InputArrayE+0x41): undefined reference to
av_frame_alloc' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG12writeHWFrameERKN2cv11_InputArrayE+0x5f): undefined reference toav_hwframe_get_buffer' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG12writeHWFrameERKN2cv11_InputArrayE+0x7e): undefined reference to
av_frame_free' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functioncvReleaseVideoWriter_FFMPEG': cap_ffmpeg.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x46): undefined reference to
sws_freeContext' /usr/bin/ld: cap_ffmpeg.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x8b): undefined reference toav_free' /usr/bin/ld: cap_ffmpeg.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x99): undefined reference to
av_free' /usr/bin/ld: cap_ffmpeg.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0xa7): undefined reference toavcodec_close' /usr/bin/ld: cap_ffmpeg.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0xb8): undefined reference to
av_free' /usr/bin/ld: cap_ffmpeg.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0xd3): undefined reference toavformat_free_context' /usr/bin/ld: cap_ffmpeg.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0xdc): undefined reference to
av_freep' /usr/bin/ld: cap_ffmpeg.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x1aa): undefined reference toav_write_trailer' /usr/bin/ld: cap_ffmpeg.cpp:(.text.cvReleaseVideoWriter_FFMPEG+0x1dd): undefined reference to
avio_close' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in functionHWAccelIterator::HWAccelIterator(cv::VideoAccelerationType, bool, AVDictionary*)': cap_ffmpeg.cpp:(.text._ZN15HWAccelIteratorC2EN2cv21VideoAccelerationTypeEbP12AVDictionary[_ZN15HWAccelIteratorC5EN2cv21VideoAccelerationTypeEbP12AVDictionary]+0xb4d): undefined reference to
av_dict_get' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN15HWAccelIteratorC2EN2cv21VideoAccelerationTypeEbP12AVDictionary[_ZN15HWAccelIteratorC5EN2cv21VideoAccelerationTypeEbP12AVDictionary]+0xcbc): undefined reference toav_dict_get' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN15HWAccelIteratorC2EN2cv21VideoAccelerationTypeEbP12AVDictionary[_ZN15HWAccelIteratorC5EN2cv21VideoAccelerationTypeEbP12AVDictionary]+0xd75): undefined reference to
av_dict_get' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN15HWAccelIteratorC2EN2cv21VideoAccelerationTypeEbP12AVDictionary[_ZN15HWAccelIteratorC5EN2cv21VideoAccelerationTypeEbP12AVDictionary]+0x140e): undefined reference toav_dict_get' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
hw_create_device(AVHWDeviceType, int, std::cxx11::basic_string<char, std::char_traitsav_hwdevice_get_type_name' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0x718): undefined reference to
av_hwdevice_get_type_name' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0x748): undefined reference toav_hwdevice_ctx_create' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0x777): undefined reference to
av_hwdevice_get_type_name' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0xe20): undefined reference to `av_buffer_unref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0x144b): undefined reference toav_hwdevice_get_type_name' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0x146c): undefined reference to
av_buffer_ref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZL16hw_create_device14AVHWDeviceTypeiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0x16d6): undefined reference toav_buffer_unref' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
CvCapture_FFMPEG::open(char const, cv::VideoCaptureParameters const&)': cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x8a): undefined reference toav_log_set_level' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x96): undefined reference to
av_log_set_callback' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x458): undefined reference toavformat_network_init' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x51f): undefined reference to
av_log_set_level' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x74b): undefined reference toavformat_alloc_context' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x79b): undefined reference to
av_dict_parse_string' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x7b2): undefined reference toav_dict_get' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x7c3): undefined reference to
av_find_input_format' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x7d4): undefined reference toavformat_open_input' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x7e6): undefined reference to
avformat_find_stream_info' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x974): undefined reference toav_strerror' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0xbe4): undefined reference to
av_dict_set' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x1714): undefined reference toav_codec_is_decoder' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x1756): undefined reference to
avcodec_default_get_format' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x1773): undefined reference toav_buffer_unref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x17f7): undefined reference to
av_dict_get' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x182f): undefined reference toavcodec_open2' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x1e77): undefined reference to
av_hwdevice_find_type_by_name' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x1ea0): undefined reference toav_dict_get' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x20ec): undefined reference to
avcodec_find_decoder_by_name' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x2338): undefined reference toavcodec_find_decoder' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x2a01): undefined reference to
av_frame_alloc' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x2a59): undefined reference toav_stream_get_side_data' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN16CvCapture_FFMPEG4openEPKcRKN2cv22VideoCaptureParametersE+0x2a66): undefined reference to
av_display_rotation_get' /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function `CvVideoWriter_FFMPEG::open(char const, int, double, int, int, cv::VideoWriterParameters const&)': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xa2): undefined reference toav_log_set_level' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xae): undefined reference to
av_log_set_callback' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x438): undefined reference toavformat_network_init' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x5ce): undefined reference to
av_guess_format' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x603): undefined reference toav_codec_get_id' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x663): undefined reference to
avformat_alloc_context' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x6a0): undefined reference toav_malloc' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x71f): undefined reference to
av_log_set_level' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x76b): undefined reference toavformat_new_stream' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x7b4): undefined reference to
av_dict_parse_string' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xa3c): undefined reference toav_hwdevice_find_type_by_name' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xa68): undefined reference to
av_buffer_unref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xa81): undefined reference toav_codec_is_encoder' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xb64): undefined reference to
avcodec_get_context_defaults3' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xcda): undefined reference toav_sub_q' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xde5): undefined reference to
av_opt_set' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xe41): undefined reference toav_buffer_ref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xee7): undefined reference to
avcodec_open2' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1200): undefined reference toav_buffer_unref' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1216): undefined reference to
av_dict_free' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1248): undefined reference toav_malloc' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1285): undefined reference to
av_frame_alloc' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x12af): undefined reference toav_image_get_buffer_size' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x12ef): undefined reference to
avio_open' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1302): undefined reference toavformat_write_header' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x1464): undefined reference to
avcodec_find_encoder' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x2121): undefined reference toav_codec_get_tag' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x2208): undefined reference to
avformat_get_riff_video_tags' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x2214): undefined reference toavformat_get_mov_video_tags' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x222a): undefined reference to
av_codec_get_id' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x2282): undefined reference toavcodec_descriptor_get_by_name' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x24e2): undefined reference to
av_image_fill_arrays' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x250f): undefined reference toav_frame_alloc' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x253a): undefined reference to
av_image_get_buffer_size' /usr/bin/ld: cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0x254b): undefined reference to `av_free' collect2: error: ld returned 1 exit statuserror2
error: /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
CvVideoWriter_FFMPEG::open(char const*, int, double, int, int, cv::VideoWriterParameters const&)': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xb64): undefined reference to
avcodec_get_context_defaults3' collect2: error: ld returned 1 exit status warning: target(video) maybe is not compatible with license(GPL-3.0) of package(ffmpeg), you can use set_license()/set_policy() to modify/disable license!error3
fei-chen@fei-com:~/code/pipe_car$ xmake -vD [ 50%]: linking.release video /usr/bin/g++ -o build/linux/x86_64/release/video build/.objs/video/linux/x86_64/release/src/video.cpp.o -m64 -L/home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib -L/home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/opencv4/3rdparty -L/home/fei-chen/.xmake/packages/f/fmt/9.1.0/d363b063d73b40728217e45838c2553c/lib -L/home/fei-chen/.xmake/packages/f/ffmpeg/5.1.2/0d73288f53cd436498061fba7391a024/lib -lopencv_phase_unwrapping -lopencv_surface_matching -lopencv_saliency -lopencv_wechat_qrcode -lopencv_mcc -lopencv_face -lopencv_img_hash -lopencv_videostab -lopencv_structured_light -lopencv_intensity_transform -lopencv_ccalib -lopencv_line_descriptor -lopencv_stereo -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_fuzzy -lopencv_hfs -lopencv_rapid -lopencv_bgsegm -lopencv_bioinspired -lopencv_rgbd -lopencv_dpm -lopencv_aruco -lopencv_reg -lopencv_tracking -lopencv_datasets -lopencv_xfeatures2d -lopencv_shape -lopencv_barcode -lopencv_superres -lopencv_plot -lopencv_quality -lopencv_text -lopencv_optflow -lopencv_ximgproc -lopencv_xobjdetect -lopencv_xphoto -lopencv_stitching -lopencv_ml -lopencv_photo -lopencv_gapi -lopencv_objdetect -lopencv_highgui -lopencv_videoio -lopencv_video -lopencv_calib3d -lopencv_dnn -lopencv_features2d -lopencv_flann -lopencv_imgcodecs -lopencv_imgproc -lopencv_core -llibjpeg-turbo -llibpng -llibprotobuf -lade -lquirc -llibwebp -lzlib -llibtiff -lfmt -lavfilter -lavdevice -lavformat -lavcodec -lswscale -lswresample -lavutil -ldl -lpthread -Wl,-Bsymbolic /usr/bin/ld: /home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/libopencv_videoio.a(cap_ffmpeg.cpp.o): in function
CvVideoWriter_FFMPEG::open(char const*, int, double, int, int, cv::VideoWriterParameters const&)': cap_ffmpeg.cpp:(.text._ZN20CvVideoWriter_FFMPEG4openEPKcidiiRKN2cv21VideoWriterParametersE+0xb64): undefined reference to
avcodec_get_context_defaults3' collect2: error: ld returned 1 exit status error: @programdir/modules/private/async/runjobs.lua:256: @programdir/actions/build/kinds/binary.lua:74: @programdir/core/sandbox/modules/os.lua:372: execv(/usr/bin/g++ -o build/linux/x86_64/release/video build/.objs/video/linux/x86_64/release/src/video.cpp.o -m64 -L/home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib -L/home/fei-chen/.xmake/packages/o/opencv/4.6.0/7376a5106c224b749ff85438377726ef/lib/opencv4/3rdparty -L/home/fei-chen/.xmake/packages/f/fmt/9.1.0/d363b063d73b40728217e45838c2553c/lib -L/home/fei-chen/.xmake/packages/f/ffmpeg/5.1.2/0d73288f53cd436498061fba7391a024/lib -lopencv_phase_unwrapping -lopencv_surface_matching -lopencv_saliency -lopencv_wechat_qrcode -lopencv_mcc -lopencv_face -lopencv_img_hash -lopencv_videostab -lopencv_structured_light -lopencv_intensity_transform -lopencv_ccalib -lopencv_line_descriptor -lopencv_stereo -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_fuzzy -lopencv_hfs -lopencv_rapid -lopencv_bgsegm -lopencv_bioinspired -lopencv_rgbd -lopencv_dpm -lopencv_aruco -lopencv_reg -lopencv_tracking -lopencv_datasets -lopencv_xfeatures2d -lopencv_shape -lopencv_barcode -lopencv_superres -lopencv_plot -lopencv_quality -lopencv_text -lopencv_optflow -lopencv_ximgproc -lopencv_xobjdetect -lopencv_xphoto -lopencv_stitching -lopencv_ml -lopencv_photo -lopencv_gapi -lopencv_objdetect -lopencv_highgui -lopencv_videoio -lopencv_video -lopencv_calib3d -lopencv_dnn -lopencv_features2d -lopencv_flann -lopencv_imgcodecs -lopencv_imgproc -lopencv_core -llibjpeg-turbo -llibpng -llibprotobuf -lade -lquirc -llibwebp -lzlib -llibtiff -lfmt -lavfilter -lavdevice -lavformat -lavcodec -lswscale -lswresample -lavutil -ldl -lpthread -Wl,-Bsymbolic) failed(1) stack traceback: [C]: in function 'error' [@programdir/core/base/os.lua:897]: [@programdir/core/sandbox/modules/os.lua:372]: in function 'execv' [@programdir/modules/core/tools/gcc.lua:393]: [C]: in function 'xpcall' [@programdir/core/base/utils.lua:280]: [@programdir/actions/build/kinds/binary.lua:74]: in function 'callback' [@programdir/modules/core/project/depend.lua:193]: in function 'on_changed' [@programdir/actions/build/kinds/binary.lua:55]: in function '_do_link_target' [@programdir/actions/build/kinds/binary.lua:102]: [@programdir/actions/build/kinds/binary.lua:129]: in function '_link_target' [@programdir/actions/build/kinds/binary.lua:157]: in function 'jobfunc' [@programdir/modules/private/async/runjobs.lua:232]: [C]: in function 'xpcall' [@programdir/core/base/utils.lua:280]: in function 'trycall' [@programdir/core/sandbox/modules/try.lua:117]: in function 'try' [@programdir/modules/private/async/runjobs.lua:218]: in function 'cotask' [@programdir/core/base/scheduler.lua:404]:stack traceback: [C]: in function 'error' @programdir/core/base/os.lua:897: in function 'base/os.raiselevel' (...tail calls...) @programdir/modules/private/async/runjobs.lua:256: in field 'catch' @programdir/core/sandbox/modules/try.lua:123: in global 'try' @programdir/modules/private/async/runjobs.lua:218: in upvalue 'cotask' @programdir/core/base/scheduler.lua:404: in function <@programdir/core/base/scheduler.lua:397> warning: target(video) maybe is not compatible with license(GPL-3.0) of package(ffmpeg), you can use set_license()/set_policy() to modify/disable license!