64位centos上rsync源码编译时报错未知类型int32

liuxiao 2022-01-22 12:27:31

在64位centos7上编译rsync源码时,报错未知类型int32,请问如何解决?

In file included from ./rounding.c:20:0:
./rsync.h:576:3: 错误:#error Could not find a 32-bit integer variable
 # error Could not find a 32-bit integer variable
   ^
./rsync.h:645:2: 错误:未知的类型名‘int32’
  int32 size, entries;
  ^
./rsync.h:646:9: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘node_size’
  uint32 node_size;
         ^
./rsync.h:652:2: 错误:未知的类型名‘int32’
  int32 key;
  ^
./rsync.h:732:3: 错误:#error Character pointers are not 4 or 8 bytes.
 # error Character pointers are not 4 or 8 bytes.
   ^
./rsync.h:736:2: 错误:未知的类型名‘int32’
  int32 num;
  ^
./rsync.h:737:9: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘unum’
  uint32 unum;
         ^
./rsync.h:753:9: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘len32’
  uint32 len32;  /* Lowest 32 bits of the file's length */
         ^
./rsync.h:895:2: 错误:未知的类型名‘int32’
  int32 len;  /**< length of chunk of file */
  ^
./rsync.h:896:9: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘sum1’
  uint32 sum1;         /**< simple checksum */
         ^
./rsync.h:905:2: 错误:未知的类型名‘int32’
  int32 count;  /**< how many chunks */
  ^
./rsync.h:906:2: 错误:未知的类型名‘int32’
  int32 blength;  /**< block_length */
  ^
./rsync.h:907:2: 错误:未知的类型名‘int32’
  int32 remainder; /**< flength % block_length */
  ^
./rsync.h:916:2: 错误:未知的类型名‘int32’
  int32 p_size;  /* Largest window size we allocated */
  ^
./rsync.h:917:2: 错误:未知的类型名‘int32’
  int32 p_len;  /* Latest (rounded) window size  */
  ^
./rsync.h:918:2: 错误:未知的类型名‘int32’
  int32 def_window_size; /* Default window size   */
  ^
./rsync.h:954:9: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘rflags’
  uint32 rflags;
         ^
In file included from ./rsync.h:1041:0,
                 from ./rounding.c:20:
./byteorder.h:76:1: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘IVALu’
 IVALu(const uchar *buf, int pos)
 ^
./byteorder.h:87:36: 错误:expected ‘;’, ‘,’ or ‘)’ before ‘val’
 SIVALu(uchar *buf, int pos, uint32 val)
                                    ^
./byteorder.h:122:1: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘IVAL’
 IVAL(const char *buf, int pos)
 ^
./byteorder.h:128:34: 错误:expected ‘;’, ‘,’ or ‘)’ before ‘val’
 SIVAL(char *buf, int pos, uint32 val)
                                  ^
In file included from ./rsync.h:1042:0,
                 from ./rounding.c:20:
./lib/mdigest.h:10:9: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘A’
  uint32 A, B, C, D;
         ^
./lib/mdigest.h:17:60: 错误:expected ‘;’, ‘,’ or ‘)’ before ‘length’
 void mdfour_update(md_context *md, const uchar *in, uint32 length);
                                                            ^
In file included from ./rsync.h:1101:0,
                 from ./rounding.c:20:
./proto.h:28:8: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘get_checksum1’
 uint32 get_checksum1(char *buf1, int32 len);
        ^
./proto.h:29:31: 错误:未知的类型名‘int32’
 void get_checksum2(char *buf, int32 len, char *sum);
                               ^
./proto.h:32:32: 错误:未知的类型名‘int32’
 void sum_update(const char *p, int32 len);
                                ^
./proto.h:70:41: 错误:expected ‘;’, ‘,’ or ‘)’ before ‘rflags’
 const filter_rule *rule_template(uint32 rflags);
                                         ^
./proto.h:82:48: 错误:未知的类型名‘int32’
 struct map_struct *map_file(int fd, OFF_T len, int32 read_size, int32 blk_size);
                                                ^
