Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

ubuntu-22.04 编译失败

未关闭
#4 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
c, cpp
领域
networking

调研方向

Start with the failing RingBuffer declarations in system/system.h and compare their calls with the APIs declared in system/imemdata.h and system/inetcode.h. Check the affected calls in source/AsyncExport.cpp, then rebuild on Ubuntu 22.04; done means compilation completes without these signature and missing-symbol errors.

由索引模型根据 Issue 内容生成。

描述

/root/source-code/AsyncNet/tools/emake.py:2063: DeprecationWarning: 'U' mode is deprecated
for text in open(self.makefile, 'U'):
___ _ __ __
/ | _______ ______ _____ / | / /__ / /_
/ /| | / / / / / __ / / / |/ / _ / /
/ ___ |(
) /
/ / / / / /
/ /| / _/ /
/
/ |
/
/_, // //_/ // |/_/_/
/
___/
/root/source-code/AsyncNet/tools/emake.py:2472: DeprecationWarning: 'U' mode is deprecated
for line in open(self._depname, 'U'):
compiling ...
source/AsyncExport.cpp
In file included from source/TraceLog.h:4,
from source/AsyncExport.cpp:20:
source/../system/system.h: In member function ‘ilong System::RingBuffer::size()’:
source/../system/system.h:868:31: error: ‘iring_dsize’ was not declared in this scope; did you mean ‘iring_write’?
868 | ilong size() { return iring_dsize(&_ring); }
| ^~~~~~~~~~~
| iring_write
source/../system/system.h: In member function ‘ilong System::RingBuffer::space()’:
source/../system/system.h:871:32: error: ‘iring_fsize’ was not declared in this scope; did you mean ‘iring_write’?
871 | ilong space() { return iring_fsize(&_ring); }
| ^~~~~~~~~~~
| iring_write
source/../system/system.h: In member function ‘ilong System::RingBuffer::write(const void*, ilong)’:
source/../system/system.h:874:79: error: invalid conversion from ‘const void*’ to ‘ilong’ {aka ‘long int’} [-fpermissive]
874 | ilong write(const void ptr, ilong size) { return iring_write(&_ring, ptr, size); }
| ^~~
| |
| const void

source/../system/system.h:874:84: error: invalid conversion from ‘ilong’ {aka ‘long int’} to ‘const void*’ [-fpermissive]
874 | ilong write(const void ptr, ilong size) { return iring_write(&_ring, ptr, size); }
| ^~~~
| |
| ilong {aka long int}
source/../system/system.h:874:70: error: too few arguments to function ‘ilong iring_write(IRING
, ilong, const void*, ilong)’
874 | ilong write(const void ptr, ilong size) { return iring_write(&_ring, ptr, size); }
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from source/../system/system.h:50,
from source/TraceLog.h:4,
from source/AsyncExport.cpp:20:
source/../system/imemdata.h:1307:7: note: declared here
1307 | ilong iring_write(struct IRING ring, ilong pos, const void ptr, ilong len);
| ^~~~~~~~~~~
In file included from source/TraceLog.h:4,
from source/AsyncExport.cpp:20:
source/../system/system.h: In member function ‘ilong System::RingBuffer::read(void
, ilong)’:
source/../system/system.h:877:71: error: invalid conversion from ‘void
’ to ‘ilong’ {aka ‘long int’} [-fpermissive]
877 | ilong read(void ptr, ilong size) { return iring_read(&_ring, ptr, size); }
| ^~~
| |
| void

