Can't compile on Rock5c(RK3588S2) #178

Closed
opened 2025-12-23 10:35:14 +01:00 by backuprepo · 4 comments
Owner

Originally created by @ByeBug on GitHub (Jun 3, 2025).

My configure:

./configure --prefix=./install --enable-gpl --enable-version3 --disable-ffplay --enable-shared \
    --enable-libdrm --enable-rkmpp --enable-rkrga --enable-libx264 --enable-libx265

When I run make -j7, I get:

/usr/bin/ld: libavcodec/libavcodec.so: undefined reference to `ff_mpv_common_init_neon'
collect2: error: ld returned 1 exit status
make: *** [Makefile:133:ffprobe_g] 错误 1
make: *** 正在等待未完成的任务....
/usr/bin/ld: libavcodec/libavcodec.so: undefined reference to `ff_mpv_common_init_neon'
collect2: error: ld returned 1 exit status
make: *** [Makefile:133:ffmpeg_g] 错误 1

So I have to modify this:

$ git diff
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 81796e42bb..0d512295ad 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -300,7 +300,7 @@ static av_cold int dct_init(MpegEncContext *s)
     s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c;
 
 #if HAVE_INTRINSICS_NEON
-    ff_mpv_common_init_neon(s);
+    // ff_mpv_common_init_neon(s);
 #endif

I found NEON-OBJS-$(CONFIG_MPEGVIDEO) += arm/mpegvideo_neon.o in libavcodec/arm/Makefile at line 119.

But not found in libavcodec/aarch64/Makefile.

Originally created by @ByeBug on GitHub (Jun 3, 2025). My configure: ```bash ./configure --prefix=./install --enable-gpl --enable-version3 --disable-ffplay --enable-shared \ --enable-libdrm --enable-rkmpp --enable-rkrga --enable-libx264 --enable-libx265 ``` When I run `make -j7`, I get: ``` /usr/bin/ld: libavcodec/libavcodec.so: undefined reference to `ff_mpv_common_init_neon' collect2: error: ld returned 1 exit status make: *** [Makefile:133:ffprobe_g] 错误 1 make: *** 正在等待未完成的任务.... /usr/bin/ld: libavcodec/libavcodec.so: undefined reference to `ff_mpv_common_init_neon' collect2: error: ld returned 1 exit status make: *** [Makefile:133:ffmpeg_g] 错误 1 ``` So I have to modify this: ```diff $ git diff diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 81796e42bb..0d512295ad 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -300,7 +300,7 @@ static av_cold int dct_init(MpegEncContext *s) s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c; #if HAVE_INTRINSICS_NEON - ff_mpv_common_init_neon(s); + // ff_mpv_common_init_neon(s); #endif ``` I found `NEON-OBJS-$(CONFIG_MPEGVIDEO) += arm/mpegvideo_neon.o` in `libavcodec/arm/Makefile` at line 119. But not found in `libavcodec/aarch64/Makefile`.
backuprepo 2025-12-23 10:35:14 +01:00
  • closed this issue
  • added the
    invalid
    label
Author
Owner

@nyanmisaka commented on GitHub (Jun 3, 2025):

Not an issue. The error is because FFmpeg is trying to link to the system-provided FFmpeg library.

Compile in a clean environment. Otherwise turn off --enable-shared.

@nyanmisaka commented on GitHub (Jun 3, 2025): Not an issue. The error is because FFmpeg is trying to link to the system-provided FFmpeg library. Compile in a clean environment. Otherwise turn off `--enable-shared`.
Author
Owner

@ByeBug commented on GitHub (Jun 3, 2025):

I compile in a ubuntu:22.04 docker container.

I only installed this before compiling:

apt-get install build-essential cmake git libdrm-dev librga-dev librga2 \
    librockchip-mpp-dev libsdl2*-dev libx264-dev libx265-dev pkg-config

Is that a "clean environment"?
What went wrong?

@ByeBug commented on GitHub (Jun 3, 2025): I compile in a `ubuntu:22.04` docker container. I only installed this before compiling: ```bash apt-get install build-essential cmake git libdrm-dev librga-dev librga2 \ librockchip-mpp-dev libsdl2*-dev libx264-dev libx265-dev pkg-config ``` Is that a "clean environment"? What went wrong?
Author
Owner

@nyanmisaka commented on GitHub (Jun 3, 2025):

I'm out of ideas then. ffmpeg-rockchip hasn't touched that file. I suggest switching to the 7.1 branch instead.

@nyanmisaka commented on GitHub (Jun 3, 2025): I'm out of ideas then. ffmpeg-rockchip hasn't touched that file. I suggest switching to the 7.1 branch instead.
Author
Owner

@ByeBug commented on GitHub (Jun 3, 2025):

OK, I will try it. Thanks for your reply!

@ByeBug commented on GitHub (Jun 3, 2025): OK, I will try it. Thanks for your reply!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/ffmpeg-rockchip#178
No description provided.