./proto.h:82:65: 错误:未知的类型名‘int32’
 struct map_struct *map_file(int fd, OFF_T len, int32 read_size, int32 blk_size);
                                                                 ^
./proto.h:83:53: 错误:未知的类型名‘int32’
 char *map_ptr(struct map_struct *map, OFF_T offset, int32 len);
                                                     ^
./proto.h:110:20: 错误:未知的类型名‘int32’
       stat_x *sxp, int32 iflags, uchar fnamecmp_type,
                    ^
./proto.h:158:1: 错误:未知的类型名‘int32’
 int32 read_int(int f);
 ^
./proto.h:159:1: 错误:未知的类型名‘int32’
 int32 read_varint(int f);
 ^
./proto.h:170:23: 错误:未知的类型名‘int32’
 void write_int(int f, int32 x);
                       ^
./proto.h:171:26: 错误:未知的类型名‘int32’
 void write_varint(int f, int32 x);
                          ^
./proto.h:179:23: 错误:未知的类型名‘int32’
 void write_ndx(int f, int32 ndx);
                       ^
./proto.h:180:1: 错误:未知的类型名‘int32’
 int32 read_ndx(int f);
 ^
./proto.h:295:24: 错误:未知的类型名‘int32’
 void send_token(int f, int32 token, struct map_struct *buf, OFF_T offset,
                        ^
./proto.h:296:3: 错误:未知的类型名‘int32’
   int32 n, int32 toklen);
   ^
./proto.h:296:12: 错误:未知的类型名‘int32’
   int32 n, int32 toklen);
            ^
./proto.h:297:1: 错误:未知的类型名‘int32’
 int32 recv_token(int f, char **data);
 ^
./proto.h:298:28: 错误:未知的类型名‘int32’
 void see_token(char *data, int32 toklen);
                            ^
./proto.h:352:8: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fuzzy_distance’
 uint32 fuzzy_distance(const char *s1, unsigned len1, const char *s2, unsigned len2);
        ^
./rounding.c: 在函数‘main’中:
./rounding.c:35:13: 警告:变量‘test_array’被设定但未被使用 [-Wunused-but-set-variable]
  static int test_array[1 - 2 * (ACTUAL_SIZE != EXPECTED_SIZE)];
 

...全文
337 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
无聊人士张 2022-03-04
  • 打赏
  • 举报
回复

大佬解决了吗?

内容概要:本文围绕“滞系统的协方差交叉融合估计”展开研究,系统探讨了在存在间延迟的动态环境中,如何实现多源传感器信息的有效融合与状态估计。针对传统卡尔曼滤波在处理滞系统因噪声统计未知或传感器间相关性不确定而导致的估计发散问题,提出采用协方差交叉(Covariance Intersection, CI)融合算法。该方法无需先验相关性信息,通过构造保守的融合权重,确保估计结果的一致性与鲁棒性。研究建立了完整的滞系统建模框架,详细推导了CI融合准则下的状态融合机制,并借助Matlab平台进行了仿真验证,结果表明该方法在复杂滞环境下相较于传统融合策略具有更高的估计精度和更强的稳定性。; 适合人群:具备控制理论、信号处理、状态估计等相关基础知识,从事自动化、电子信息、航空航天、机器人导航、智能电网等领域的硕士、博士研究生及科研技术人员。; 使用场景及目标:①应用于多传感器系统中存在通信延迟、测量异步等滞现象的实际工程场景,如无人系统自主导航、工业过程监控、分布式传感网络、电力系统状态监测等;②目标是提升系统在模型不确定性及滞干扰下的状态估计可靠性,避免滤波发散,增强系统的鲁棒性与容错能力; 阅读建议:建议读者结合提供的Matlab代码深入理解CI融合算法的具体实现流程,重点关注滞建模方法、融合权重的优化计算逻辑以及与标准卡尔曼融合方法的性能对比分析,同可进一步探索其在非线性系统、分布式架构及抗干扰融合中的扩展应用。

23,223

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