MarcA711 / Rockchip-FFmpeg-Builds

MIT License
7 stars 4 forks source link

FFmpeg build fails #1

Closed MarcA711 closed 2 months ago

MarcA711 commented 2 months ago

can anybody help me find the problem here? @nyanmisaka

I changed this line https://github.com/MarcA711/Rockchip-FFmpeg-Builds/blob/2257758f4a66f396bb5bb1ad708f2f2a1f405792/scripts.d/50-vulkan/45-vulkan.sh#L4 to SCRIPT_COMMIT="v1.3.276" to avoid the new changes in the vulkan definition.

Afterwards, building still fails. The errors are related to mpp.

End of console output ``` /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x918): undefined reference to `mpp_packet_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x9b4): undefined reference to `mpp_packet_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xb6c): undefined reference to `mpp_enc_cfg_set_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xb80): undefined reference to `mpp_enc_cfg_set_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xc2c): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xc40): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xc54): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xcb4): undefined reference to `mpp_enc_cfg_set_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xcf4): undefined reference to `mpp_enc_cfg_set_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xd5c): undefined reference to `mpp_enc_cfg_set_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xd8c): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xda0): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xe24): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xe38): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xe4c): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o):rkmppenc.c:(.text+0xe60): more undefined references to `mpp_enc_cfg_set_s32' follow /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o): in function `rkmpp_encode_frame': rkmppenc.c:(.text+0x12d8): undefined reference to `mpp_packet_get_eos' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld/opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: : rkmppenc.c:(.text+0x12f8): undefined reference to `mpp_packet_get_data' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1308): undefined reference to `mpp_packet_get_length' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1350)libavutil/libavutil.a(hwcontext_rkmpp.o): in function `rkmpp_map_frame': : undefined reference to `hwcontext_rkmpp.c:(.text+0xe4)mpp_packet_get_pts' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1360): undefined reference to `mpp_packet_get_meta' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1370): undefined reference to `mpp_packet_has_meta' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1388): undefined reference to `mpp_meta_get_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x13b0): undefined reference to `mpp_meta_get_frame' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x13c0): undefined reference to `mpp_frame_get_buffer' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x13d8): undefined reference to `mpp_buffer_set_index_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: : undefined reference to `mpp_buffer_get_ptr_with_caller' rkmppenc.c:(.text/opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavutil/libavutil.a(hwcontext_rkmpp.o): in function `+0x1404rkmpp_frames_uninit': hwcontext_rkmpp.c:(.text): undefined reference to `mpp_frame_get_buffer' +0xb18): undefined reference to `mpp_buffer_group_put' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld/opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x141c): undefined reference to `mpp_buffer_get_index_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x142c): undefined reference to `mpp_buffer_put_with_caller' : libavutil/libavutil.a(hwcontext_rkmpp.o)/opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x: in function `rkmpp_frames_init': hwcontext_rkmpp.c:(.text+0xbe0): undefined reference to `1434): undefined reference to `mpp_frame_deinitmpp_buffer_group_get' ' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavutil/libavutil.a(hwcontext_rkmpp.o)/opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x: in function `rkmpp_free_drm_frame_descriptor': hwcontext_rkmpp.c:(.text+0xdf0): undefined reference to `mpp_buffer_put_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavutil/libavutil.a(hwcontext_rkmpp.o): in function `rkmpp_drm_pool_alloc': hwcontext_rkmpp.c:(.text+0xff8): undefined reference to `mpp_buffer_get_with_tag' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: hwcontext_rkmpp.c:(.text+0x1014): undefined reference to `mpp_buffer_get_fd_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: hwcontext_rkmpp.c:(.text+0x1028): undefined reference to `mpp_buffer_get_size_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: hwcontext_rkmpp.c:(.text+0x1310): undefined reference to `mpp_buffer_put_with_caller' 14d0): undefined reference to `mpp_frame_get_buffer' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x14ec): undefined reference to `mpp_buffer_get_index_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x14fc): undefined reference to `mpp_buffer_put_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1504): undefined reference to `mpp_frame_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1548): undefined reference to `mpp_frame_init' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1624): undefined reference to `mpp_frame_set_pts' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1634): undefined reference to `mpp_frame_set_width' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1644): undefined reference to `mpp_frame_set_height' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1650): undefined reference to `mpp_frame_set_colorspace' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x165c): undefined reference to `mpp_frame_set_color_primaries' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1668): undefined reference to `mpp_frame_set_color_trc' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1674): undefined reference to `mpp_frame_set_color_range' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x16d4): undefined reference to `mpp_frame_set_fmt' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1758): undefined reference to `mpp_frame_set_fbc_hdr_stride' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1880): undefined reference to `mpp_packet_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1898): undefined reference to `mpp_frame_set_fmt' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x18dc): undefined reference to `mpp_frame_set_hor_stride' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x18e8): undefined reference to `mpp_frame_set_ver_stride' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1920): undefined reference to `mpp_buffer_import_with_tag' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x192c): undefined reference to `mpp_frame_set_buffer' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1938): undefined reference to `mpp_frame_set_buf_size' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x19ac): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x19bc): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x19d0): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x19e4): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x19f8): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o):rkmppenc.c:(.text+0x1a0c): more undefined references to `mpp_enc_cfg_set_s32' follow /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o): in function `rkmpp_encode_frame': rkmppenc.c:(.text+0x1b4c): undefined reference to `mpp_frame_get_buf_size' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1bd4): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1bec): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1c2c): undefined reference to `mpp_packet_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1d18): undefined reference to `mpp_packet_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1d3c): undefined reference to `mpp_frame_set_offset_y' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1d48): undefined reference to `mpp_frame_set_fmt' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1d80): undefined reference to `mpp_packet_get_pts' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1de4): undefined reference to `mpp_frame_set_eos' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavutil/libavutil.a(hwcontext_rkmpp.o): in function `rkmpp_map_frame': hwcontext_rkmpp.c:(.text+0xe4): undefined reference to `mpp_buffer_get_ptr_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavutil/libavutil.a(hwcontext_rkmpp.o): in function `rkmpp_frames_uninit': hwcontext_rkmpp.c:(.text+0xb18): undefined reference to `mpp_buffer_group_put' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavutil/libavutil.a(hwcontext_rkmpp.o): in function `rkmpp_frames_init': hwcontext_rkmpp.c:(.text+0xbe0): undefined reference to `mpp_buffer_group_get' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavutil/libavutil.a(hwcontext_rkmpp.o): in function `rkmpp_free_drm_frame_descriptor': hwcontext_rkmpp.c:(.text+0xdf0): undefined reference to `mpp_buffer_put_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavutil/libavutil.a(hwcontext_rkmpp.o): in function `rkmpp_drm_pool_alloc': hwcontext_rkmpp.c:(.text+0xff8): undefined reference to `mpp_buffer_get_with_tag' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: hwcontext_rkmpp.c:(.text+0x1014): undefined reference to `mpp_buffer_get_fd_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: hwcontext_rkmpp.c:(.text+0x1028): undefined reference to `mpp_buffer_get_size_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: hwcontext_rkmpp.c:(.text+0x1310): undefined reference to `mpp_buffer_put_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o): in function `rkmpp_encode_close': rkmppenc.c:(.text+0x80): undefined reference to `mpp_frame_get_buffer' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x90): undefined reference to `mpp_buffer_get_index_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xa0): undefined reference to `mpp_buffer_put_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xac): undefined reference to `mpp_frame_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o): in function `rkmpp_free_packet_buf': rkmppenc.c:(.text+0x14c): undefined reference to `mpp_packet_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o): in function `rkmpp_encode_init': rkmppenc.c:(.text+0x354): undefined reference to `mpp_enc_cfg_init' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x3a8): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x3bc): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x3d8): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x3f4): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x408): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o):rkmppenc.c:(.text+0x41c): more undefined references to `mpp_enc_cfg_set_s32' follow /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o): in function `rkmpp_encode_init': rkmppenc.c:(.text+0x588): undefined reference to `mpp_enc_cfg_set_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x5e4): undefined reference to `mpp_enc_cfg_set_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x5f8): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x60c): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x658): undefined reference to `mpp_enc_cfg_set_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x684): undefined reference to `mpp_enc_cfg_set_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x724): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x738): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x74c): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x760): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x774): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o):rkmppenc.c:(.text+0x788): more undefined references to `mpp_enc_cfg_set_s32' follow /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o): in function `rkmpp_encode_init': rkmppenc.c:(.text+0x87c): undefined reference to `mpp_packet_init' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x894): undefined reference to `mpp_packet_set_length' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x8b8): undefined reference to `mpp_packet_get_pos' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x8c4): undefined reference to `mpp_packet_get_length' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x918): undefined reference to `mpp_packet_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x9b4): undefined reference to `mpp_packet_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xb6c): undefined reference to `mpp_enc_cfg_set_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xb80): undefined reference to `mpp_enc_cfg_set_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xc2c): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xc40): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xc54): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xcb4): undefined reference to `mpp_enc_cfg_set_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xcf4): undefined reference to `mpp_enc_cfg_set_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xd5c): undefined reference to `mpp_enc_cfg_set_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xd8c): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xda0): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xe24): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xe38): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0xe4c): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o):rkmppenc.c:(.text+0xe60): more undefined references to `mpp_enc_cfg_set_s32' follow /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o): in function `rkmpp_encode_frame': rkmppenc.c:(.text+0x12d8): undefined reference to `mpp_packet_get_eos' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x12f8): undefined reference to `mpp_packet_get_data' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1308): undefined reference to `mpp_packet_get_length' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1350): undefined reference to `mpp_packet_get_pts' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1360): undefined reference to `mpp_packet_get_meta' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1370): undefined reference to `mpp_packet_has_meta' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1388): undefined reference to `mpp_meta_get_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x13b0): undefined reference to `mpp_meta_get_frame' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x13c0): undefined reference to `mpp_frame_get_buffer' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x13d8): undefined reference to `mpp_buffer_set_index_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1404): undefined reference to `mpp_frame_get_buffer' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x141c): undefined reference to `mpp_buffer_get_index_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x142c): undefined reference to `mpp_buffer_put_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1434): undefined reference to `mpp_frame_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x14d0): undefined reference to `mpp_frame_get_buffer' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x14ec): undefined reference to `mpp_buffer_get_index_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x14fc): undefined reference to `mpp_buffer_put_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1504): undefined reference to `mpp_frame_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1548): undefined reference to `mpp_frame_init' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1624): undefined reference to `mpp_frame_set_pts' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1634): undefined reference to `mpp_frame_set_width' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1644): undefined reference to `mpp_frame_set_height' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1650): undefined reference to `mpp_frame_set_colorspace' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x165c): undefined reference to `mpp_frame_set_color_primaries' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1668): undefined reference to `mpp_frame_set_color_trc' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1674): undefined reference to `mpp_frame_set_color_range' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x16d4): undefined reference to `mpp_frame_set_fmt' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1758): undefined reference to `mpp_frame_set_fbc_hdr_stride' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1880): undefined reference to `mpp_packet_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1898): undefined reference to `mpp_frame_set_fmt' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x18dc): undefined reference to `mpp_frame_set_hor_stride' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x18e8): undefined reference to `mpp_frame_set_ver_stride' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1920): undefined reference to `mpp_buffer_import_with_tag' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x192c): undefined reference to `mpp_frame_set_buffer' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1938): undefined reference to `mpp_frame_set_buf_size' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x19ac): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x19bc): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x19d0): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x19e4): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x19f8): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o):rkmppenc.c:(.text+0x1a0c): more undefined references to `mpp_enc_cfg_set_s32' follow /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavcodec/libavcodec.a(rkmppenc.o): in function `rkmpp_encode_frame': rkmppenc.c:(.text+0x1b4c): undefined reference to `mpp_frame_get_buf_size' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1bd4): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1bec): undefined reference to `mpp_enc_cfg_set_s32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1c2c): undefined reference to `mpp_packet_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1d18): undefined reference to `mpp_packet_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1d3c): undefined reference to `mpp_frame_set_offset_y' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1d48): undefined reference to `mpp_frame_set_fmt' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1d80): undefined reference to `mpp_packet_get_pts' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: rkmppenc.c:(.text+0x1de4): undefined reference to `mpp_frame_set_eos' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavutil/libavutil.a(hwcontext_rkmpp.o): in function `rkmpp_map_frame': hwcontext_rkmpp.c:(.text+0xe4): undefined reference to `mpp_buffer_get_ptr_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavutil/libavutil.a(hwcontext_rkmpp.o): in function `rkmpp_frames_uninit': hwcontext_rkmpp.c:(.text+0xb18): undefined reference to `mpp_buffer_group_put' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavutil/libavutil.a(hwcontext_rkmpp.o): in function `rkmpp_frames_init': hwcontext_rkmpp.c:(.text+0xbe0): undefined reference to `mpp_buffer_group_get' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavutil/libavutil.a(hwcontext_rkmpp.o): in function `rkmpp_free_drm_frame_descriptor': hwcontext_rkmpp.c:(.text+0xdf0): undefined reference to `mpp_buffer_put_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: libavutil/libavutil.a(hwcontext_rkmpp.o): in function `rkmpp_drm_pool_alloc': hwcontext_rkmpp.c:(.text+0xff8): undefined reference to `mpp_buffer_get_with_tag' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: hwcontext_rkmpp.c:(.text+0x1014): undefined reference to `mpp_buffer_get_fd_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: hwcontext_rkmpp.c:(.text+0x1028): undefined reference to `mpp_buffer_get_size_with_caller' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: hwcontext_rkmpp.c:(.text+0x1310): undefined reference to `mpp_buffer_put_with_caller' collect2: error: ld returned 1 exit status make: *** [Makefile:133: ffmpeg_g] Error 1 make: *** Waiting for unfinished jobs.... collect2: error: ld returned 1 exit status make: *** [Makefile:133: ffprobe_g] Error 1 collect2: error: ld returned 1 exit status make: *** [Makefile:133: ffplay_g] Error 1 + rm -f -- /tmp/tmp.utNfhTMykc ```

Console output says:

undefined reference to `mpp_frame_deinit'
undefined reference to `mpp_frame_get_buffer'

but symbols are defined:

root@dbedcdd93cf4:/opt/ffbuild/lib# nm librockchip_mpp.a | grep mpp_frame_deinit
                 U mpp_frame_deinit
                 U mpp_frame_deinit
0000000000000120 T mpp_frame_deinit
nm: os_env.c.o: no symbols
nm: os_log.c.o: no symbols
nm: os_mem.c.o: no symbols
root@dbedcdd93cf4:/opt/ffbuild/lib# nm librockchip_mpp.a | grep mpp_frame_get_buffer
                 U mpp_frame_get_buffer
                 U mpp_frame_get_buffer
                 U mpp_frame_get_buffer
0000000000000220 T mpp_frame_get_buffer
nm: os_env.c.o: no symbols
nm: os_log.c.o: no symbols
nm: os_mem.c.o: no symbols
MarcA711 commented 2 months ago
End of ffbuild/config.log ``` check_cflags -Werror=missing-prototypes test_cflags -Werror=missing-prototypes test_cc -Werror=missing-prototypes BEGIN /tmp/ffconf.d0xN6e2f/test.c 1 int x; END /tmp/ffconf.d0xN6e2f/test.c aarch64-ffbuild-linux-gnu-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -pthread -DLIBTWOLAME_STATIC -std=c11 -fomit-frame-pointer -fPIC -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include -DCHROMAPRINT_NODLL -I/opt/ffbuild/include -I/opt/ffbuild/include/libvmaf -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include/libpng16 -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/lilv-0 -DLILV_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/serd-0 -I/opt/ffbuild/include/sord-0 -I/opt/ffbuild/include/zix-0 -I/opt/ffbuild/include/sratom-0 -DSRATOM_STATIC -DSORD_STATIC -DSERD_STATIC -pthread -DZIX_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/harfbuzz -DFRIBIDI_LIB_STATIC -I/opt/ffbuild/include/fribidi -I/opt/ffbuild/include -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include/libdrm -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -DFRIBIDI_LIB_STATIC -I/opt/ffbuild/include/fribidi -I/opt/ffbuild/include/harfbuzz -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -DHWY_STATIC_DEFINE -pthread -DJXL_STATIC_DEFINE -DJXL_CMS_STATIC_DEFINE -I/opt/ffbuild/include -DJXL_THREADS_STATIC_DEFINE -I/opt/ffbuild/include -DKVZ_STATIC_LIB -I/opt/ffbuild/include -I/opt/ffbuild/include/openjpeg-2.5 -DOPJ_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/opus -I/opt/ffbuild/include/opus -I/opt/ffbuild/include -DPL_HAVE_PTHREAD -DPTHREAD_HAS_SETCLOCK -pthread -DPL_STATIC -I/opt/ffbuild/include -D_REENTRANT -I/opt/ffbuild/include/rav1e -I/opt/ffbuild/include -pthread -DCJSON_HIDE_SYMBOLS -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -DLIBSSH_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/srt -I/opt/ffbuild/include/svt-av1 -UEB_DLL -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libvmaf -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/webp -I/opt/ffbuild/include -I/opt/ffbuild/include/webp -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include -I/opt/ffbuild/include/AL -DAL_LIBTYPE_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libdrm -I/opt/ffbuild/include -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -c -o /tmp/ffconf.d0xN6e2f/test.o /tmp/ffconf.d0xN6e2f/test.c check_cflags -Werror=return-type test_cflags -Werror=return-type test_cc -Werror=return-type BEGIN /tmp/ffconf.d0xN6e2f/test.c 1 int x; END /tmp/ffconf.d0xN6e2f/test.c aarch64-ffbuild-linux-gnu-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -pthread -DLIBTWOLAME_STATIC -std=c11 -fomit-frame-pointer -fPIC -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include -DCHROMAPRINT_NODLL -I/opt/ffbuild/include -I/opt/ffbuild/include/libvmaf -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include/libpng16 -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/lilv-0 -DLILV_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/serd-0 -I/opt/ffbuild/include/sord-0 -I/opt/ffbuild/include/zix-0 -I/opt/ffbuild/include/sratom-0 -DSRATOM_STATIC -DSORD_STATIC -DSERD_STATIC -pthread -DZIX_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/harfbuzz -DFRIBIDI_LIB_STATIC -I/opt/ffbuild/include/fribidi -I/opt/ffbuild/include -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include/libdrm -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -DFRIBIDI_LIB_STATIC -I/opt/ffbuild/include/fribidi -I/opt/ffbuild/include/harfbuzz -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -DHWY_STATIC_DEFINE -pthread -DJXL_STATIC_DEFINE -DJXL_CMS_STATIC_DEFINE -I/opt/ffbuild/include -DJXL_THREADS_STATIC_DEFINE -I/opt/ffbuild/include -DKVZ_STATIC_LIB -I/opt/ffbuild/include -I/opt/ffbuild/include/openjpeg-2.5 -DOPJ_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/opus -I/opt/ffbuild/include/opus -I/opt/ffbuild/include -DPL_HAVE_PTHREAD -DPTHREAD_HAS_SETCLOCK -pthread -DPL_STATIC -I/opt/ffbuild/include -D_REENTRANT -I/opt/ffbuild/include/rav1e -I/opt/ffbuild/include -pthread -DCJSON_HIDE_SYMBOLS -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -DLIBSSH_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/srt -I/opt/ffbuild/include/svt-av1 -UEB_DLL -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libvmaf -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/webp -I/opt/ffbuild/include -I/opt/ffbuild/include/webp -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include -I/opt/ffbuild/include/AL -DAL_LIBTYPE_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libdrm -I/opt/ffbuild/include -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -c -o /tmp/ffconf.d0xN6e2f/test.o /tmp/ffconf.d0xN6e2f/test.c check_cflags -Werror=vla test_cflags -Werror=vla test_cc -Werror=vla BEGIN /tmp/ffconf.d0xN6e2f/test.c 1 int x; END /tmp/ffconf.d0xN6e2f/test.c aarch64-ffbuild-linux-gnu-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -pthread -DLIBTWOLAME_STATIC -std=c11 -fomit-frame-pointer -fPIC -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include -DCHROMAPRINT_NODLL -I/opt/ffbuild/include -I/opt/ffbuild/include/libvmaf -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include/libpng16 -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/lilv-0 -DLILV_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/serd-0 -I/opt/ffbuild/include/sord-0 -I/opt/ffbuild/include/zix-0 -I/opt/ffbuild/include/sratom-0 -DSRATOM_STATIC -DSORD_STATIC -DSERD_STATIC -pthread -DZIX_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/harfbuzz -DFRIBIDI_LIB_STATIC -I/opt/ffbuild/include/fribidi -I/opt/ffbuild/include -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include/libdrm -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -DFRIBIDI_LIB_STATIC -I/opt/ffbuild/include/fribidi -I/opt/ffbuild/include/harfbuzz -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -DHWY_STATIC_DEFINE -pthread -DJXL_STATIC_DEFINE -DJXL_CMS_STATIC_DEFINE -I/opt/ffbuild/include -DJXL_THREADS_STATIC_DEFINE -I/opt/ffbuild/include -DKVZ_STATIC_LIB -I/opt/ffbuild/include -I/opt/ffbuild/include/openjpeg-2.5 -DOPJ_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/opus -I/opt/ffbuild/include/opus -I/opt/ffbuild/include -DPL_HAVE_PTHREAD -DPTHREAD_HAS_SETCLOCK -pthread -DPL_STATIC -I/opt/ffbuild/include -D_REENTRANT -I/opt/ffbuild/include/rav1e -I/opt/ffbuild/include -pthread -DCJSON_HIDE_SYMBOLS -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -DLIBSSH_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/srt -I/opt/ffbuild/include/svt-av1 -UEB_DLL -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libvmaf -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/webp -I/opt/ffbuild/include -I/opt/ffbuild/include/webp -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include -I/opt/ffbuild/include/AL -DAL_LIBTYPE_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libdrm -I/opt/ffbuild/include -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -c -o /tmp/ffconf.d0xN6e2f/test.o /tmp/ffconf.d0xN6e2f/test.c check_cflags -Wformat test_cflags -Wformat test_cc -Wformat BEGIN /tmp/ffconf.d0xN6e2f/test.c 1 int x; END /tmp/ffconf.d0xN6e2f/test.c aarch64-ffbuild-linux-gnu-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -pthread -DLIBTWOLAME_STATIC -std=c11 -fomit-frame-pointer -fPIC -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include -DCHROMAPRINT_NODLL -I/opt/ffbuild/include -I/opt/ffbuild/include/libvmaf -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include/libpng16 -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/lilv-0 -DLILV_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/serd-0 -I/opt/ffbuild/include/sord-0 -I/opt/ffbuild/include/zix-0 -I/opt/ffbuild/include/sratom-0 -DSRATOM_STATIC -DSORD_STATIC -DSERD_STATIC -pthread -DZIX_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/harfbuzz -DFRIBIDI_LIB_STATIC -I/opt/ffbuild/include/fribidi -I/opt/ffbuild/include -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include/libdrm -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -DFRIBIDI_LIB_STATIC -I/opt/ffbuild/include/fribidi -I/opt/ffbuild/include/harfbuzz -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -DHWY_STATIC_DEFINE -pthread -DJXL_STATIC_DEFINE -DJXL_CMS_STATIC_DEFINE -I/opt/ffbuild/include -DJXL_THREADS_STATIC_DEFINE -I/opt/ffbuild/include -DKVZ_STATIC_LIB -I/opt/ffbuild/include -I/opt/ffbuild/include/openjpeg-2.5 -DOPJ_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/opus -I/opt/ffbuild/include/opus -I/opt/ffbuild/include -DPL_HAVE_PTHREAD -DPTHREAD_HAS_SETCLOCK -pthread -DPL_STATIC -I/opt/ffbuild/include -D_REENTRANT -I/opt/ffbuild/include/rav1e -I/opt/ffbuild/include -pthread -DCJSON_HIDE_SYMBOLS -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -DLIBSSH_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/srt -I/opt/ffbuild/include/svt-av1 -UEB_DLL -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libvmaf -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/webp -I/opt/ffbuild/include -I/opt/ffbuild/include/webp -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include -I/opt/ffbuild/include/AL -DAL_LIBTYPE_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libdrm -I/opt/ffbuild/include -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -c -o /tmp/ffconf.d0xN6e2f/test.o /tmp/ffconf.d0xN6e2f/test.c check_cflags -fdiagnostics-color=auto test_cflags -fdiagnostics-color=auto test_cc -fdiagnostics-color=auto BEGIN /tmp/ffconf.d0xN6e2f/test.c 1 int x; END /tmp/ffconf.d0xN6e2f/test.c aarch64-ffbuild-linux-gnu-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -pthread -DLIBTWOLAME_STATIC -std=c11 -fomit-frame-pointer -fPIC -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include -DCHROMAPRINT_NODLL -I/opt/ffbuild/include -I/opt/ffbuild/include/libvmaf -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include/libpng16 -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/lilv-0 -DLILV_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/serd-0 -I/opt/ffbuild/include/sord-0 -I/opt/ffbuild/include/zix-0 -I/opt/ffbuild/include/sratom-0 -DSRATOM_STATIC -DSORD_STATIC -DSERD_STATIC -pthread -DZIX_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/harfbuzz -DFRIBIDI_LIB_STATIC -I/opt/ffbuild/include/fribidi -I/opt/ffbuild/include -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include/libdrm -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -DFRIBIDI_LIB_STATIC -I/opt/ffbuild/include/fribidi -I/opt/ffbuild/include/harfbuzz -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -DHWY_STATIC_DEFINE -pthread -DJXL_STATIC_DEFINE -DJXL_CMS_STATIC_DEFINE -I/opt/ffbuild/include -DJXL_THREADS_STATIC_DEFINE -I/opt/ffbuild/include -DKVZ_STATIC_LIB -I/opt/ffbuild/include -I/opt/ffbuild/include/openjpeg-2.5 -DOPJ_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/opus -I/opt/ffbuild/include/opus -I/opt/ffbuild/include -DPL_HAVE_PTHREAD -DPTHREAD_HAS_SETCLOCK -pthread -DPL_STATIC -I/opt/ffbuild/include -D_REENTRANT -I/opt/ffbuild/include/rav1e -I/opt/ffbuild/include -pthread -DCJSON_HIDE_SYMBOLS -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -DLIBSSH_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/srt -I/opt/ffbuild/include/svt-av1 -UEB_DLL -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libvmaf -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/webp -I/opt/ffbuild/include -I/opt/ffbuild/include/webp -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include -I/opt/ffbuild/include/AL -DAL_LIBTYPE_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libdrm -I/opt/ffbuild/include -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto -c -o /tmp/ffconf.d0xN6e2f/test.o /tmp/ffconf.d0xN6e2f/test.c test_cflags -Wmaybe-uninitialized test_cc -Wmaybe-uninitialized BEGIN /tmp/ffconf.d0xN6e2f/test.c 1 int x; END /tmp/ffconf.d0xN6e2f/test.c aarch64-ffbuild-linux-gnu-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -pthread -DLIBTWOLAME_STATIC -std=c11 -fomit-frame-pointer -fPIC -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include -DCHROMAPRINT_NODLL -I/opt/ffbuild/include -I/opt/ffbuild/include/libvmaf -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include/libpng16 -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/lilv-0 -DLILV_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/serd-0 -I/opt/ffbuild/include/sord-0 -I/opt/ffbuild/include/zix-0 -I/opt/ffbuild/include/sratom-0 -DSRATOM_STATIC -DSORD_STATIC -DSERD_STATIC -pthread -DZIX_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/harfbuzz -DFRIBIDI_LIB_STATIC -I/opt/ffbuild/include/fribidi -I/opt/ffbuild/include -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include/libdrm -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -DFRIBIDI_LIB_STATIC -I/opt/ffbuild/include/fribidi -I/opt/ffbuild/include/harfbuzz -I/opt/ffbuild/include/freetype2 -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -DHWY_STATIC_DEFINE -pthread -DJXL_STATIC_DEFINE -DJXL_CMS_STATIC_DEFINE -I/opt/ffbuild/include -DJXL_THREADS_STATIC_DEFINE -I/opt/ffbuild/include -DKVZ_STATIC_LIB -I/opt/ffbuild/include -I/opt/ffbuild/include/openjpeg-2.5 -DOPJ_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/opus -I/opt/ffbuild/include/opus -I/opt/ffbuild/include -DPL_HAVE_PTHREAD -DPTHREAD_HAS_SETCLOCK -pthread -DPL_STATIC -I/opt/ffbuild/include -D_REENTRANT -I/opt/ffbuild/include/rav1e -I/opt/ffbuild/include -pthread -DCJSON_HIDE_SYMBOLS -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -DLIBSSH_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include/srt -I/opt/ffbuild/include/svt-av1 -UEB_DLL -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libvmaf -pthread -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/webp -I/opt/ffbuild/include -I/opt/ffbuild/include/webp -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libxml2 -I/opt/ffbuild/include -I/opt/ffbuild/include/AL -DAL_LIBTYPE_STATIC -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include -I/opt/ffbuild/include/libdrm -I/opt/ffbuild/include -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto -Wmaybe-uninitialized -c -o /tmp/ffconf.d0xN6e2f/test.o /tmp/ffconf.d0xN6e2f/test.c ```
MarcA711 commented 2 months ago

I finally succeeded in building static ffmpeg. The problem was gone after removing the shared librockchip_mpp.so libs from the build directory.

nyanmisaka commented 2 months ago

I finally succeeded in building static ffmpeg. The problem was gone after removing the shared librockchip_mpp.so libs from the build directory.

I discovered this too. MPP cannot disable Shared libs via Cmake options, perhaps this is worth reporting upstream as well.

MarcA711 commented 2 months ago

Yes, it is.

I also experienced another issue. It seems that the current static build of mpp does not include all necessary symbols. As one example:

# nm librockchip_mpp.a | grep mpp_enc_control_v2
                 U mpp_enc_control_v2
nm: os_env.c.o: no symbols
nm: os_log.c.o: no symbols
nm: os_mem.c.o: no symbols
nyanmisaka commented 2 months ago

Is it harmful to ffmpeg? IIUC this is an internal function and is not exposed as part of the MPI interface.

MarcA711 commented 2 months ago

I had problems. This is the output of my ffbuild/config.log:

Output ``` /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp_mem.cpp.o): in function `MppMemService::MppMemService()': (.text+0x338): undefined reference to `os_malloc' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x37c): undefined reference to `os_malloc' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x3c4): undefined reference to `os_malloc' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp_mem.cpp.o): in function `MppMemService::~MppMemService()': (.text+0xcac): undefined reference to `os_free' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0xcb4): undefined reference to `os_free' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0xcbc): undefined reference to `os_free' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0xd18): undefined reference to `os_free' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp_mem.cpp.o): in function `mpp_osal_malloc': (.text+0x18e8): undefined reference to `os_malloc' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x19cc): undefined reference to `os_malloc' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp_mem.cpp.o): in function `mpp_osal_calloc': (.text+0x1abc): undefined reference to `os_malloc' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x1b58): undefined reference to `os_malloc' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp_mem.cpp.o): in function `mpp_osal_realloc': (.text+0x1c44): undefined reference to `os_realloc' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x1ca0): undefined reference to `os_realloc' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp_mem.cpp.o): in function `mpp_osal_free': (.text+0x1e18): undefined reference to `os_free' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x1eb8): undefined reference to `os_free' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x1f14): undefined reference to `os_free' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(os_log.cpp.o): in function `SyslogWrapper::SyslogWrapper()': (.text+0x38): undefined reference to `os_get_env_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp_env.cpp.o): in function `mpp_env_get_u32': (.text+0x0): undefined reference to `os_get_env_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp_env.cpp.o): in function `mpp_env_get_str': (.text+0x4): undefined reference to `os_get_env_str' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp_env.cpp.o): in function `mpp_env_set_u32': (.text+0x10): undefined reference to `os_set_env_u32' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp_env.cpp.o): in function `mpp_env_set_str': (.text+0x14): undefined reference to `os_set_env_str' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `mpp_notify_by_buffer_group(void*, void*)': (.text+0x5c): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::clear()': (.text+0x164): undefined reference to `mpp_dec_stop' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x16c): undefined reference to `mpp_dec_deinit' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x268): undefined reference to `mpp_enc_stop_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x270): undefined reference to `mpp_enc_deinit_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::init(MppCtxType, MppCodingType)': (.text+0x504): undefined reference to `mpp_enc_init_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x524): undefined reference to `mpp_enc_start_async' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x668): undefined reference to `mpp_dec_init' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x678): undefined reference to `mpp_dec_start' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x724): undefined reference to `mpp_enc_start_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::get_frame(void**)': (.text+0x9e8): undefined reference to `mpp_enc_notify_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0xa34): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0xa74): undefined reference to `mpp_enc_notify_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0xa84): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::decode(void*, void**)': (.text+0xbb0): undefined reference to `mpp_dec_decode' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0xc10): undefined reference to `mpp_dec_decode' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::put_frame_async(void*)': (.text+0xde0): undefined reference to `mpp_enc_notify_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0xe28): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::get_packet_async(void**)': (.text+0xfa0): undefined reference to `mpp_enc_notify_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x1038): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x10c0): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x10cc): undefined reference to `mpp_enc_notify_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::dequeue(MppPortType, void**)': (.text+0x1324): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x137c): undefined reference to `mpp_enc_notify_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::put_packet(void*)': (.text+0x1984): undefined reference to `mpp_enc_notify_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x1994): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::put_frame(void*)': (.text+0x1d34): undefined reference to `mpp_enc_notify_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x1e18): undefined reference to `mpp_enc_notify_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x1edc): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x1ff0): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::get_packet(void**)': (.text+0x24ec): undefined reference to `mpp_enc_notify_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x2500): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::enqueue(MppPortType, void*)': (.text+0x2654): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x26ac): undefined reference to `mpp_enc_notify_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::reset()': (.text+0x298c): undefined reference to `mpp_dec_reset' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x29f8): undefined reference to `mpp_enc_reset_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::control_dec(MpiCmd, void*)': (.text+0x2c40): undefined reference to `mpp_dec_control' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x2cb4): undefined reference to `mpp_dec_control' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x2cd8): undefined reference to `mpp_dec_control' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x2d2c): undefined reference to `mpp_dec_set_cfg' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x2e0c): undefined reference to `mpp_dec_control' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x2e24): undefined reference to `mpp_dec_set_cfg_by_cmd' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x2e98): undefined reference to `mpp_enc_notify_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x2ea8): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x2f14): undefined reference to `mpp_enc_notify_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x2f2c): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::control(MpiCmd, void*)': (.text+0x331c): undefined reference to `mpp_enc_control_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::control_enc(MpiCmd, void*)': (.text+0x35a8): undefined reference to `mpp_enc_control_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x3604): undefined reference to `mpp_enc_control_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::notify(unsigned int)': (.text+0x36d8): undefined reference to `mpp_enc_notify_v2' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: (.text+0x36e0): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(mpp.cpp.o): in function `Mpp::notify(void*)': (.text+0x3700): undefined reference to `mpp_dec_notify' /opt/ct-ng/lib/gcc/aarch64-ffbuild-linux-gnu/13.2.0/../../../../aarch64-ffbuild-linux-gnu/bin/ld: /opt/ffbuild/lib/librockchip_mpp.a(allocator_std.c.o): in function `allocator_std_free': (.text+0x1f0): undefined reference to `os_free' collect2: error: ld returned 1 exit status ERROR: rockchip_mpp not found using pkg-config ```
MarcA711 commented 2 months ago

The problem is that this function is just linked to the library (see https://github.com/rockchip-linux/mpp/blob/bebc9961103af2b53fb18175dd858b15a73c9ad8/mpp/CMakeLists.txt#L55). Static libraries can't be linked to other static libraries, see this answer: https://stackoverflow.com/a/52040523

Note, that the line target_link_libraries(foo_lib foo_subproject_1 foo_subproject_2) in the Foo project doesn't perform actual linking: in general, building a static library doesn't involve linking step.

MarcA711 commented 2 months ago

I replaced/altered https://github.com/rockchip-linux/mpp/blob/bebc9961103af2b53fb18175dd858b15a73c9ad8/mpp/CMakeLists.txt#L52-L66 to

add_library(${MPP_STATIC} STATIC ${MPP_SRC})
set_target_properties(${MPP_STATIC} PROPERTIES FOLDER "mpp" OUTPUT_NAME "${MPP_SHARED}")
set_target_properties(${MPP_STATIC} PROPERTIES CLEAN_DIRECT_OUTPUT 1)

add_custom_command(TARGET ${MPP_STATIC} POST_BUILD
    COMMAND ${CMAKE_AR} x $<TARGET_FILE:${MPP_STATIC}>
    COMMAND ${CMAKE_AR} x $<TARGET_FILE:osal>
    COMMAND ${CMAKE_AR} x $<TARGET_FILE:mpp_base>
    COMMAND ${CMAKE_AR} x $<TARGET_FILE:mpp_codec>
    COMMAND ${CMAKE_AR} x $<TARGET_FILE:mpp_hal>
    COMMAND ${CMAKE_AR} x $<TARGET_FILE:mpp_vproc>
    COMMAND ${CMAKE_AR} rcs lib${MPP_SHARED}.a *.o
    COMMAND ${CMAKE_STRIP} --strip-debug lib${MPP_SHARED}.a
    COMMAND pwd
    COMMAND rm *.o
    )

I will test, if this works now.

Edit: This fix doesn't work. There are even more symbols that are not correctly included in the resulting librockchip_mpp.a. To fix this, we need a script similar to this bash script I used earlier:

#!/bin/bash

cd $1
rm -rf combined
mkdir combined

SCRIPT=$'CREATE combined/lib'$2$'.a\n'
SCRIPT=$SCRIPT$(find . -name '*.a' -exec echo 'ADDLIB {}' \;)
SCRIPT=$SCRIPT$'\nSAVE\nEND\n'

ar -M <<< $SCRIPT
MarcA711 commented 2 months ago

@nyanmisaka I stumbled across this issue just now: https://github.com/blakeblackshear/frigate/issues/9814 @great9 describes that there is a 4GB memory limit when transcoding to yuv420p due to HW design of RGA2. If this limit is reached, this results in crashes and broken recordings. I also experienced these issues (crashes and broken recordings) and wonder if this is the cause of this issue. I had no time to dig deeper into this so far. Do you know something about this?

Can this issue be worked around by transcoding into another format and reformat to yuv420p using CPU? Maybe this could even be fixes somehow? For example by making sure that all frames are stored within the addressable 4GB memory and copy the frame if not?

nyanmisaka commented 2 months ago

Edit: This fix doesn't work. There are even more symbols that are not correctly included in the resulting librockchip_mpp.a. To fix this, we need a script similar to this bash script I used earlier:

Maybe reopen the issue and let them know.

that there is a 4GB memory limit when transcoding to yuv420p due to HW design of RGA2.

There are two limitations:

If this limit is reached, this results in crashes and broken recordings. I also experienced these issues (crashes and broken recordings) and wonder if this is the cause of this issue. I had no time to dig deeper into this so far. Do you know something about this?

Yes. And you will need to limit the number of concurrent ffmpeg processes.

Can this issue be worked around by transcoding into another format and reformat to yuv420p using CPU? Maybe this could even be fixes somehow? For example by making sure that all frames are stored within the addressable 4GB memory and copy the frame if not?

Blocked by the 2nd limitation mentioned above.

edit: Can subsequent image detection functions only accept YUV420P? Can't it be in BGRA or other formats? edit2: Disabling async mode for RGA filters may also help: scale_rkrga=async_depth=0, this only slightly reduces memory usage, the 4GB limit remains.

MarcA711 commented 2 months ago

Maybe reopen the issue and let them know.

I will, but I might be able to solve this issue and provide a fix as PR Edit: I did some research and I think the bash script that I posted above is already the "cleanest" way of merging all libs. I will try to provide a PR in a few hours. I will also include a way to build only shared or static libs.

Thank you really much for explaining!

Can subsequent image detection functions only accept YUV420P? Can't it be in BGRA or other formats?

AFAIK frigate supports only yuv420p at the moment.

MarcA711 commented 2 months ago

Done in https://github.com/rockchip-linux/mpp/pull/579

MarcA711 commented 2 months ago

@nyanmisaka Can I do this as a workaround, until the 4GB limitation got fixed?:

Can this issue be worked around by transcoding into another format and reformat to yuv420p using CPU?

nyanmisaka commented 2 months ago

@nyanmisaka Can I do this as a workaround, until the 4GB limitation got fixed?:

Can this issue be worked around by transcoding into another format and reformat to yuv420p using CPU?

There's also an 32bit IOVA space limit that can be fixed in their kernel driver https://github.com/rockchip-linux/mpp/issues/560#issuecomment-2042075673

The DRM memory allocator in rockchip kernel is also affected by this issue. So whether it's a MPP decoder or RGA, you'll be affected by the 4GB limit. Unless you disable hardware acceleration entirely.