Firefly开源社区

打印 上一主题 下一主题

[技术讨论] rk3588 sdk升级至最新版本后 buildroot编译报错

25

积分

0

威望

0

贡献

技术小白

积分
25

rk3588 sdk升级至最新版本后 buildroot编译报错

发表于 2023-9-19 15:12:51      浏览:2986 | 回复:1        打印      只看该作者   [复制链接] 楼主
  • 固件类型: 自行编译的固件
  • SDK包名称: rk3588_linux_release_20230915_v1.1.1c
  • SDK更新到哪个COMMIT: 0000-00-00 00:00:00
  • SDK修改内容: rk3588_linux_release_20230114_v1.0.6c的基础上更新至1.1.1c
  • Log日志: error info.zip
问题描述及复现步骤:

ubuntu20.04环境下
配置板卡:./build.sh itx-3588j-BE45-A1-buildroot.mk
执行编译:./build.sh
编译buildroot时报下面错误,请问是什么原因呢
2023-09-19T14:43:05 >>> host-gawk 5.1.0 Downloading
2023-09-19T14:43:08 >>> host-gawk 5.1.0 Extracting
2023-09-19T14:43:08 >>> host-gawk 5.1.0 Patching
2023-09-19T14:43:08 >>> host-gawk 5.1.0 Updating config.sub and config.guess
2023-09-19T14:43:08 >>> host-gawk 5.1.0 Patching libtool
2023-09-19T14:43:08 >>> host-gawk 5.1.0 Configuring
2023-09-19T14:43:19 >>> host-gawk 5.1.0 Building
Done in 3min 44s  (error code: 2)
Failed to build /home/dyk/rk3588/buildroot/output/firefly_rk3588/.config:
2023-09-19T14:43:21 readdir_test.c: In function 'ftype':
2023-09-19T14:43:21 readdir_test.c:120:21: error: dereferencing pointer to incomplete type 'struct dirent'
2023-09-19T14:43:21 120 |  strcat(fname, entry->d_name);
2023-09-19T14:43:21 |                     ^~
2023-09-19T14:43:21 readdir_test.c: At top level:
2023-09-19T14:43:21 readdir_test.c:147:18: warning: 'struct dirent' declared inside parameter list will not be visible outside of this definition or declaration
2023-09-19T14:43:21 147 | get_inode(struct dirent *entry, const char *dirname)
2023-09-19T14:43:21 |                  ^~~~~~
2023-09-19T14:43:21 readdir_test.c: In function 'get_inode':
2023-09-19T14:43:21 readdir_test.c:169:14: error: dereferencing pointer to incomplete type 'struct dirent'
2023-09-19T14:43:21 169 |  return entry->d_ino;
2023-09-19T14:43:21 |              ^~
2023-09-19T14:43:21 readdir_test.c: In function 'dir_get_record':
2023-09-19T14:43:21 readdir_test.c:180:2: error: unknown type name 'DIR'
2023-09-19T14:43:21 180 |  DIR *dp;
2023-09-19T14:43:21 |  ^~~
2023-09-19T14:43:21 readdir_test.c:202:11: warning: implicit declaration of function 'readdir'; did you mean 'rmdir'? [-Wimplicit-function-declaration]
2023-09-19T14:43:21 202 |  dirent = readdir(dp);
2023-09-19T14:43:21 |           ^~~~~~~
2023-09-19T14:43:21 |           rmdir
2023-09-19T14:43:21 readdir_test.c:202:9: warning: assignment to 'struct dirent *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2023-09-19T14:43:21 202 |  dirent = readdir(dp);
2023-09-19T14:43:21 |         ^
2023-09-19T14:43:21 readdir_test.c:208:18: warning: passing argument 1 of 'get_inode' from incompatible pointer type [-Wincompatible-pointer-types]
2023-09-19T14:43:21 208 |  ino = get_inode(dirent, iobuf->name);
2023-09-19T14:43:21 |                  ^~~~~~
2023-09-19T14:43:21 |                  |
2023-09-19T14:43:21 |                  struct dirent *
2023-09-19T14:43:21 readdir_test.c:147:26: note: expected 'struct dirent *' but argument is of type 'struct dirent *'
2023-09-19T14:43:21 147 | get_inode(struct dirent *entry, const char *dirname)
2023-09-19T14:43:21 |           ~~~~~~~~~~~~~~~^~~~~
2023-09-19T14:43:21 readdir_test.c:216:58: error: dereferencing pointer to incomplete type 'struct dirent'
2023-09-19T14:43:21 216 |  len += (flen = sprintf(the_dir->buf + len, "/%s", dirent->d_name));
2023-09-19T14:43:21 |                                                          ^~
2023-09-19T14:43:21 readdir_test.c:219:16: warning: passing argument 1 of 'ftype' from incompatible pointer type [-Wincompatible-pointer-types]
2023-09-19T14:43:21 219 |  ftstr = ftype(dirent, iobuf->name);
2023-09-19T14:43:21 |                ^~~~~~
2023-09-19T14:43:21 |                |
2023-09-19T14:43:21 |                struct dirent *
2023-09-19T14:43:21 readdir_test.c:99:22: note: expected 'struct dirent *' but argument is of type 'struct dirent *'
2023-09-19T14:43:21 99 | ftype(struct dirent *entry, const char *dirname)
2023-09-19T14:43:21 |       ~~~~~~~~~~~~~~~^~~~~
2023-09-19T14:43:21 readdir_test.c: In function 'dir_close':
2023-09-19T14:43:21 readdir_test.c:244:2: warning: implicit declaration of function 'closedir'; did you mean 'close'? [-Wimplicit-function-declaration]
2023-09-19T14:43:21 244 |  closedir(the_dir->dp);
2023-09-19T14:43:21 |  ^~~~~~~~
2023-09-19T14:43:21 |  close
2023-09-19T14:43:21 readdir_test.c: In function 'dir_take_control_of':
2023-09-19T14:43:21 readdir_test.c:271:2: error: unknown type name 'DIR'
2023-09-19T14:43:21 271 |  DIR *dp;
2023-09-19T14:43:21 |  ^~~
2023-09-19T14:43:21 readdir_test.c:279:7: warning: implicit declaration of function 'opendir' [-Wimplicit-function-declaration]
2023-09-19T14:43:21 279 |  dp = opendir(iobuf->name);
2023-09-19T14:43:21 |       ^~~~~~~
2023-09-19T14:43:21 readdir_test.c:279:5: warning: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2023-09-19T14:43:21 279 |  dp = opendir(iobuf->name);
2023-09-19T14:43:21 |     ^
2023-09-19T14:43:21 readdir_test.c:281:15: warning: implicit declaration of function 'dirfd' [-Wimplicit-function-declaration]
2023-09-19T14:43:21 281 |   iobuf->fd = dirfd(dp);
2023-09-19T14:43:21 |               ^~~~~
2023-09-19T14:43:21 readdir_test.c:298:16: error: invalid application of 'sizeof' to incomplete type 'struct dirent'
2023-09-19T14:43:21 298 |  size = sizeof(struct dirent) + 21 /* max digits in inode */ + 2 /* slashes */;
2023-09-19T14:43:21 |                ^~~~~~
2023-09-19T14:43:21 readdir_test.c: In function 'get_inode':
2023-09-19T14:43:21 readdir_test.c:171:1: warning: control reaches end of non-void function [-Wreturn-type]
2023-09-19T14:43:21 171 | }
2023-09-19T14:43:21 | ^
2023-09-19T14:43:21 /bin/bash ./libtool  --tag=CC   --mode=compile /home/dyk/rk3588/buildroot/output/firefly_rk3588/host/bin/ccache /usr/bin/gcc -DHAVE_CONFIG_H -I.  -I./.. -I/home/dyk/rk3588/buildroot/output/firefly_rk3588/host/include  -O2 -I/home/dyk/rk3588/buildroot/output/firefly_rk3588/host/include -Wall -c -o gawkfts.lo gawkfts.c
2023-09-19T14:43:21 make[6]: *** [Makefile:847: readdir_test.lo] Error 1
2023-09-19T14:43:21 make[6]: *** Waiting for unfinished jobs....
2023-09-19T14:43:21 In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
2023-09-19T14:43:21 from /usr/include/stdio.h:27,
2023-09-19T14:43:21 from filefuncs.c:68:
2023-09-19T14:43:21 /usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
2023-09-19T14:43:21 187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
2023-09-19T14:43:21 |   ^~~~~~~
2023-09-19T14:43:21 filefuncs.c: In function 'fill_stat_array':
2023-09-19T14:43:21 filefuncs.c:417:37: warning: implicit declaration of function 'major' [-Wimplicit-function-declaration]
2023-09-19T14:43:21 417 |   array_set_numeric(array, "major", major(sbuf->st_rdev));
2023-09-19T14:43:21 |                                     ^~~~~
2023-09-19T14:43:21 filefuncs.c:418:37: warning: implicit declaration of function 'minor' [-Wimplicit-function-declaration]
2023-09-19T14:43:21 418 |   array_set_numeric(array, "minor", minor(sbuf->st_rdev));
2023-09-19T14:43:21 |                                     ^~~~~
2023-09-19T14:43:21 libtool: compile:  /home/dyk/rk3588/buildroot/output/firefly_rk3588/host/bin/ccache /usr/bin/gcc -DHAVE_CONFIG_H -I. -I./.. -I/home/dyk/rk3588/buildroot/output/firefly_rk3588/host/include -O2 -I/home/dyk/rk3588/buildroot/output/firefly_rk3588/host/include -Wall -c gawkfts.c  -fPIC -DPIC -o .libs/gawkfts.o
2023-09-19T14:43:21 In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
2023-09-19T14:43:21 from /usr/include/limits.h:26,
2023-09-19T14:43:21 from /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h:194,
2023-09-19T14:43:21 from /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h:7,
2023-09-19T14:43:21 from /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h:34,
2023-09-19T14:43:21 from gawkfts.c:44:
2023-09-19T14:43:21 /usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
2023-09-19T14:43:21 187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
2023-09-19T14:43:21 |   ^~~~~~~
2023-09-19T14:43:21 make[5]: *** [Makefile:908: all-recursive] Error 1
2023-09-19T14:43:21 make[4]: *** [Makefile:658: all] Error 2
2023-09-19T14:43:21 make[3]: *** [Makefile:747: all-recursive] Error 1
2023-09-19T14:43:21 make[2]: *** [Makefile:566: all] Error 2
2023-09-19T14:43:21 make[1]: *** [package/pkg-generic.mk:313: /home/dyk/rk3588/buildroot/output/firefly_rk3588/build/host-gawk-5.1.0/.stamp_built] Error 2
2023-09-19T14:43:21 make: *** [Makefile:110: _all] Error 2
2023-09-19T14:43:21 make: Leaving directory '/home/dyk/rk3588/buildroot'
Please check details in /home/dyk/rk3588/.buildroot/br.log
Command exited with non-zero status 1
you take 3:46.33 to build builroot
ERROR: Running build_buildroot failed!
ERROR: exit code 1 from line 1320:
    /usr/bin/time -f "you take %E to build builroot" $COMMON_DIR/mk-buildroot.sh $RK_CFG_BUILDROOT $DST_DIR

error info.zip

2.08 KB, 下载次数: 0, 下载积分: 灯泡 -1 , 经验 -1

回复

使用道具 举报

25

积分

0

威望

0

贡献

技术小白

积分
25
发表于 2023-9-19 19:48:15        只看该作者  沙发
原因找到了,配置的qt环境影响了buildroot,把/etc/profile.d/host_qtEnv.sh 删掉就行了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表