Ubuntu22.04编译报错

编译错误

以下错误都是我自己遇到的,参考网上的解决办法,有一些没有遇到,如果出现请自行搜索解决

libfakeroot.c:99:40: error: ‘_STAT_VER’ undeclared (first use in this function)
在libfakeroot.c 增加

#ifndef _STAT_VER
 #if defined (__aarch64__)
  #define _STAT_VER 0
 #elif defined (__x86_64__)
  #define _STAT_VER 1
 #else
  #define _STAT_VER 3
 #endif
#endif

c-stack.c:55:26: error: missing binary operator before token "(" 55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
进入c-stack.c的文件夹下

wget https://raw.githubusercontent.com/keyfour/openwrt/2722d51c5cf6a296b8ecf7ae09e46690403a6c3d/tools/m4/patches/011-fix-sigstksz.patch
patch c-stack.c < 011-fix-sigstksz.patch

gdbusauth.c:1302:11: error: ‘%s’ directive argument is null

if(line != NULL)
    debug_print ("SERVER: WaitingForBegin, read '%s'", line);

gdbusmessage.c:2702:30: error: ‘%s’ directive argument is null

if(signature_str!= NULL)
    tupled_signature_str = g_strdup_printf ("(%s)", signature_str);

(.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin)😦.text+0x0): first defined here
多个 dtc-lexer.l 文件中的

YYLTYPE yylloc;

改为

extern YYLTYPE yylloc;

gstlib下的文件引用错误,错误很多,使用了最笨的办法将\去掉就行了,以下只是一个文件的错误
video-enumtypes.c error: stray '' in program

\#include "video.h" 
\#include "video-format.h" 
\#include "video-color.h" 
\#include "video-info.h" 
\#include "video-dither.h" 
\#include "colorbalance.h" 
\#include "navigation.h" 
\#include "video-chroma.h" 
\#include "video-tile.h" 
\#include "video-converter.h" 
\#include "video-resampler.h" 
\#include "video-frame.h" 
\#include "video-scaler.h"

改为

#include "video.h" 
#include "video-format.h" 
#include "video-color.h" 
#include "video-info.h" 
#include "video-dither.h" 
#include "colorbalance.h" 
#include "navigation.h" 
#include "video-chroma.h" 
#include "video-tile.h" 
#include "video-converter.h" 
#include "video-resampler.h" 
#include "video-frame.h" 
#include "video-scaler.h"

Ubuntu22.04报错:

报错1:
c-stack.c:55:26: error: missing binary operator before token "(" 55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384

解决办法:
进入c-stack.c的文件夹下

wget https://raw.githubusercontent.com/keyfour/openwrt/2722d51c5cf6a296b8ecf7ae09e46690403a6c3d/tools/m4/patches/011-fix-sigstksz.patch

patch c-stack.c < 011-fix-sigstksz.patch

报错2:
failure_signal_handler.cc:138:32: error: no matching function for call to ‘max(long int, int)’
  138 |   size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
      |                        ~~~~~~~~^~~~~~~~~~~~~~~~~

解决办法:
在failure_signal_handler.cc:138:修改为
size_t stack_size = (std::max((long int)SIGSTKSZ, (long int)65536) + page_mask) & ~page_mask;

报错3:
DTB报错

解决办法:
https://blog.csdn.net/wanpengpenga/article/details/122313358 

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值