RK3308B SDK 编译(firefly 20221212) --- ubuntu 22.04
./build.sh buildroot 编译问题
controller-enumtypes.c:6:1: error: stray '\' in program \#include "gstinterpolationcontrolsource.h" ^ controller-enumtypes.c:6:2: error: stray '#' in program \#include "gstinterpolationcontrolsource.h" ^ controller-enumtypes.c:6:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before string constant \#include "gstinterpolationcontrolsource.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make 4.3 的 bug 造成的,生成代码的文件有 \#include 字段,导致生成的代码包含头文件的语句是 \#include <xxx>。#不是转义字符,不需要加反斜杠
如果生成的代码 .c 文件已经包含 \#include <xxx>,删除 .c 文件。同时修改生成代码的文件(Makefile, Makefile.in)
https://bugs.gentoo.org/attachment.cgi?id=615942&action=edit
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/515
cgpt_wrapper.c:(.text.startup+0x194): undefined reference to `major'
在 cgpt_wrapper.c 添加头文件 #include <sys/sysmacros.h>
libfakeroot.c: In function ‘chown’: libfakeroot.c:99:40: error: ‘_STAT_VER’ undeclared (first use in this function) 99 | #define INT_NEXT_STAT(a,b) NEXT_STAT64(_STAT_VER,a,b)
https://blog.csdn.net/weixin_41489977/article/details/119962326
read_fs.o:(.bss+0x0): multiple definition of `fwriter_buffer’; mksquashfs.o:(.bss+0x400be8):
find -name "mksquashfs*"
vim mksquashfs.h
将:struct cache *bwriter_buffer, *fwriter_buffer;
改为: extern struct cache *bwriter_buffer, *fwriter_buffer;
vim mksquashfs.c
将: struct cache *bwriter_buffer, *fwriter_buffer;
改为: //struct cache *bwriter_buffer, *fwriter_buffer;
#error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
在对应路径下执行以下两个命令,比如路径 buildroot/output/firefly_rk3308_recovery/build/host-m4-1.4.18
sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h
./build.sh 编译问题
====Start build firefly_rk3308_recovery==== 2024-05-22T17:42:22 >>> host-m4 1.4.18 Building Done in 4s (error code: 2) Command exited with non-zero status 2 you take 0:04.87 to build recovery ERROR: Running build_recovery failed! ERROR: exit code 2 from line 1080: /usr/bin/time -f "you take %E to build recovery" $COMMON_DIR/mk-ramdisk.sh recovery.img $RK_CFG_RECOVERY
没有打印具体编译失败原因,可看 br.log 获得详细 log
参考链接:
https://blog.csdn.net/BigGhostCell/article/details/129187449
https://blog.csdn.net/jiuaiwo1314/article/details/137396312