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

Arch Linux AUR shadowsocksrr-libev-git install fail #40

Open
whitecodes opened this issue Jul 1, 2018 · 15 comments
Open

Arch Linux AUR shadowsocksrr-libev-git install fail #40

whitecodes opened this issue Jul 1, 2018 · 15 comments
Labels

Comments

@whitecodes
Copy link

whitecodes commented Jul 1, 2018

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

try to install shadowsocksrr-libev-git 2.5.3.r0.gd63ff86-3

What operating system are you using?

Arch Linux on XPS 9560

What did you do?

yay -S shadowsocksrr-libev-git

What did you expect to see?

install with no error

What did you see instead?

Error making: shadowsocksrr-libev-git

log :

make[2]: 进入目录“/home/white/.cache/yay/shadowsocksrr-libev-git/src/shadowsocksrr-libev-git/src”
  CC       libshadowsocks_libev_la-utils.lo
  CC       libshadowsocks_libev_la-jconf.lo
  CC       libshadowsocks_libev_la-json.lo
  CC       libshadowsocks_libev_la-encrypt.lo
  CC       libshadowsocks_libev_la-udprelay.lo
  CC       libshadowsocks_libev_la-cache.lo
  CC       libshadowsocks_libev_la-acl.lo
acl.c: In function 'init_block_list':
acl.c:74:90: error: '%s' directive writing up to 63 bytes into a region of size between 50 and 176 [-Werror=format-overflow=]
     "ip6tables -N %s; ip6tables -F %s; ip6tables -A OUTPUT -p tcp --tcp-flags RST RST -j %s";
                                                                                          ^~
acl.c:158:68:
         sprintf(cli, ip6tables_init_chain, chain_name, chain_name, chain_name);
                                                                    ~~~~~~~~~~             
In file included from /usr/include/stdio.h:862,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:33:10: note: '__builtin___sprintf_chk' output between 81 and 270 bytes into a destination of size 256
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c:67:87: error: '%s' directive writing up to 63 bytes into a region of size between 53 and 179 [-Werror=format-overflow=]
     "iptables -N %s; iptables -F %s; iptables -A OUTPUT -p tcp --tcp-flags RST RST -j %s";
                                                                                       ^~
acl.c:160:67:
         sprintf(cli, iptables_init_chain, chain_name, chain_name, chain_name);
                                                                   ~~~~~~~~~~           
In file included from /usr/include/stdio.h:862,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:33:10: note: '__builtin___sprintf_chk' output between 78 and 267 bytes into a destination of size 256
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c:92:5: error: ';      firewall-cmd --direct...' directive writing 88 bytes into a region of size between 33 and 159 [-Werror=format-overflow=]
     "firewall-cmd --direct --add-chain ipv6 filter %s; \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      firewall-cmd --direct --passthrough ipv6 -F %s; \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      firewall-cmd --direct --passthrough ipv6 -A OUTPUT -p tcp --tcp-flags RST RST -j %s";
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:862,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:33:10: note: '__builtin___sprintf_chk' output between 186 and 375 bytes into a destination of size 256
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c:81:5: error: ';      firewall-cmd --direct...' directive writing 88 bytes into a region of size between 33 and 159 [-Werror=format-overflow=]
     "firewall-cmd --direct --add-chain ipv4 filter %s; \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      firewall-cmd --direct --passthrough ipv4 -F %s; \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      firewall-cmd --direct --passthrough ipv4 -A OUTPUT -p tcp --tcp-flags RST RST -j %s";
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:862,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:33:10: note: '__builtin___sprintf_chk' output between 186 and 375 bytes into a destination of size 256
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c: In function 'free_block_list':
acl.c:96:5: error: '%s' directive writing up to 63 bytes into a region of size between 61 and 124 [-Werror=format-overflow=]
     "firewall-cmd --direct --passthrough ipv6 -D OUTPUT -p tcp --tcp-flags RST RST -j %s; \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      firewall-cmd --direct --passthrough ipv6 -F %s; \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      firewall-cmd --direct --remove-chain ipv6 filter %s";
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c:184:59:
         sprintf(cli, firewalld6_remove_chain, chain_name, chain_name, chain_name);
                                                           ~~~~~~~~~~
In file included from /usr/include/stdio.h:862,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:33:10: note: '__builtin___sprintf_chk' output between 189 and 378 bytes into a destination of size 256
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c:85:5: error: '%s' directive writing up to 63 bytes into a region of size between 61 and 124 [-Werror=format-overflow=]
     "firewall-cmd --direct --passthrough ipv4 -D OUTPUT -p tcp --tcp-flags RST RST -j %s; \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      firewall-cmd --direct --passthrough ipv4 -F %s; \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      firewall-cmd --direct --remove-chain ipv4 filter %s";
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c:186:58:
         sprintf(cli, firewalld_remove_chain, chain_name, chain_name, chain_name);
                                                          ~~~~~~~~~~
In file included from /usr/include/stdio.h:862,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:33:10: note: '__builtin___sprintf_chk' output between 189 and 378 bytes into a destination of size 256
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c:76:90: error: '%s' directive writing up to 63 bytes into a region of size between 50 and 176 [-Werror=format-overflow=]
     "ip6tables -D OUTPUT -p tcp --tcp-flags RST RST -j %s; ip6tables -F %s; ip6tables -X %s";
                                                                                          ^~
