Firefly开源社区

标题: rk3308 buildroot 编译出错 [打印本页]

作者: wx_修行_EDK7J    时间: 2021-8-12 17:03
标题: rk3308 buildroot 编译出错
执行 ./build.sh roc-rk3308b-cc-plus_rgb-4.0inch_qt_release_BoardConfig.mk
./build.sh
后 出现如下错误

/usr/bin/make  all-recursive
Making all in ext
Making all in libav
  CC       libgstlibav_la-gstav.lo
  CC       libgstlibav_la-gstavcodecmap.lo
  CC       libgstlibav_la-gstavaudenc.lo
  CC       libgstlibav_la-gstavauddec.lo
  CC       libgstlibav_la-gstavvidenc.lo
  CC       libgstlibav_la-gstavviddec.lo
  CC       libgstlibav_la-gstavcfg.lo
gstavviddec.c: 在函数‘gst_ffmpegviddec_class_init’中:
gstavviddec.c:242:15: 错误:‘CODEC_CAP_FRAME_THREADS’未声明(在此函数内第一次使用)
   if (caps & (CODEC_CAP_FRAME_THREADS | CODEC_CAP_SLICE_THREADS)) {
               ^~~~~~~~~~~~~~~~~~~~~~~
gstavviddec.c:242:15: 附注:每个未声明的标识符在其出现的函数内只报告一次
gstavviddec.c:242:41: 错误:‘CODEC_CAP_SLICE_THREADS’未声明(在此函数内第一次使用)
   if (caps & (CODEC_CAP_FRAME_THREADS | CODEC_CAP_SLICE_THREADS)) {
                                         ^~~~~~~~~~~~~~~~~~~~~~~
gstavauddec.c: 在函数‘gst_ffmpegauddec_propose_allocation’中:
gstavviddec.c: 在函数‘gst_ffmpegviddec_open’中:
gstavviddec.c:372:7: 错误:‘CODEC_FLAG_OUTPUT_CORRUPT’未声明(在此函数内第一次使用)
       CODEC_FLAG_OUTPUT_CORRUPT, ffmpegdec->output_corrupt);
       ^~~~~~~~~~~~~~~~~~~~~~~~~
gstavauddec.c:290:20: 错误:‘FF_INPUT_BUFFER_PADDING_SIZE’未声明(在此函数内第一次使用)
   params.padding = FF_INPUT_BUFFER_PADDING_SIZE;

作者: wx_修行_EDK7J    时间: 2021-8-12 17:46
cheney@LinuxPC:~/work/source$ uname -a
Linux LinuxPC 4.15.0-142-generic #146~16.04.1-Ubuntu SMP Tue Apr 13 09:27:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

作者: zyk    时间: 2021-8-12 23:48
可以检查一下是否有安装包安装漏掉了,然后可以尝试一下source buildroot/build/envsetup.sh后再执行
作者: wx_修行_EDK7J    时间: 2021-8-13 11:00
我把 安装的命令 重新检查一下
cheney@LinuxPC:~/work/source$ sudo apt-get install libfile-which-perl sed make binutils gcc g++ bash \
> patch gzip bzip2 perl tar cpio python unzip rsync file bc libmpc3 \
> git repo texinfo pkg-config cmake tree
[sudo] cheney 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
bc 已经是最新版 (1.06.95-9build1)。
g++ 已经是最新版 (4:5.3.1-1ubuntu1)。
gcc 已经是最新版 (4:5.3.1-1ubuntu1)。
gzip 已经是最新版 (1.6-4ubuntu1)。
libfile-which-perl 已经是最新版 (1.19-1)。
libmpc3 已经是最新版 (1.0.3-1)。
make 已经是最新版 (4.1-6)。
pkg-config 已经是最新版 (0.29.1-0ubuntu1)。
sed 已经是最新版 (4.2.2-7)。
repo 已经是最新版 (1.12.32-2)。
texinfo 已经是最新版 (6.1.0.dfsg.1-5)。
tree 已经是最新版 (1.7.0-3)。
bash 已经是最新版 (4.3-14ubuntu1.4)。
binutils 已经是最新版 (2.26.1-1ubuntu1~16.04.8)。
bzip2 已经是最新版 (1.0.6-8ubuntu0.2)。
cmake 已经是最新版 (3.5.1-1ubuntu3)。
cpio 已经是最新版 (2.11+dfsg-5ubuntu1.1)。
file 已经是最新版 (1:5.25-2ubuntu1.4)。
git 已经是最新版 (1:2.7.4-0ubuntu1.10)。
patch 已经是最新版 (2.7.5-1ubuntu0.16.04.2)。
perl 已经是最新版 (5.22.1-9ubuntu0.9)。
python 已经是最新版 (2.7.12-1~16.04)。
rsync 已经是最新版 (3.1.1-3ubuntu1.3)。
tar 已经是最新版 (1.28-2.1ubuntu0.2)。
unzip 已经是最新版 (6.0-20ubuntu1.1)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
cheney@LinuxPC:~/work/source$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl \
> zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev \
> x11proto-core-dev libx11-dev lib32z1-dev ccache libgl1-mesa-dev \
> libxml2-utils xsltproc unzip device-tree-compiler
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
bison 已经是最新版 (2:3.0.4.dfsg-1)。
build-essential 已经是最新版 (12.1ubuntu2)。
ccache 已经是最新版 (3.2.4-1)。
device-tree-compiler 已经是最新版 (1.4.0+dfsg-2)。
flex 已经是最新版 (2.6.0-11)。
g++-multilib 已经是最新版 (4:5.3.1-1ubuntu1)。
gcc-multilib 已经是最新版 (4:5.3.1-1ubuntu1)。
lib32ncurses5-dev 已经是最新版 (6.0+20160213-1ubuntu1)。
zip 已经是最新版 (3.0-11)。
gperf 已经是最新版 (3.0.4-2)。
curl 已经是最新版 (7.47.0-1ubuntu2.19)。
git-core 已经是最新版 (1:2.7.4-0ubuntu1.10)。
gnupg 已经是最新版 (1.4.20-1ubuntu3.3)。
lib32z1-dev 已经是最新版 (1:1.2.8.dfsg-2ubuntu4.3)。
libc6-dev-i386 已经是最新版 (2.23-0ubuntu11.3)。
libgl1-mesa-dev 已经是最新版 (18.0.5-0ubuntu0~16.04.1)。
libx11-dev 已经是最新版 (2:1.6.3-1ubuntu2.2)。
libxml2-utils 已经是最新版 (2.9.3+dfsg1-1ubuntu0.7)。
unzip 已经是最新版 (6.0-20ubuntu1.1)。
x11proto-core-dev 已经是最新版 (7.0.31-1~ubuntu16.04.2)。
xsltproc 已经是最新版 (1.1.28-2.1ubuntu0.3)。
zlib1g-dev 已经是最新版 (1:1.2.8.dfsg-2ubuntu4.3)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
cheney@LinuxPC:~/work/source$ sudo apt-get install genext2fs gawk libncurses5-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
gawk 已经是最新版 (1:4.1.3+dfsg-0.1)。
libncurses5-dev 已经是最新版 (6.0+20160213-1ubuntu1)。
genext2fs 已经是最新版 (1.4.1-4build1)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
cheney@LinuxPC:~/work/source$


作者: wx_修行_EDK7J    时间: 2021-8-13 11:02
md5sum Firefly-RK3308_Linux_SDK_git_20190924.7z
97837ef273541b45ab12260db6c01fdd  Firefly-RK3308_Linux_SDK_git_20190924.7z

mkdir -p ~/prj/Firefly-RK3308
cd ~/prj/Firefly-RK3308
7zr x Firefly-RK3308_Linux_SDK_git_20190924.7z
git reset --hard HEAD

git remote -v
gitlab git@gitlab.com/TeeFirefly/rk3308-linux.git (fetch)
gitlab git@gitlab.com/TeeFirefly/rk3308-linux.git (push)

git remote set-url gitlab https://gitlab.com/TeeFirefly/rk3308-linux.git

git pull gitlab firefly:firefly

rm buildroot/output -rf

source buildroot/build/envsetup.sh 选4

make


错误 依旧存在


作者: wx_修行_EDK7J    时间: 2021-8-13 11:06
cheney@LinuxPC:~/work/source$ make
umask 0022 && make -C /home/cheney/work/source/buildroot O=/home/cheney/work/source/buildroot/output/firefly_rk3308_qt_release
>>> gst1-libav 1.14.4 Building
PATH="/home/cheney/work/source/buildroot/output/firefly_rk3308_qt_release/host/bin:/home/cheney/work/source/buildroot/output/firefly_rk3308_qt_release/host/sbin:/home/cheney/bin:/home/cheney/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" RecoveryNoUi=true  /usr/bin/make -j24  -C /home/cheney/work/source/buildroot/output/firefly_rk3308_qt_release/build/gst1-libav-1.14.4/
/usr/bin/make  all-recursive
Making all in ext
Making all in libav
  CC       libgstlibav_la-gstav.lo
  CC       libgstlibav_la-gstavcodecmap.lo
  CC       libgstlibav_la-gstavauddec.lo
  CC       libgstlibav_la-gstavvidenc.lo
  CC       libgstlibav_la-gstavcfg.lo
  CC       libgstlibav_la-gstavviddec.lo
  CC       libgstlibav_la-gstavaudenc.lo
gstav.c:33:39: 致命错误:libavfilter/avfiltergraph.h:没有那个文件或目录
#include <libavfilter/avfiltergraph.h>
                                       ^
编译中断。
gstavaudenc.c: 在函数‘gst_ffmpegaudenc_set_format’中:
gstavaudenc.c:282:5: 警告:‘rtp_payload_size’ is deprecated [-Wdeprecated-declarations]
     ffmpegaudenc->context->rtp_payload_size = ffmpegaudenc->rtp_payload_size;
     ^~~~~~~~~~~~
In file included from gstavaudenc.c:33:0:
/home/cheney/work/source/buildroot/output/firefly_rk3308_qt_release/host/aarch64-rockchip-linux-gnu/sysroot/usr/include/libavcodec/avcodec.h:2520:9: 附注:在此声明
     int rtp_payload_size;   /* The size of the RTP payload: the coder will  */
         ^~~~~~~~~~~~~~~~
gstavaudenc.c:286:24: 错误:‘AVCodecContext {或称 struct AVCodecContext}’ has no member named ‘rc_strategy’; did you mean ‘b_frame_strategy’?
   ffmpegaudenc->context->rc_strategy = 2;
                        ^~
gstavaudenc.c:287:3: 警告:‘b_frame_strategy’ is deprecated [-Wdeprecated-declarations]
   ffmpegaudenc->context->b_frame_strategy = 0;
   ^~~~~~~~~~~~
In file included from gstavaudenc.c:33:0:
/home/cheney/work/source/buildroot/output/firefly_rk3308_qt_release/host/aarch64-rockchip-linux-gnu/sysroot/usr/include/libavcodec/avcodec.h:1816:9: 附注:在此声明
     int b_frame_strategy;
         ^~~~~~~~~~~~~~~~
gstavaudenc.c:288:3: 警告:‘coder_type’ is deprecated [-Wdeprecated-declarations]
   ffmpegaudenc->context->coder_type = 0;
   ^~~~~~~~~~~~
In file included from gstavaudenc.c:33:0:
/home/cheney/work/source/buildroot/output/firefly_rk3308_qt_release/host/aarch64-rockchip-linux-gnu/sysroot/usr/include/libavcodec/avcodec.h:2455:9: 附注:在此声明
     int coder_type;
         ^~~~~~~~~~
gstavaudenc.c:289:3: 警告:‘context_model’ is deprecated [-Wdeprecated-declarations]
   ffmpegaudenc->context->context_model = 0;
   ^~~~~~~~~~~~
In file included from gstavaudenc.c:33:0:
/home/cheney/work/source/buildroot/output/firefly_rk3308_qt_release/host/aarch64-rockchip-linux-gnu/sysroot/usr/include/libavcodec/avcodec.h:2461:9: 附注:在此声明
     int context_model;
         ^~~~~~~~~~~~~
gstavaudenc.c:290:3: 警告:‘scenechange_threshold’ is deprecated [-Wdeprecated-declarations]
   ffmpegaudenc->context->scenechange_threshold = 0;
   ^~~~~~~~~~~~
In file included from gstavaudenc.c:33:0:
/home/cheney/work/source/buildroot/output/firefly_rk3308_qt_release/host/aarch64-rockchip-linux-gnu/sysroot/usr/include/libavcodec/avcodec.h:2052:9: 附注:在此声明
     int scenechange_threshold;
         ^~~~~~~~~~~~~~~~~~~~~
gstavaudenc.c:333:44: 错误:‘CODEC_CAP_EXPERIMENTAL’未声明(在此函数内第一次使用)
     if ((oclass->in_plugin->capabilities & CODEC_CAP_EXPERIMENTAL) &&

作者: zyk    时间: 2021-8-13 15:16
本帖最后由 zyk 于 2021-8-13 15:23 编辑

有试过单独编译吗,之前是否有成功编译过buildroot
作者: wx_修行_EDK7J    时间: 2021-8-13 15:38
buildroot 没有成功过,uboot 和kernel成功了,后面那一次,就是单独编译的,也是一样的错误
作者: Javier    时间: 2021-8-13 15:45
删除 buildroot/output/firefly_rk3308_qt_release/build/ffmpeg-3.4.2,重新试下

作者: zyk    时间: 2021-8-13 15:46
有试过执行sudo apt-get update && sudo apt-get upgrade再安装软件包吗

作者: wx_修行_EDK7J    时间: 2021-8-13 15:47
cheney@LinuxPC:~/work/source$ rm -rf buildroot/output/firefly_rk3308_qt_release/build/f
faad2-2.8.8/    ffmpeg-4.1.3/   freetype-2.8.1/
cheney@LinuxPC:~/work/source$ rm -rf buildroot/output/firefly_rk3308_qt_release/build/ffmpeg-4.1.3/

版本 是 4.1.3的
作者: wx_修行_EDK7J    时间: 2021-8-13 15:50
有的
作者: wx_修行_EDK7J    时间: 2021-8-13 15:53
删了 ffmpeg-4.1.3 错误依旧
作者: wx_修行_EDK7J    时间: 2021-8-13 15:57
zyk 发表于 2021-8-13 15:46
有试过执行sudo apt-get update && sudo apt-get upgrade再安装软件包吗

有的
作者: zyk    时间: 2021-8-13 15:58
用的是哪一个源,清华?
作者: wx_修行_EDK7J    时间: 2021-8-13 16:00
zyk 发表于 2021-8-13 15:58
用的是哪一个源,清华?

我没有改 源 ,系统自带的源
作者: wx_修行_EDK7J    时间: 2021-8-13 16:02
wx_修行_EDK7J 发表于 2021-8-13 16:00
我没有改 源 ,系统自带的源

cheney@LinuxPC:~/work/source$ cat /etc/apt/sources.list
#deb cdrom:[Ubuntu 16.04.7 LTS _Xenial Xerus_ - Release amd64 (20200806)]/ xenial main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial universe
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
cheney@LinuxPC:~/work/source$

作者: zyk    时间: 2021-8-13 16:09
试一试更换清华源,然后再更新安装一下。我这里用的是清华源
作者: wx_修行_EDK7J    时间: 2021-8-13 16:12
zyk 发表于 2021-8-13 16:09
试一试更换清华源,然后再更新安装一下。我这里用的是清华源

是更换清华源后,重装工具吗,要重装系统吗
作者: zyk    时间: 2021-8-13 16:25
重装工具
作者: wx_修行_EDK7J    时间: 2021-8-13 16:38
zyk 发表于 2021-8-13 16:25
重装工具

还是那个错误
作者: zyk    时间: 2021-8-13 16:45
1. firefly_rk3308_release
2. firefly_rk3308_recovery
3. firefly_rk3308_pcba
4. firefly_rk3308_qt_release
选择1能否编译过
作者: wx_修行_EDK7J    时间: 2021-8-13 16:50
zyk 发表于 2021-8-13 16:45
1. firefly_rk3308_release
2. firefly_rk3308_recovery
3. firefly_rk3308_pcba

我试一下,要稍等
作者: wx_修行_EDK7J    时间: 2021-8-13 17:43
wx_修行_EDK7J 发表于 2021-8-13 16:50
我试一下,要稍等

1 可以编译成功
作者: zyk    时间: 2021-8-16 10:42
git log -n 5 看一下
作者: Javier    时间: 2021-8-16 14:12
# 回退到这个提交873ac89e
git reset 873ac89e --hard
# 删除buildroot/output
rm buildroot/output/firefly_rk3308_qt_release -rf
# 重新编译
./build.sh
作者: wx_修行_EDK7J    时间: 2021-8-17 10:16
zyk 发表于 2021-8-16 10:42
git log -n 5 看一下

发不出来,说含有不良信息
作者: zyk    时间: 2021-8-17 10:48
wx_修行_EDK7J 发表于 2021-8-17 10:16
发不出来,说含有不良信息
# 回退到这个提交873ac89e
git reset 873ac89e --hard
# 删除buildroot/output
rm buildroot/output/firefly_rk3308_qt_release -rf
# 重新编译
./build.sh
根据26楼回退进行操作
作者: wx_修行_EDK7J    时间: 2021-8-17 12:20
Javier 发表于 2021-8-16 14:12
# 回退到这个提交873ac89e
git reset 873ac89e --hard
# 删除buildroot/output

回退,可以编译成功




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1