Comments (6)
可以试着把编译文件全删了再编译试试
from packages.
试试这个补丁,可以编译通过。
101-fix-mbedtls3.6-build.patch
:
--- a/m4/mbedtls.m4
+++ b/m4/mbedtls.m4
@@ -31,7 +31,7 @@ AC_DEFUN([ss_MBEDTLS],
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
-#include <mbedtls/config.h>
+#include <mbedtls/mbedtls_config.h>
]],
[[
#ifndef MBEDTLS_CIPHER_MODE_CFB
@@ -48,7 +48,7 @@ AC_DEFUN([ss_MBEDTLS],
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
-#include <mbedtls/config.h>
+#include <mbedtls/mbedtls_config.h>
]],
[[
#ifndef MBEDTLS_ARC4_C
@@ -64,7 +64,7 @@ AC_DEFUN([ss_MBEDTLS],
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
-#include <mbedtls/config.h>
+#include <mbedtls/mbedtls_config.h>
]],
[[
#ifndef MBEDTLS_BLOWFISH_C
@@ -80,7 +80,7 @@ AC_DEFUN([ss_MBEDTLS],
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
-#include <mbedtls/config.h>
+#include <mbedtls/mbedtls_config.h>
]],
[[
#ifndef MBEDTLS_CAMELLIA_C
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -104,7 +104,7 @@ crypto_md5(const unsigned char *d
md = m;
}
#if MBEDTLS_VERSION_NUMBER >= 0x02070000
- if (mbedtls_md5_ret(d, n, md) != 0)
+ if (mbedtls_md5(d, n, md) != 0)
FATAL("Failed to calculate MD5");
#else
mbedtls_md5(d, n, md);
--- a/src/aead.c
+++ b/src/aead.c
@@ -178,8 +178,8 @@ aead_cipher_encrypt(cipher_ctx_t *cipher_ctx,
case AES192GCM:
case AES128GCM:
- err = mbedtls_cipher_auth_encrypt(cipher_ctx->evp, n, nlen, ad, adlen,
- m, mlen, c, clen, c + mlen, tlen);
+ err = mbedtls_cipher_auth_encrypt_ext(cipher_ctx->evp, n, nlen, ad, adlen,
+ m, mlen, c, *clen, clen, tlen);
*clen += tlen;
break;
case CHACHA20POLY1305IETF:
@@ -226,8 +226,8 @@ aead_cipher_decrypt(cipher_ctx_t *cipher_ctx,
// Otherwise, just use the mbedTLS one with crappy AES-NI.
case AES192GCM:
case AES128GCM:
- err = mbedtls_cipher_auth_decrypt(cipher_ctx->evp, n, nlen, ad, adlen,
- m, mlen - tlen, p, plen, m + mlen - tlen, tlen);
+ err = mbedtls_cipher_auth_decrypt_ext(cipher_ctx->evp, n, nlen, ad, adlen,
+ m, mlen - tlen, p, *plen, plen - tlen, tlen);
break;
case CHACHA20POLY1305IETF:
err = crypto_aead_chacha20poly1305_ietf_decrypt(p, &long_plen, NULL, m, mlen,
@@ -724,9 +724,9 @@ aead_key_init(int method, const char
if (method >= CHACHA20POLY1305IETF) {
cipher_kt_t *cipher_info = (cipher_kt_t *)ss_malloc(sizeof(cipher_kt_t));
cipher->info = cipher_info;
- cipher->info->base = NULL;
- cipher->info->key_bitlen = supported_aead_ciphers_key_size[method] * 8;
- cipher->info->iv_size = supported_aead_ciphers_nonce_size[method];
+ cipher->info->private_base_idx = 0;
+ cipher->info->private_key_bitlen = supported_aead_ciphers_key_size[method] * 8;
+ cipher->info->private_iv_size = supported_aead_ciphers_nonce_size[method];
} else {
cipher->info = (cipher_kt_t *)aead_get_cipher_type(method);
}
--- a/src/stream.c
+++ b/src/stream.c
@@ -174,7 +174,7 @@ cipher_nonce_size(const cipher_t *cipher)
if (cipher == NULL) {
return 0;
}
- return cipher->info->iv_size;
+ return cipher->info->private_iv_size;
}
int
@@ -192,7 +192,7 @@ cipher_key_size(const cipher_t *cipher)
return 0;
}
/* From Version 1.2.7 released 2013-04-13 Default Blowfish keysize is now 128-bits */
- return cipher->info->key_bitlen / 8;
+ return cipher->info->private_key_bitlen / 8;
}
const cipher_kt_t *
@@ -645,9 +645,9 @@ stream_key_init(int method, const char
if (method == SALSA20 || method == CHACHA20 || method == CHACHA20IETF) {
cipher_kt_t *cipher_info = (cipher_kt_t *)ss_malloc(sizeof(cipher_kt_t));
cipher->info = cipher_info;
- cipher->info->base = NULL;
- cipher->info->key_bitlen = supported_stream_ciphers_key_size[method] * 8;
- cipher->info->iv_size = supported_stream_ciphers_nonce_size[method];
+ cipher->info->private_base_idx = 0;
+ cipher->info->private_key_bitlen = supported_stream_ciphers_key_size[method] * 8;
+ cipher->info->private_iv_size = supported_stream_ciphers_nonce_size[method];
} else {
cipher->info = (cipher_kt_t *)stream_get_cipher_type(method);
}
from packages.
试试这个补丁,可以编译通过。
101-fix-mbedtls3.6-build.patch
:--- a/m4/mbedtls.m4 +++ b/m4/mbedtls.m4 @@ -31,7 +31,7 @@ AC_DEFUN([ss_MBEDTLS], AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ -#include <mbedtls/config.h> +#include <mbedtls/mbedtls_config.h> ]], [[ #ifndef MBEDTLS_CIPHER_MODE_CFB @@ -48,7 +48,7 @@ AC_DEFUN([ss_MBEDTLS], AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ -#include <mbedtls/config.h> +#include <mbedtls/mbedtls_config.h> ]], [[ #ifndef MBEDTLS_ARC4_C @@ -64,7 +64,7 @@ AC_DEFUN([ss_MBEDTLS], AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ -#include <mbedtls/config.h> +#include <mbedtls/mbedtls_config.h> ]], [[ #ifndef MBEDTLS_BLOWFISH_C @@ -80,7 +80,7 @@ AC_DEFUN([ss_MBEDTLS], AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ -#include <mbedtls/config.h> +#include <mbedtls/mbedtls_config.h> ]], [[ #ifndef MBEDTLS_CAMELLIA_C --- a/src/crypto.c +++ b/src/crypto.c @@ -104,7 +104,7 @@ crypto_md5(const unsigned char *d md = m; } #if MBEDTLS_VERSION_NUMBER >= 0x02070000 - if (mbedtls_md5_ret(d, n, md) != 0) + if (mbedtls_md5(d, n, md) != 0) FATAL("Failed to calculate MD5"); #else mbedtls_md5(d, n, md); --- a/src/aead.c +++ b/src/aead.c @@ -178,8 +178,8 @@ aead_cipher_encrypt(cipher_ctx_t *cipher_ctx, case AES192GCM: case AES128GCM: - err = mbedtls_cipher_auth_encrypt(cipher_ctx->evp, n, nlen, ad, adlen, - m, mlen, c, clen, c + mlen, tlen); + err = mbedtls_cipher_auth_encrypt_ext(cipher_ctx->evp, n, nlen, ad, adlen, + m, mlen, c, *clen, clen, tlen); *clen += tlen; break; case CHACHA20POLY1305IETF: @@ -226,8 +226,8 @@ aead_cipher_decrypt(cipher_ctx_t *cipher_ctx, // Otherwise, just use the mbedTLS one with crappy AES-NI. case AES192GCM: case AES128GCM: - err = mbedtls_cipher_auth_decrypt(cipher_ctx->evp, n, nlen, ad, adlen, - m, mlen - tlen, p, plen, m + mlen - tlen, tlen); + err = mbedtls_cipher_auth_decrypt_ext(cipher_ctx->evp, n, nlen, ad, adlen, + m, mlen - tlen, p, *plen, plen - tlen, tlen); break; case CHACHA20POLY1305IETF: err = crypto_aead_chacha20poly1305_ietf_decrypt(p, &long_plen, NULL, m, mlen, @@ -724,9 +724,9 @@ aead_key_init(int method, const char if (method >= CHACHA20POLY1305IETF) { cipher_kt_t *cipher_info = (cipher_kt_t *)ss_malloc(sizeof(cipher_kt_t)); cipher->info = cipher_info; - cipher->info->base = NULL; - cipher->info->key_bitlen = supported_aead_ciphers_key_size[method] * 8; - cipher->info->iv_size = supported_aead_ciphers_nonce_size[method]; + cipher->info->private_base_idx = 0; + cipher->info->private_key_bitlen = supported_aead_ciphers_key_size[method] * 8; + cipher->info->private_iv_size = supported_aead_ciphers_nonce_size[method]; } else { cipher->info = (cipher_kt_t *)aead_get_cipher_type(method); } --- a/src/stream.c +++ b/src/stream.c @@ -174,7 +174,7 @@ cipher_nonce_size(const cipher_t *cipher) if (cipher == NULL) { return 0; } - return cipher->info->iv_size; + return cipher->info->private_iv_size; } int @@ -192,7 +192,7 @@ cipher_key_size(const cipher_t *cipher) return 0; } /* From Version 1.2.7 released 2013-04-13 Default Blowfish keysize is now 128-bits */ - return cipher->info->key_bitlen / 8; + return cipher->info->private_key_bitlen / 8; } const cipher_kt_t * @@ -645,9 +645,9 @@ stream_key_init(int method, const char if (method == SALSA20 || method == CHACHA20 || method == CHACHA20IETF) { cipher_kt_t *cipher_info = (cipher_kt_t *)ss_malloc(sizeof(cipher_kt_t)); cipher->info = cipher_info; - cipher->info->base = NULL; - cipher->info->key_bitlen = supported_stream_ciphers_key_size[method] * 8; - cipher->info->iv_size = supported_stream_ciphers_nonce_size[method]; + cipher->info->private_base_idx = 0; + cipher->info->private_key_bitlen = supported_stream_ciphers_key_size[method] * 8; + cipher->info->private_iv_size = supported_stream_ciphers_nonce_size[method]; } else { cipher->info = (cipher_kt_t *)stream_get_cipher_type(method); }
大佬,请问一下,我这样操作是否准确
我在openwrt文件夹下建立了patches文件夹
在patches文件夹下新建了101-fix-mbedtls3.6-build.patch文件,文件内容就是引用的这些
然后在openwrt文件夹下继续使用make -j1 V=s命令编译,但仍然报错
checking for mbedtls_cipher_setup in -lmbedcrypto... yes
checking whether mbedtls supports Cipher Feedback mode or not... configure: error: MBEDTLS_CIPHER_MODE_CFB required
make[3]: *** [Makefile:130: /home/kid/openwrt/build_dir/target-aarch64_cortex-a53_musl/shadowsocks-libev-3.3.5/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1
make[3]: Leaving directory '/home/kid/openwrt/feeds/packages/net/shadowsocks-libev'
time: package/feeds/packages/shadowsocks-libev/compile#20.99#4.38#25.73
ERROR: package/feeds/packages/shadowsocks-libev failed to build.
make[2]: *** [package/Makefile:129: package/feeds/packages/shadowsocks-libev/compile] Error 1
make[2]: Leaving directory '/home/kid/openwrt'
make[1]: *** [package/Makefile:123: /home/kid/openwrt/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/kid/openwrt'
make: *** [/home/kid/openwrt/include/toplevel.mk:233:world] 错误 2
from packages.
试试这个补丁,可以编译通过。
101-fix-mbedtls3.6-build.patch
:--- a/m4/mbedtls.m4 +++ b/m4/mbedtls.m4 @@ -31,7 +31,7 @@ AC_DEFUN([ss_MBEDTLS], AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ -#include <mbedtls/config.h> +#include <mbedtls/mbedtls_config.h> ]], [[ #ifndef MBEDTLS_CIPHER_MODE_CFB @@ -48,7 +48,7 @@ AC_DEFUN([ss_MBEDTLS], AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ -#include <mbedtls/config.h> +#include <mbedtls/mbedtls_config.h> ]], [[ #ifndef MBEDTLS_ARC4_C @@ -64,7 +64,7 @@ AC_DEFUN([ss_MBEDTLS], AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ -#include <mbedtls/config.h> +#include <mbedtls/mbedtls_config.h> ]], [[ #ifndef MBEDTLS_BLOWFISH_C @@ -80,7 +80,7 @@ AC_DEFUN([ss_MBEDTLS], AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ -#include <mbedtls/config.h> +#include <mbedtls/mbedtls_config.h> ]], [[ #ifndef MBEDTLS_CAMELLIA_C --- a/src/crypto.c +++ b/src/crypto.c @@ -104,7 +104,7 @@ crypto_md5(const unsigned char *d md = m; } #if MBEDTLS_VERSION_NUMBER >= 0x02070000 - if (mbedtls_md5_ret(d, n, md) != 0) + if (mbedtls_md5(d, n, md) != 0) FATAL("Failed to calculate MD5"); #else mbedtls_md5(d, n, md); --- a/src/aead.c +++ b/src/aead.c @@ -178,8 +178,8 @@ aead_cipher_encrypt(cipher_ctx_t *cipher_ctx, case AES192GCM: case AES128GCM: - err = mbedtls_cipher_auth_encrypt(cipher_ctx->evp, n, nlen, ad, adlen, - m, mlen, c, clen, c + mlen, tlen); + err = mbedtls_cipher_auth_encrypt_ext(cipher_ctx->evp, n, nlen, ad, adlen, + m, mlen, c, *clen, clen, tlen); *clen += tlen; break; case CHACHA20POLY1305IETF: @@ -226,8 +226,8 @@ aead_cipher_decrypt(cipher_ctx_t *cipher_ctx, // Otherwise, just use the mbedTLS one with crappy AES-NI. case AES192GCM: case AES128GCM: - err = mbedtls_cipher_auth_decrypt(cipher_ctx->evp, n, nlen, ad, adlen, - m, mlen - tlen, p, plen, m + mlen - tlen, tlen); + err = mbedtls_cipher_auth_decrypt_ext(cipher_ctx->evp, n, nlen, ad, adlen, + m, mlen - tlen, p, *plen, plen - tlen, tlen); break; case CHACHA20POLY1305IETF: err = crypto_aead_chacha20poly1305_ietf_decrypt(p, &long_plen, NULL, m, mlen, @@ -724,9 +724,9 @@ aead_key_init(int method, const char if (method >= CHACHA20POLY1305IETF) { cipher_kt_t *cipher_info = (cipher_kt_t *)ss_malloc(sizeof(cipher_kt_t)); cipher->info = cipher_info; - cipher->info->base = NULL; - cipher->info->key_bitlen = supported_aead_ciphers_key_size[method] * 8; - cipher->info->iv_size = supported_aead_ciphers_nonce_size[method]; + cipher->info->private_base_idx = 0; + cipher->info->private_key_bitlen = supported_aead_ciphers_key_size[method] * 8; + cipher->info->private_iv_size = supported_aead_ciphers_nonce_size[method]; } else { cipher->info = (cipher_kt_t *)aead_get_cipher_type(method); } --- a/src/stream.c +++ b/src/stream.c @@ -174,7 +174,7 @@ cipher_nonce_size(const cipher_t *cipher) if (cipher == NULL) { return 0; } - return cipher->info->iv_size; + return cipher->info->private_iv_size; } int @@ -192,7 +192,7 @@ cipher_key_size(const cipher_t *cipher) return 0; } /* From Version 1.2.7 released 2013-04-13 Default Blowfish keysize is now 128-bits */ - return cipher->info->key_bitlen / 8; + return cipher->info->private_key_bitlen / 8; } const cipher_kt_t * @@ -645,9 +645,9 @@ stream_key_init(int method, const char if (method == SALSA20 || method == CHACHA20 || method == CHACHA20IETF) { cipher_kt_t *cipher_info = (cipher_kt_t *)ss_malloc(sizeof(cipher_kt_t)); cipher->info = cipher_info; - cipher->info->base = NULL; - cipher->info->key_bitlen = supported_stream_ciphers_key_size[method] * 8; - cipher->info->iv_size = supported_stream_ciphers_nonce_size[method]; + cipher->info->private_base_idx = 0; + cipher->info->private_key_bitlen = supported_stream_ciphers_key_size[method] * 8; + cipher->info->private_iv_size = supported_stream_ciphers_nonce_size[method]; } else { cipher->info = (cipher_kt_t *)stream_get_cipher_type(method); }
大佬,请问一下,我这样操作是否准确 我在openwrt文件夹下建立了patches文件夹 在patches文件夹下新建了101-fix-mbedtls3.6-build.patch文件,文件内容就是引用的这些
然后在openwrt文件夹下继续使用make -j1 V=s命令编译,但仍然报错
checking for mbedtls_cipher_setup in -lmbedcrypto... yes checking whether mbedtls supports Cipher Feedback mode or not... configure: error: MBEDTLS_CIPHER_MODE_CFB required make[3]: *** [Makefile:130: /home/kid/openwrt/build_dir/target-aarch64_cortex-a53_musl/shadowsocks-libev-3.3.5/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1 make[3]: Leaving directory '/home/kid/openwrt/feeds/packages/net/shadowsocks-libev' time: package/feeds/packages/shadowsocks-libev/compile#20.99#4.38#25.73 ERROR: package/feeds/packages/shadowsocks-libev failed to build. make[2]: *** [package/Makefile:129: package/feeds/packages/shadowsocks-libev/compile] Error 1 make[2]: Leaving directory '/home/kid/openwrt' make[1]: *** [package/Makefile:123: /home/kid/openwrt/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_compile] Error 2 make[1]: Leaving directory '/home/kid/openwrt' make: *** [/home/kid/openwrt/include/toplevel.mk:233:world] 错误 2
我也是同样的问题,试了这个补丁也是不能通过。
from packages.
如果你解决了,感谢告知下结果
from packages.
这个包已被弃用,不会再维护。将于最近删除。
from packages.
Related Issues (20)
- 新编译的 x86 固件,miniupnpd大量报错刷屏 HOT 1
- 用最新源码编译zerotier时出错 HOT 1
- WARNING: Makefile HOT 2
- telephony warning while feeds install HOT 1
- hysteria 2.4.5 fails to compile
- ERROR: package/feeds/small/sing-box failed to build. HOT 3
- telephony/asterisk makefile warning HOT 2
- 最近ruby编译不了 HOT 11
- immortalwrt-23.05.2-x86-64-rootfs.tar.gz包缺少基础包导致opkg不可用 HOT 1
- 为啥opkg软件源中部分包的版本未同步github/packages中版本 HOT 2
- zerotier无法启动 HOT 1
- [package request] added mihomo package
- Ax6 在编译固件时 shadowsocks-rust 出错 HOT 5
- 使用firewall4时nlbwmon不统计流量 HOT 14
- 软件包里的Alist有没有计划添加Https的支持? HOT 4
- ChinaDNS-NG 编译hash错误 HOT 2
- luci-app-nlbwmon无效,没有任何流量统计信息 HOT 10
- 请升级下23.05 的go版本 HOT 1
- 23.05 请升级下go版本 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packages.