source/../system/system.h:877:76: error: invalid conversion from ‘ilong’ {aka ‘long int’} to ‘void
’ [-fpermissive]
877 | ilong read(void ptr, ilong size) { return iring_read(&_ring, ptr, size); }
| ^~~~
| |
| ilong {aka long int}
source/../system/system.h:877:62: error: too few arguments to function ‘ilong iring_read(const IRING
, ilong, void*, ilong)’
877 | ilong read(void ptr, ilong size) { return iring_read(&_ring, ptr, size); }
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from source/../system/system.h:50,
from source/TraceLog.h:4,
from source/AsyncExport.cpp:20:
source/../system/imemdata.h:1304:7: note: declared here
1304 | ilong iring_read(const struct IRING ring, ilong pos, void ptr, ilong len);
| ^~~~~~~~~~
In file included from source/TraceLog.h:4,
from source/AsyncExport.cpp:20:
source/../system/system.h: In member function ‘ilong System::RingBuffer::peek(void
, ilong)’:
source/../system/system.h:880:52: error: ‘iring_peek’ was not declared in this scope; did you mean ‘iring_read’?
880 | ilong peek(void ptr, ilong size) { return iring_peek(&_ring, ptr, size); }
| ^~~~~~~~~~
| iring_read
source/../system/system.h: In member function ‘ilong System::RingBuffer::drop(ilong)’:
source/../system/system.h:883:41: error: ‘iring_drop’ was not declared in this scope; did you mean ‘iring_swap’?
883 | ilong drop(ilong size) { return iring_drop(&_ring, size); }
| ^~~~~~~~~~
| iring_swap
source/../system/system.h: In member function ‘void System::RingBuffer::clear()’:
source/../system/system.h:886:24: error: ‘iring_clear’ was not declared in this scope; did you mean ‘iring_read’?
886 | void clear() { iring_clear(&_ring); }
| ^~~~~~~~~~~
| iring_read
source/../system/system.h: In member function ‘ilong System::RingBuffer::put(ilong, const void
, ilong)’:
source/../system/system.h:892:69: error: ‘iring_put’ was not declared in this scope; did you mean ‘iring_t’?
892 | ilong put(ilong pos, const void data, ilong size) { return iring_put(&_ring, pos, data, size); }
| ^~~~~~~~~
| iring_t
source/../system/system.h: In member function ‘ilong System::RingBuffer::get(ilong, void
, ilong)’:
source/../system/system.h:895:63: error: ‘iring_get’ was not declared in this scope; did you mean ‘iring_t’?
895 | ilong get(ilong pos, void data, ilong size) { return iring_get(&_ring, pos, data, size); }
| ^~~~~~~~~
| iring_t
source/../system/system.h: In member function ‘bool System::RingBuffer::swap(void
, ilong)’:
source/../system/system.h:898:61: error: could not convert ‘iring_swap((&((System::RingBuffer
)this)->System::RingBuffer::_ring), ptr, size)’ from ‘void’ to ‘bool’
898 | bool swap(void ptr, ilong size) { return iring_swap(&_ring, ptr, size)? false : true; }
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
| |
| void
source/../system/system.h: In member function ‘ilong System::RingBuffer::ring_ptr(char
, ilong*, char**, ilong*)’:
source/../system/system.h:901:77: error: ‘iring_ptr’ was not declared in this scope; did you mean ‘ring_ptr’?
901 | ilong ring_ptr(char **p1, ilong *s1, char p2, ilong s2) { return iring_ptr(&_ring, p1, s1, p2, s2); }
| ^~~~~~~~~
| ring_ptr
source/../system/system.h: In member function ‘int System::AsyncSock::assign(int, int)’:
source/../system/system.h:979:41: error: too few arguments to function ‘int async_sock_assign(CAsyncSock
, int, int, int)’
979 | return async_sock_assign(_sock, fd, header);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from source/../system/system.h:52,
from source/TraceLog.h:4,
from source/AsyncExport.cpp:20:
source/../system/inetcode.h:135:5: note: declared here
135 | int async_sock_assign(CAsyncSock asyncsock, int sock, int header, int estab);
| ^~~~~~~~~~~~~~~~~
source/AsyncExport.cpp: In function ‘int asn_sock_assign(AsyncSock
, int, int)’:
source/AsyncExport.cpp:394:33: error: too few arguments to function ‘int async_sock_assign(CAsyncSock
, int, int, int)’
394 | return async_sock_assign((CAsyncSock
)sock, fd, head);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from source/../system/system.h:52,
from source/TraceLog.h:4,
from source/AsyncExport.cpp:20:
source/../system/inetcode.h:135:5: note: declared here
135 | int async_sock_assign(CAsyncSock *asyncsock, int sock, int header, int estab);

主要语言
C
星标
126
派生
48
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

skywind3000/AsyncNet 的其他 Issue

查看 skywind3000/AsyncNet 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。