acl.c:179:70:
         sprintf(cli, ip6tables_remove_chain, chain_name, chain_name, chain_name);
                                                                      ~~~~~~~~~~           
In file included from /usr/include/stdio.h:862,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:33:10: note: '__builtin___sprintf_chk' output between 81 and 270 bytes into a destination of size 256
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acl.c:69:87: error: '%s' directive writing up to 63 bytes into a region of size between 53 and 179 [-Werror=format-overflow=]
     "iptables -D OUTPUT -p tcp --tcp-flags RST RST -j %s; iptables -F %s; iptables -X %s";
                                                                                       ^~
acl.c:181:69:
         sprintf(cli, iptables_remove_chain, chain_name, chain_name, chain_name);
                                                                     ~~~~~~~~~~         
In file included from /usr/include/stdio.h:862,
                 from ../libipset/include/ipset/ipset.h:14,
                 from acl.c:23:
/usr/include/bits/stdio2.h:33:10: note: '__builtin___sprintf_chk' output between 78 and 267 bytes into a destination of size 256
   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       __bos (__s), __fmt, __va_arg_pack ());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:778:libshadowsocks_libev_la-acl.lo] 错误 1
make[2]: 离开目录“/home/white/.cache/yay/shadowsocksrr-libev-git/src/shadowsocksrr-libev-git/src”
make[1]: *** [Makefile:478:all-recursive] 错误 1
make[1]: 离开目录“/home/white/.cache/yay/shadowsocksrr-libev-git/src/shadowsocksrr-libev-git”
make: *** [Makefile:387:all] 错误 2
==> 错误: 在 build() 中发生一个错误。
    正在放弃...
Error making: shadowsocksrr-libev-git

What is your config in detail (with all sensitive info masked)?

no config for it

@whitecodes
Copy link
Author

whitecodes commented Jul 1, 2018

软件临时装上了

问题:

cc1: all warnings being treated as errors

所有的警告都被当作了错误

临时解决办法:
编辑PKGBUILD,在make后面加上-i参数。在build()中添加--disable-Werror不起效

Whether you actually want compilation to succeed despite warnings is your own choice; in any event a bug should be filed on the upstream tracker.

这个办法安装后不能用。具体安装的办法看下面

@Akkariiin
Copy link
Member

这个问题你可能需要在AUR项目下反馈

@hamjin
Copy link

hamjin commented Aug 13, 2018

Ubuntu 18.04下也有如此问题。。。。。
edit:用ss-libev的acl.c替换,就没有问题(最好同样的依赖库用ss的替换,省掉一堆问题)
但local.c死都编译不出来,721行strncpy 和sizeof报错:(local.c: In function ‘server_recv_cb’:
local.c:721:45: error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
strncpy(host, ip, sizeof(ip));)
还有libtool有几个warning(ubuntu用apt装的),ev.c也是几个warning
说真的,libev分支真应该改了。。。可以参照ss-libev的做法,把依赖库单独拿出来安装,libev仓库只有src代码

@Akkariiin
Copy link
Member

Akkariiin commented Aug 15, 2018

@railjty libev有重构计划
积重难返

@hamjin
Copy link

hamjin commented Aug 15, 2018

@Akkariiin 确实,估计只有@breakwa11等SSR原本的贡献者才能较快重构。我等估计连代码都没法全部理解。😂

@Akkariiin
Copy link
Member

我说libev现在还是SS时代的旧架构,漫天都是遗留的代码和未解决的坑,你可以想象一下是怎样的场景

@anotherjin
Copy link

@Akkariiin 崩溃的感觉

@whitecodes
Copy link
Author

whitecodes commented Aug 17, 2018

@Akkariiin 上游是这里就直接提到这里了

@whitecodes
Copy link
Author

临时的安装办法:去掉 make 文件中的 -Werror

  1. 自己 fork 一份,修改 src/Makefile.insrc/Makefile.am 文件,删除中间的 -Werror
  2. 修改下载回来的 PKGBUILD,把里面的源码地址修改自己的 fork
  3. 删除其他安装过程中生成的文件
  4. 安装
makepkg -si

遗留问题:这样安装的包版本号会不对,更新的时候需要注意

@hamjin
Copy link

hamjin commented Aug 18, 2018

@whitecodes 嗯,这个方法有效

@hamjin
Copy link

hamjin commented Aug 19, 2018

转到 #42

Akkariiin added a commit that referenced this issue Nov 21, 2018
修复编译问题,更新依赖库
#40 #39
@perqin
Copy link

perqin commented Mar 24, 2019

Updated AUR repository and switched to build over branch Akkariiin/develop. By the way, when will the next release be published? XD

@Akkariiin
Copy link
Member

@perqin please dont use Akkariiin/develop , it have a big issue now.

@Akkariiin
Copy link
Member

maybe need a cherry-pick on this.

@Akkariiin Akkariiin added the bug label Apr 18, 2019
@perqin
Copy link

perqin commented Apr 18, 2019

@Akkariiin Then please notify me here when this patch is available on Akkariiin/master.

gw826943555 pushed a commit to gw826943555/shadowsocksr-libev that referenced this issue Dec 21, 2020
gw826943555 pushed a commit to gw826943555/shadowsocksr-libev that referenced this issue Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants