Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm设备的shadowsocksr-libev出错 #1678

Open
liwenjie119 opened this issue Jan 26, 2025 · 8 comments
Open

arm设备的shadowsocksr-libev出错 #1678

liwenjie119 opened this issue Jan 26, 2025 · 8 comments

Comments

@liwenjie119
Copy link

make[6]: Leaving directory '/home/runner/work/openwrt_packit/openwrt_packit/lede/build_dir/target-aarch64_generic_musl/shadowsocksr-libev-2.5.6/src'
Making all in server
make[6]: Entering directory '/home/runner/work/openwrt_packit/openwrt_packit/lede/build_dir/target-aarch64_generic_musl/shadowsocksr-libev-2.5.6/server'
ccache aarch64-openwrt-linux-musl-gcc -DHAVE_CONFIG_H -I. -I..   -I/home/runner/work/openwrt_packit/openwrt_packit/lede/staging_dir/toolchain-aarch64_generic_gcc-13.3.0_musl/usr/include -I/home/runner/work/openwrt_packit/openwrt_packit/lede/staging_dir/toolchain-aarch64_generic_gcc-13.3.0_musl/include -I/home/runner/work/openwrt_packit/openwrt_packit/lede/staging_dir/toolchain-aarch64_generic_gcc-13.3.0_musl/include/fortify  -g -O2 -Wall -Werror -Wno-deprecated-declarations -fno-strict-aliasing -std=gnu99 -D_GNU_SOURCE   -I../libipset/include -I../libcork/include  -DMODULE_REMOTE -Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/runner/work/openwrt_packit/openwrt_packit/lede/build_dir/target-aarch64_generic_musl/shadowsocksr-libev-2.5.6=shadowsocksr-libev-2.5.6 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -flto  -I/home/runner/work/openwrt_packit/openwrt_packit/lede/staging_dir/target-aarch64_generic_musl/usr/include -DPCRE_STATIC  -MT ss_server-server.o -MD -MP -MF .deps/ss_server-server.Tpo -c -o ss_server-server.o `test -f 'server.c' || echo './'`server.c
In file included from server.c:62:
server.c: In function 'main':
utils.h:160:13: error: pointer 'protocol_347' may be used after 'free' [-Werror=use-after-free]
  160 |             syslog(LOG_INFO, format, ## __VA_ARGS__);                            \
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
server.c:1945:13: note: call to 'free' here
 1945 |             free(protocol);
      |             ^~~~~~~~~~~~~~
utils.h:166:17: error: pointer 'protocol_347' may be used after 'free' [-Werror=use-after-free]
  166 |                 fprintf(stderr, "\e[01;32m %s INFO: \e[0m" format "\n", timestr, \
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  167 |                         ## __VA_ARGS__);                                         \
      |                         ~~~~~~~~~~~~~~~
server.c:1945:13: note: call to 'free' here
 1945 |             free(protocol);
      |             ^~~~~~~~~~~~~~
utils.h:169:17: error: pointer 'protocol_347' may be used after 'free' [-Werror=use-after-free]
  169 |                 fprintf(stderr, " %s INFO: " format "\n", timestr,               \
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  170 |                         ## __VA_ARGS__);                                         \
      |                         ~~~~~~~~~~~~~~~
server.c:1945:13: note: call to 'free' here
 1945 |             free(protocol);
      |             ^~~~~~~~~~~~~~
server.c:1948:13: error: pointer 'protocol_347' used after 'free' [-Werror=use-after-free]
 1948 |             memcpy(protocol, text, length);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
server.c:1945:13: note: call to 'free' here
 1945 |             free(protocol);
      |             ^~~~~~~~~~~~~~
server.c:1947:13: error: pointer 'protocol_347' used after 'free' [-Werror=use-after-free]
 1947 |             memset(protocol, 0x00, length);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
server.c:1945:13: note: call to 'free' here
 1945 |             free(protocol);
      |             ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [Makefile:666: ss_server-server.o] Error 1
make[6]: Leaving directory '/home/runner/work/openwrt_packit/openwrt_packit/lede/build_dir/target-aarch64_generic_musl/shadowsocksr-libev-2.5.6/server'
make[5]: *** [Makefile:483: all-recursive] Error 1
make[5]: Leaving directory '/home/runner/work/openwrt_packit/openwrt_packit/lede/build_dir/target-aarch64_generic_musl/shadowsocksr-libev-2.5.6'
make[4]: *** [Makefile:392: all] Error 2
make[4]: Leaving directory '/home/runner/work/openwrt_packit/openwrt_packit/lede/build_dir/target-aarch64_generic_musl/shadowsocksr-libev-2.5.6'
make[3]: *** [Makefile:66: /home/runner/work/openwrt_packit/openwrt_packit/lede/build_dir/target-aarch64_generic_musl/shadowsocksr-libev-2.5.6/.built] Error 2
make[3]: Leaving directory '/home/runner/work/openwrt_packit/openwrt_packit/lede/feeds/helloworld/shadowsocksr-libev'
time: package/feeds/helloworld/shadowsocksr-libev/compile#0.54#0.19#0.73
    ERROR: package/feeds/helloworld/shadowsocksr-libev failed to build.
make[2]: *** [package/Makefile:116: package/feeds/helloworld/shadowsocksr-libev/compile] Error 1
make[2]: Leaving directory '/home/runner/work/openwrt_packit/openwrt_packit/lede'
make[1]: *** [package/Makefile:110: /home/runner/work/openwrt_packit/openwrt_packit/lede/staging_dir/target-aarch64_generic_musl/stamp/.package_compile] Error 2
make[1]
@liwenjie119
Copy link
Author

liwenjie119 commented Jan 26, 2025

用lede的库编译5.15内核 armvirt,一直这个报错。但是很奇怪,刚才搜了一下有已经解决的历史issue:#1434
不知道为啥又出现报错

@suizhenmin
Copy link

6.6内核 X86编译同样报错,23号晚上同步编译的过一次还是可以通过了

@liwenjie119
Copy link
Author

用lede的库编译5.15内核 armvirt,一直这个报错。但是很奇怪,刚才搜了一下有已经解决的历史issue:#1434 不知道为啥又出现报错

仔细看了看这个是替换了shadowsocksr-libev解决的,不知道helloworld库里的那个地方不对导致的问题

@zxlhhyccc
Copy link
Collaborator

zxlhhyccc commented Jan 30, 2025

@liwenjie119 @suizhenmin 请排查你的编译环境。比如:gn就需要clang为14版本及以上。

@liwenjie119
Copy link
Author

@liwenjie119 @suizhenmin 请排查你的编译环境。比如:gn就需要clang为14版本及以上。

github action 24.04在线编译,看了眼安装的clang版本
Preparing to unpack .../133-clang_1%3a18.0-59exp2_amd64.deb ...
Unpacking clang (1:18.0-59
exp2) ...
看版本应该是满足要求的吧?另外查日志还没有编译到gn,卡在shadowsocksr-libev,难到arm gcc13不太行缺东西?不太清楚

@suizhenmin
Copy link

删除全部文件,重新拉取编译通过。

@liwenjie119
Copy link
Author

源码应该没问题。。。本地编译过了,但是不知道为啥在线编译一直不过,不知道哪里出了问题

@zxlhhyccc
Copy link
Collaborator

zxlhhyccc commented Feb 5, 2025

@liwenjie119 @suizhenmin 请使用新的PR,原Makefile有点问题每次编译都会重新下载旧源码并且可能会导致编译报错,见PR: #1681

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants