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)];
 

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

大佬解决了吗?

在 AI 编码工具日新月异的今天,我们正在见证一个关键的转变:从“与单个聊天机器人对话”转向“指挥一支自动化的 AI 专家团队”。Oh My Codex,正是这一趋势的集大成者。它不是 Codex 的替代品,而是它的“类固醇”增强层。以下是对 OMX 核心价值与技术范式的深度拆解: 1. 智能体的“指挥部”:从对话到协作 OMX 的核心逻辑在于“编排”。它预设了 30 多个专业角色(如架构师、执行者、安全审计员)和 40 多项工作流技能。 这意味着你不再是面对一个通用的模型,而是在调度一个拥有明确分工的工程团队。这种角色专精化(Specialization)是解决复杂工程问题的必经之路。 2. 标准化工作流:让偶然的成功变为必然的产出 OMX 提炼了一套极具启发性的“三部曲”工作流,将模糊的意图转化为确定的代码: - $deep-interview:意图优先的深度访谈,在动手前彻底澄清边界与非目标。 - $ralplan:将澄清后的需求转化为可执行的架构计划,并进行权衡审查。 - $team 或 $ralph:根据任务规模,选择多智能体并行执行($team)或由单一负责人持续推动至完成($ralph)。 这种流程化的思维,将 AI 编码从“撞大运”变成了可预测的工程实践。 3. 团队工作树:解决并行开发的“熵增” 在多智能体协作中,最头疼的是代码冲突。OMX 引入了“团队工作树(Team Worktrees)”机制: 每个 AI 协作成员都会获得一个隔离的 Git 工作树,在独立的脱离分支上运行。OMX 会自动进行增量合并跟踪和冲突检测。 这种设计让 AI 能够像真正的开发团队一样并行工作,而不会把主分支搞得一团糟。 4. 持久化状态:赋予 AI “长期记忆” OMX 在项目根目录下维护一个 .omx/ 文件夹,用于存储所有的计划、日志、内存和运行状态。

23,223

社区成员

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

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