{"id":15350,"date":"2024-12-26T15:55:20","date_gmt":"2024-12-26T07:55:20","guid":{"rendered":"http:\/\/xinyiworld.top\/wordpress_it\/?p=15350"},"modified":"2025-01-02T10:31:53","modified_gmt":"2025-01-02T02:31:53","slug":"shadowsocksr-libev-shadowsocks%e5%8f%af%e6%89%a7%e8%a1%8c%e6%96%87%e4%bb%b6%e5%ba%93","status":"publish","type":"post","link":"http:\/\/xinyiworld.top\/wordpress_it\/?p=15350","title":{"rendered":"ShadowsocksR-libev (shadowsocks\u53ef\u6267\u884c\u6587\u4ef6\u5e93)"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/honwen\/openwrt-shadowsocksr\">https:\/\/github.com\/honwen\/openwrt-shadowsocksr<\/a><br \/>\n<a href=\"https:\/\/github.com\/AlexZhuo\/openwrt-shadowsocksr?tab=readme-ov-file\">https:\/\/github.com\/AlexZhuo\/openwrt-shadowsocksr?tab=readme-ov-file<\/a>  \uff08\u6709\u9519\u8bef\u8bf4\u660e\uff09<br \/>\n<a href=\"https:\/\/github.com\/kimking666\/shadowsocksr-libev_openwrt\">https:\/\/github.com\/kimking666\/shadowsocksr-libev_openwrt<\/a><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_16 counter-hierarchy counter-decimal ez-toc-grey\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" style=\"display: none;\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15350\/#%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98\" title=\"\u9047\u5230\u7684\u95ee\u9898\">\u9047\u5230\u7684\u95ee\u9898<\/a><ul class=\"ez-toc-list-level-2\"><li class=\"ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15350\/#%E4%B8%80%E3%80%81%E7%BC%96%E8%AF%91%E9%97%AE%E9%A2%98\" title=\"\u4e00\u3001\u7f16\u8bd1\u95ee\u9898\">\u4e00\u3001\u7f16\u8bd1\u95ee\u9898<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15350\/#1size_of_array_element_is_not_a_multiple_of_its_alignment\" title=\"1.size of array element is not a multiple of its alignment\">1.size of array element is not a multiple of its alignment<\/a><ul class=\"ez-toc-list-level-4\"><li class=\"ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15350\/#1%EF%BC%89%E9%97%AE%E9%A2%98%E5%8E%9F%E5%9B%A0%EF%BC%9A\" title=\"1\uff09\u95ee\u9898\u539f\u56e0\uff1a\">1\uff09\u95ee\u9898\u539f\u56e0\uff1a<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15350\/#2%EF%BC%89%E5%B0%9D%E8%AF%95%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98%EF%BC%9A\" title=\"2\uff09\u5c1d\u8bd5\u89e3\u51b3\u95ee\u9898\uff1a\">2\uff09\u5c1d\u8bd5\u89e3\u51b3\u95ee\u9898\uff1a<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15350\/#2_multiple_definition_of\" title=\"2. multiple definition of\">2. multiple definition of<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=15350\/#%E4%BA%8C%E3%80%81%E5%AE%89%E8%A3%85%E9%97%AE%E9%A2%98\" title=\"\u4e8c\u3001\u5b89\u88c5\u95ee\u9898\">\u4e8c\u3001\u5b89\u88c5\u95ee\u9898<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98\"><\/span>\u9047\u5230\u7684\u95ee\u9898<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<h2><span class=\"ez-toc-section\" id=\"%E4%B8%80%E3%80%81%E7%BC%96%E8%AF%91%E9%97%AE%E9%A2%98\"><\/span>\u4e00\u3001\u7f16\u8bd1\u95ee\u9898<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"1size_of_array_element_is_not_a_multiple_of_its_alignment\"><\/span>1.size of array element is not a multiple of its alignment<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code class=\"language-bash\">In file included from crypto_generichash\/blake2\/ref\/blake2b-compress-ref.c:5:\ncrypto_generichash\/blake2\/ref\/blake2.h:118:5: error: size of array element is not a multiple of its alignment\n  118 |     blake2s_state S[8][1];\n      |     ^~~~~~~~~~~~~\ncrypto_generichash\/blake2\/ref\/blake2.h:119:5: error: size of array element is not a multiple of its alignment\n  119 |     blake2s_state R[1];\n      |     ^~~~~~~~~~~~~\ncrypto_generichash\/blake2\/ref\/blake2.h:126:5: error: size of array element is not a multiple of its alignment\n  126 |     blake2b_state S[4][1];\n      |     ^~~~~~~~~~~~~\ncrypto_generichash\/blake2\/ref\/blake2.h:127:5: error: size of array element is not a multiple of its alignment\n  127 |     blake2b_state R[1];\n      |     ^~~~~~~~~~~~~\nmake[8]: *** [Makefile:2722: crypto_generichash\/blake2\/ref\/libsodium_la-blake2b-compress-ref.lo] Error 1\nmake[8]: Leaving directory &#039;\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/libsodium\/src\/libsodium&#039;\nmake[7]: *** [Makefile:3719: all-recursive] Error 1\nmake[7]: Leaving directory &#039;\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/libsodium\/src\/libsodium&#039;\nmake[6]: *** [Makefile:377: all-recursive] Error 1\nmake[6]: Leaving directory &#039;\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/libsodium\/src&#039;\nmake[5]: *** [Makefile:427: all-recursive] Error 1\nmake[5]: Leaving directory &#039;\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/libsodium&#039;\nmake[4]: *** [Makefile:480: all-recursive] Error 1\nmake[4]: Leaving directory &#039;\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543&#039;\nmake[3]: *** [Makefile:389: all] Error 2\nmake[3]: Leaving directory &#039;\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543&#039;\nmake[2]: *** [Makefile:90: \/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/.built] Error 2\nmake[2]: Leaving directory &#039;\/home\/openwrt\/lede\/package\/feeds\/shadowsocksr-libev&#039;\ntime: package\/feeds\/shadowsocksr-libev\/compile#22.22#8.14#40.22\n    ERROR: package\/feeds\/shadowsocksr-libev failed to build.\nmake[1]: *** [package\/Makefile:116: package\/feeds\/shadowsocksr-libev\/compile] Error 1\nmake[1]: Leaving directory &#039;\/home\/openwrt\/lede&#039;\nmake: *** [\/home\/openwrt\/lede\/include\/toplevel.mk:231\uff1apackage\/shadowsocksr-libev\/compile] \u9519\u8bef 2<\/code><\/pre>\n<p>\u67e5\u770b\u65e5\u5fd7\u53ef\u4ee5\u77e5\u9053\u95ee\u9898\u51fa\u73b0\u5728<code>.\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/libsodium\/src\/libsodium\/crypto_generichash\/blake2\/ref\/blake2.h<\/code>\u6587\u4ef6\u4e2d\uff0c\u4e5f\u5c31\u662flibsodium\u5e93\u7f16\u8bd1\u65f6\u51fa\u73b0\u7684\u95ee\u9898\u3002<\/p>\n<pre><code class=\"language-bash\">CRYPTO_ALIGN( 64 ) typedef struct blake2s_state_\n  {\n    uint32_t h[8];\n    uint32_t t[2];\n    uint32_t f[2];\n    uint8_t  buf[2 * BLAKE2S_BLOCKBYTES];\n    size_t   buflen;\n    uint8_t  last_node;\n  } blake2s_state ;\n...\n#ifndef DEFINE_BLAKE2B_STATE\ntypedef crypto_generichash_blake2b_state blake2b_state;\n#else\nCRYPTO_ALIGN( 64 ) typedef struct blake2b_state_\n  {\n    uint64_t h[8];\n    uint64_t t[2];\n    uint64_t f[2];\n    uint8_t  buf[2 * BLAKE2B_BLOCKBYTES];\n    size_t   buflen;\n    uint8_t  last_node;\n  } blake2b_state;\n#endif\n\n  typedef struct blake2sp_state_\n  {\n    blake2s_state S[8][1];\n    blake2s_state R[1];\n    uint8_t buf[8 * BLAKE2S_BLOCKBYTES];\n    size_t  buflen;\n  } blake2sp_state;\n\n  typedef struct blake2bp_state_\n  {\n    blake2b_state S[4][1];\n    blake2b_state R[1];\n    uint8_t buf[4 * BLAKE2B_BLOCKBYTES];\n    size_t  buflen;\n  } blake2bp_state;\n<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"1%EF%BC%89%E9%97%AE%E9%A2%98%E5%8E%9F%E5%9B%A0%EF%BC%9A\"><\/span>1\uff09\u95ee\u9898\u539f\u56e0\uff1a<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u57fa\u672c\u53ef\u4ee5\u786e\u5b9a\u662f\u5728\u5b9a\u4e49blake2s_state\u4e0eblake2b_state\u7ed3\u6784\u4f53\u65f6\u4f7f\u7528\u7684CRYPTO_ALIGN\u5173\u952e\u5b57\uff0c\u9020\u6210\u4e86\u7f16\u8bd1\u5668\u62a5\u9519\uff0c\u5177\u4f53\u7f16\u8bd1\u5668\u4e3a\u4ec0\u4e48\u62a5\u9519\u5f85\u6df1\u7a76\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"2%EF%BC%89%E5%B0%9D%E8%AF%95%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98%EF%BC%9A\"><\/span>2\uff09\u5c1d\u8bd5\u89e3\u51b3\u95ee\u9898\uff1a<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>2-1\uff09\u4fee\u6539blake2.h\u6587\u4ef6\uff0c\u53bb\u6389\u62a5\u9519\u4f4d\u7f6e\u7684CRYPTO_ALIGN\u5b8f\u5b9a\u4e49\u3002<br \/>\n\u91cd\u65b0\u6267\u884c<code>sudo make package\/shadowsocksr-libev\/compile V=99<\/code>\u540e\uff0c\u53d1\u73b0blake2.h\u6587\u4ef6\u53c8\u8fd8\u539f\u4e86\u3002<br \/>\n\u89c2\u5bdf\u7f16\u8bd1\u65e5\u5fd7\u53d1\u73b0\u4e0a\u9762\u7684\u7f16\u8bd1\u6307\u4ee4\u4f1a\u5220\u9664\u65e7\u6587\u4ef6\u5e76\u91cd\u65b0\u4e0b\u8f7d\u5e76\u7f16\u8bd1<br \/>\n<code>SHELL= flock \/home\/openwrt\/lede\/tmp\/.shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543.tar.gz.flock -c &#039;    \/home\/openwrt\/lede\/scripts\/dl_github_archive.py --dl-dir=&quot;\/home\/openwrt\/lede\/dl&quot; --url=&quot;https:\/\/github.com\/shadowsocksrr\/shadowsocksr-libev.git&quot; --version=&quot;d63ff863800a5645aca4309d5dd5962bd1e95543&quot; --subdir=&quot;shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543&quot; --source=&quot;shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543.tar.gz&quot; --hash=&quot;x&quot; || (        echo &quot;Checking out files from the git repository...&quot;; mkdir -p \/home\/openwrt\/lede\/tmp\/dl &amp;&amp; cd \/home\/openwrt\/lede\/tmp\/dl &amp;&amp; rm -rf shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 &amp;&amp; [ \\! -d shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 ] &amp;&amp; git clone  https:\/\/github.com\/shadowsocksrr\/shadowsocksr-libev.git shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 &amp;&amp; (cd shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 &amp;&amp; git checkout d63ff863800a5645aca4309d5dd5962bd1e95543 &amp;&amp; git submodule update --init --recursive) &amp;&amp; echo &quot;Packing checkout...&quot; &amp;&amp; export TAR_TIMESTAMP=<\/code>cd shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 &amp;&amp; git log -1 --format='\\''@%ct'\\''<code> &amp;&amp; rm -rf shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/.git &amp;&amp;   tar --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name ${TAR_TIMESTAMP:+--mtime=&quot;$TAR_TIMESTAMP&quot;} -c shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 |         gzip -nc &gt; \/home\/openwrt\/lede\/tmp\/dl\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543.tar.gz &amp;&amp; mv \/home\/openwrt\/lede\/tmp\/dl\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543.tar.gz \/home\/openwrt\/lede\/dl\/ &amp;&amp; rm -rf shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543; );     &#039;<\/code><\/li>\n<\/ul>\n<p>\u7d27\u63a5\u7740\u6267\u884c\u4e00\u7cfb\u7edf\u6307\u4ee4(\u89e3\u538b\u5305)<\/p>\n<p>\u7136\u540e\u8fdb\u5165\u5230<code>\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543<\/code>\u5f00\u59cb\u7f16\u8bd1<\/p>\n<p>\u300b\u300bconfigure libsodium\u5e93<\/p>\n<pre><code class=\"language-bash\">autoreconf: configure.ac: adding subdirectory libsodium to autoreconf\nautoreconf: Entering directory `libsodium&#039;<\/code><\/pre>\n<p>=== configuring in libsodium<\/p>\n<p>\u300b\u300b \u6307\u5b9a\u7f16\u8bd1\u5668\u53c2\u6570\u5e76\u7f16\u8bd1shadowsocksr-libev<br \/>\n\u5047\u8bbe\u4e0b\u9762\u7684shell\u6307\u4ee4\u540d\u4e3aSHELL_COMMAND_A<br \/>\n<code>CFLAGS=\"-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543=shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I\/home\/openwrt\/lede\/staging_dir\/toolchain-x86_64_gcc-11.3.0_musl\/usr\/include -I\/home\/openwrt\/lede\/staging_dir\/toolchain-x86_64_gcc-11.3.0_musl\/include\/fortify -I\/home\/openwrt\/lede\/staging_dir\/toolchain-x86_64_gcc-11.3.0_musl\/include \" CXXFLAGS=\"-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543=shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I\/home\/openwrt\/lede\/staging_dir\/toolchain-x86_64_gcc-11.3.0_musl\/usr\/include -I\/home\/openwrt\/lede\/staging_dir\/toolchain-x86_64_gcc-11.3.0_musl\/include\/fortify -I\/home\/openwrt\/lede\/staging_dir\/toolchain-x86_64_gcc-11.3.0_musl\/include \" LDFLAGS=\"-L\/home\/openwrt\/lede\/staging_dir\/toolchain-x86_64_gcc-11.3.0_musl\/usr\/lib -L\/home\/openwrt\/lede\/staging_dir\/toolchain-x86_64_gcc-11.3.0_musl\/lib -znow -zrelro \" make  -C \/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/. AR=\"x86_64-openwrt-linux-musl-gcc-ar\" AS=\"x86_64-openwrt-linux-musl-gcc -c -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543=shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro\" LD=x86_64-openwrt-linux-musl-ld NM=\"x86_64-openwrt-linux-musl-gcc-nm\" CC=\"x86_64-openwrt-linux-musl-gcc\" GCC=\"x86_64-openwrt-linux-musl-gcc\" CXX=\"x86_64-openwrt-linux-musl-g++\" RANLIB=\"x86_64-openwrt-linux-musl-gcc-ranlib\" STRIP=x86_64-openwrt-linux-musl-strip OBJCOPY=x86_64-openwrt-linux-musl-objcopy OBJDUMP=x86_64-openwrt-linux-musl-objdump SIZE=x86_64-openwrt-linux-musl-size CROSS=\"x86_64-openwrt-linux-musl-\" ARCH=\"x86_64\" ; <\/code><br \/>\n\u7136\u540e\u5c31\u9047\u5230\u4e0a\u9762\u7684\u62a5\u9519\u4e86<\/p>\n<ul>\n<li>2-2\uff09\u4fee\u6539blake2.h\u6587\u4ef6\uff0c\u53bb\u6389\u62a5\u9519\u4f4d\u7f6e\u7684CRYPTO_ALIGN\u5b8f\u5b9a\u4e49\uff0c\u5e76\u76f4\u63a5\u6267\u884cSHELL_COMMAND_A.<br \/>\nSHELL_COMMAND_A\u9700\u8981\u7a0d\u505a\u4fee\u6539\uff0c\u5c06gcc\u76f8\u5173\u6587\u4ef6\u8def\u5f84\u6539\u6210\u7edd\u5bf9\u8def\u5f84\u4e0d\u7136\u4f1a\u62a5\u5404\u79cdgcc\u6267\u884c\u6587\u4ef6\u627e\u4e0d\u5230\uff0c\u4e14make -C\u9700\u8981\u52a0sudo\u3002<\/li>\n<\/ul>\n<p>\u5b9e\u9645\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u6309\u9053\u7406\u8bf4\u5e94\u8be5\u4e5f\u53ef\u4ee5\uff0c\u4f46\u662f\u62a5\u9519\u627e\u4e0d\u5230\uff1a<\/p>\n<pre><code class=\"language-bash\">echo &#039;export PATH=$PATH:\/home\/openwrt\/lede\/staging_dir\/toolchain-x86_64_gcc-11.3.0_musl\/bin&#039; &gt;&gt; ~\/.bashrc\nsource ~\/.bashrc\n12\u670825\u65e5 11:20echo &#039;export PATH=$PATH:\/home\/openwrt\/lede\/staging_dir\/toolchain-x86_64_gcc-11.3.0_musl\/bin&#039; &gt;&gt; \/etc\/profile\nsource  \/etc\/profile<\/code><\/pre>\n<p>2-2-2\uff09\u4e0a\u9762\u4fee\u6539\u5b8c\u4e4b\u540e\u63a5\u7740\u53c8\u4f1a\u62a5\u9519<\/p>\n<pre><code class=\"language-bash\">\/home\/openwrt\/lede\/staging_dir\/toolchain-x86_64_gcc-11.3.0_musl\/lib\/gcc\/x86_64-openwrt-linux-musl\/11.3.0\/..\/..\/..\/..\/x86_64-openwrt-linux-musl\/bin\/ld: ss_local-http.o:\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/src\/http.h:32: multiple definition of `http_protocol&#039;; ss_local-local.o:\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/src\/http.h:32: first defined here\n\/home\/openwrt\/lede\/staging_dir\/toolchain-x86_64_gcc-11.3.0_musl\/lib\/gcc\/x86_64-openwrt-linux-musl\/11.3.0\/..\/..\/..\/..\/x86_64-openwrt-linux-musl\/bin\/ld: ss_local-tls.o:\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/src\/tls.h:31: multiple definition of `tls_protocol&#039;; ss_local-local.o:\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/src\/tls.h:31: first defined here<\/code><\/pre>\n<p>\u89e3\u51b3\u53c2\u8003\u529e\u6cd5\u89c1\uff1a<a href=\"https:\/\/blog.51cto.com\/u_16117621\/6293024\">https:\/\/blog.51cto.com\/u_16117621\/6293024<\/a><\/p>\n<p>2-2-3\uff09continue<br \/>\n\u867d\u7136\u6ca1\u6709\u62a5\u4e0a\u9762\u7684\u9519\u4e86\uff0c\u4f46\u662f\u7f16\u8bd1\u6d41\u7a0b\u5e76\u6ca1\u6709\u8d70\u5b8c\u6574\uff0cipk\u6587\u4ef6\u6ca1\u6709\u751f\u6210\u3002<br \/>\n\u5c1d\u8bd5clean\/compile\u4efb\u610f\u4e00\u4e2a\u63d2\u4ef6\u5305\uff0c\u6211\u7528\u7684\u662fpdnsd-alt\uff0c\u5b9a\u4f4d\u4e0a\u9762\u7684\u7f16\u8bd1\u6d41\u7a0b\u6ca1\u6709\u6267\u884c\u5b8c\u7684\u6b65\u9aa4\uff08\u6253\u5305\uff09\uff1a<br \/>\n<code>\/bin\/bash \/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/pdnsd-1.2.9b-par\/install-sh -d &quot;\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/pdnsd-1.2.9b-par\/ipkg-install\/var\/pdnsd&quot;<\/code><\/p>\n<p>\u4f46\u662fshadowsocksr-libev\u7684\u6e90\u7801\u4e0b\u9762\u5e76\u6ca1\u6709install-sh\u8fd9\u4e2a\u6587\u4ef6...<\/p>\n<ul>\n<li>2-3\uff09\u6700\u7ec8\u89e3\u51b3\u65b9\u6848<br \/>\na.\u4fee\u6539include\/download.mk\u5c06<code>DownloadMethod\/rawgit<\/code>\u7684\u51fd\u6570\u4f53\u6ce8\u91ca\u6389\uff0c\u8fd9\u6837\u91cd\u65b0make\u65f6\uff0cshadowsocksr-libev\u7684\u6e90\u7801\u5c31\u4e0d\u4f1a\u91cd\u65b0\u4e0b\u8f7d\u4e86\u3002<\/p>\n<pre><code class=\"language-bash\">define DownloadMethod\/rawgit\n    echo &quot;CZLog Checking out files from the git repository...&quot;;\nendef<\/code><\/pre>\n<p>\u67e5\u627e\u601d\u8def\uff1a\u6839\u636e\u7f16\u8bd1\u65e5\u5fd7\u4e2d\u7684git\u76f8\u5173\u65e5\u5fd7<code>SHELL= flock \/home\/openwrt\/lede\/tmp\/.shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543.tar.gz.flock -c &#039;    \/home\/openwrt\/lede\/scripts\/dl_github_archive.py --dl-dir=&quot;\/home\/openwrt\/lede\/dl&quot; --url=&quot;https:\/\/github.com\/shadowsocksrr\/shadowsocksr-libev.git&quot; --version=&quot;d63ff863800a5645aca4309d5dd5962bd1e95543&quot; --subdir=&quot;shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543&quot; --source=&quot;shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543.tar.gz&quot; --hash=&quot;x&quot; || (        echo &quot;Checking out files from the git repository...&quot;; mkdir -p \/home\/openwrt\/lede\/tmp\/dl &amp;&amp; cd \/home\/openwrt\/lede\/tmp\/dl &amp;&amp; rm -rf shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 &amp;&amp; [ \\! -d shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 ] &amp;&amp; git clone  https:\/\/github.com\/shadowsocksrr\/shadowsocksr-libev.git shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 &amp;&amp; (cd shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 &amp;&amp; git checkout d63ff863800a5645aca4309d5dd5962bd1e95543 &amp;&amp; git submodule update --init --recursive) &amp;&amp; echo &quot;Packing checkout...&quot; &amp;&amp; export TAR_TIMESTAMP=<\/code>cd shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 &amp;&amp; git log -1 --format='\\''@%ct'\\''<code> &amp;&amp; rm -rf shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/.git &amp;&amp;   tar --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name ${TAR_TIMESTAMP:+--mtime=&quot;$TAR_TIMESTAMP&quot;} -c shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543 |         gzip -nc &gt; \/home\/openwrt\/lede\/tmp\/dl\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543.tar.gz &amp;&amp; mv \/home\/openwrt\/lede\/tmp\/dl\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543.tar.gz \/home\/openwrt\/lede\/dl\/ &amp;&amp; rm -rf shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543; );     &#039;<\/code><\/p>\n<\/li>\n<\/ul>\n<p>b.\u66f4\u65b0\u76f8\u5173\u7684Makefile\uff0c\u5c06\u4e00\u4e9b\u5bf9\u62a5\u9519\u6709\u5f71\u54cd\u7684gcc\u53c2\u6570\u6ce8\u91ca\u6389\uff0c\u5982-fstack-protector\u3002<br \/>\nshadowsocksr-libev\u6e90\u7801\u6839\u76ee\u5f55<br \/>\nshadowsocksr-libev\/libsodium\u5e93\u4e0b\u7684\u6240\u6709Makefile\u6587\u4ef6<br \/>\n\u7531\u4e8e\u4e0d\u77e5\u9053gcc\u8be5\u51cf\u6216\u8005\u52a0\u4e0a\u54ea\u4e9b\u53c2\u6570\u624d\u80fd\u907f\u514d\u4e0a\u8ff0\u9519\u8bef\uff0c\u6240\u4ee5\u6b64\u65b9\u6cd5\u6682\u65f6\u6401\u7f6e\u3002todo<br \/>\nc.\u8001\u529e\u6cd5\uff0c\u4fee\u6539blake2.h\u6587\u4ef6\uff0c\u53bb\u6389CRYPTO_ALIGN\u3002<br \/>\n\u4f46\u662f\u4ecd\u6709\u62a5\u9519\uff1a<\/p>\n<pre><code class=\"language-bash\">In file included from crypto_generichash\/blake2\/ref\/blake2b-compress-ref.c:5:\ncrypto_generichash\/blake2\/ref\/blake2.h:126:5: error: size of array element is not a multiple of its alignment\n  126 |     blake2b_state S[4][1];\n      |     ^~~~~~~~~~~~~\ncrypto_generichash\/blake2\/ref\/blake2.h:127:5: error: size of array element is not a multiple of its alignment\n  127 |     blake2b_state R[1];\n      |     ^~~~~~~~~~~~~\n<\/code><\/pre>\n<p>\u7ecf\u8c03\u8bd5\u53d1\u73b0blake2b_state\u771f\u6b63\u7684\u7c7b\u578b\u662fcrypto_generichash_blake2b_state\uff0c\u5e76\u4e0d\u662f\u6ce8\u91ca\u7684blake2b_state_\u7c7b\u578b\u3002<br \/>\n<code> typedef crypto_generichash_blake2b_state blake2b_state;<\/code><br \/>\n\u679c\u7136\uff0c\u5728<code>libsodium\/src\/libsodium\/include\/sodium\/crypto_generichash_blake2b.h<\/code>\u6587\u4ef6\u53d1\u73b0CRYPTO_ALIGN<br \/>\n<code>typedef CRYPTO_ALIGN(64) struct crypto_generichash_blake2b_state {<\/code><br \/>\n\u6ce8\u91caCRYPTO_ALIGN\u4e4b\u540e\u6ca1\u6709\u518d\u62a5\u4e0a\u9762\u7684\u9519\u8bef\uff0c\u4f46\u662f\u4f1a\u6709\u4e0b\u9762\u7684\u9519\u8bef\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_multiple_definition_of\"><\/span>2. multiple definition of<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code class=\"language-bash\">budns\/.libs\/libudns.a -lmbedcrypto -lpcre\n\/home\/openwrt\/lede\/staging_dir\/toolchain-x86_64_gcc-11.3.0_musl\/lib\/gcc\/x86_64-openwrt-linux-musl\/11.3.0\/..\/..\/..\/..\/x86_64-openwrt-linux-musl\/bin\/ld: ss_local-http.o:\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/src\/http.h:32: multiple definition of `http_protocol&#039;; ss_local-local.o:\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/src\/http.h:32: first defined here\n\/home\/openwrt\/lede\/staging_dir\/toolchain-x86_64_gcc-11.3.0_musl\/lib\/gcc\/x86_64-openwrt-linux-musl\/11.3.0\/..\/..\/..\/..\/x86_64-openwrt-linux-musl\/bin\/ld: ss_local-tls.o:\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/src\/tls.h:31: multiple definition of `tls_protocol&#039;; ss_local-local.o:\/home\/openwrt\/lede\/build_dir\/target-x86_64_musl\/shadowsocksr-libev\/shadowsocksr-libev-2018-03-07-d63ff863800a5645aca4309d5dd5962bd1e95543\/src\/tls.h:31: first defined here\ncollect2: error: ld returned 1 exit status<\/code><\/pre>\n<p>\u89e3\u51b3\u529e\u6cd5\uff1a\u5728\u62a5\u9519\u7684\u53d8\u91cf\u524d\u52a0extern\u5173\u952e\u5b57\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E4%BA%8C%E3%80%81%E5%AE%89%E8%A3%85%E9%97%AE%E9%A2%98\"><\/span>\u4e8c\u3001\u5b89\u88c5\u95ee\u9898<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre><code class=\"language-bash\">root@OpenWrt:\/tmp# opkg install shadowsocksr-libev.ipk \nUnknown package &#039;shadowsocksr-libev&#039;.\nCollected errors:\n * pkg_hash_check_unresolved: cannot find dependency libpcre for shadowsocksr-libev\n * pkg_hash_check_unresolved: cannot find dependency libmbedtls2.4.0-3 for shadowsocksr-libev\n * pkg_hash_fetch_best_installation_candidate: Packages for shadowsocksr-libev found, but incompatible with the architectures configured\n * opkg_install_cmd: Cannot install package shadowsocksr-libev.\nroot@OpenWrt:\/tmp# opkg install libpcre\nUnknown package &#039;libpcre&#039;.\nCollected errors:\n * opkg_install_cmd: Cannot install package libpcre.<\/code><\/pre>\n<ul>\n<li>pcre<br \/>\n\u5b98\u7f51\u53ef\u4e0b\u8f7d\uff1a<a href=\"https:\/\/archive.openwrt.org\/releases\/23.05.5\/packages\/x86_64\/packages\/\">https:\/\/archive.openwrt.org\/releases\/23.05.5\/packages\/x86_64\/packages\/<\/a><br \/>\npcre2\u7684\u7248\u672c\u53ef\u4ee5\u5728https:\/\/archive.openwrt.org\/releases\/23.05.5\/packages\/x86_64\/base\/ \u8fd9\u91cc\u4e0b\u8f7d<\/li>\n<\/ul>\n<p>\u5176\u5b9e\u4f9d\u8d56\u5305\u76f4\u63a5\u5728\u6e90\u7801\u4e2d\u7f16\u8bd1\u65f6\u5df2\u7ecf\u751f\u6210\u4e86\uff0c\u4f4d\u4e8e<code>bin\/packages\/x86_64\/base<\/code>\u3002<\/p>\n<button class=\"simplefavorite-button\" data-postid=\"15350\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>https:\/\/github.com\/honwen\/openwrt-shadowsocksr htt [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1165],"tags":[],"_links":{"self":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/15350"}],"collection":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15350"}],"version-history":[{"count":30,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/15350\/revisions"}],"predecessor-version":[{"id":15413,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/15350\/revisions\/15413"}],"wp:attachment":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15350"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}