Errors occured when I build OpenCV 4.6.0

Arch Linux 64bit.
Something went wrong when I build OpenCV 4.6.0.
It seemed that the module videoio wasn’t built successfully.
I have no idea with the problem above.
The output of console is here:
Building(Stderr first, and stdout followed)
The command I used to build is
env LC_ALL=C cmake --build . -j10 > ../cmakelog_build.txt 2> ../cmakelog_build_error.txt

I noticed that I can normally build the code of the repository I pulled from the GitHub directly, but the code I download from the release page still cannot be built. That doubts me a lot.
So I use diff to compare the file ffmpeg_codecs.hpp in modules/videoio/src, and find that the problem above is fixed in PR#22357.

My friends. If you face the same problem (compile errors come from ffmpeg_codecs.hpp) as mine, I think you can add #include <libavcodec/version.h> after the line 62 of ffmpeg_codecs.hpp. That works in my computer.

Sorry for my poor English.