riscv64-unknown-linux-gnu-gcc -I. -Icrypto -Iinclude -Iproviders/implementations/include -Iproviders/common/include -I../openssl-3.3.1 -I../openssl-3.3.1/crypto -I../openssl-3.3.1/include -I../openssl-3.3.1/providers/implementations/include -I../openssl-3.3.1/providers/common/include -fPIC -pthread -O2 -pipe -fno-strict-aliasing -Wa,--noexecstack -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/usr/lib64/engines-3\"" -DMODULESDIR="\"/usr/lib64/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -DL_ENDIAN -MMD -MF providers/implementations/digests/libdefault-lib-sm3_prov.d.tmp -MT providers/implementations/digests/libdefault-lib-sm3_prov.o -c -o providers/implementations/digests/libdefault-lib-sm3_prov.o ../openssl-3.3.1/providers/implementations/digests/sm3_prov.c ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_ccm_hw_rv64i.inc:22:27: error: 'rv64i_zvksed_sm4_encrypt' undeclared (first use in this function); did you mean 'rv64i_zvksed_sm4_ccm_initkey'? 22 | rv64i_zvksed_sm4_encrypt, NULL, NULL); | ^~~~~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_ccm_hw.c:20:36: note: in definition of macro 'SM4_HW_CCM_SET_KEY_FN' 20 | (block128_f)fn_blk); \ | ^~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_ccm_hw_rv64i.inc:22:27: note: each undeclared identifier is reported only once for each function it appears in 22 | rv64i_zvksed_sm4_encrypt, NULL, NULL); | ^~~~~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_ccm_hw.c:20:36: note: in definition of macro 'SM4_HW_CCM_SET_KEY_FN' 20 | (block128_f)fn_blk); \ | ^~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_gcm_hw_rv64i.inc:23:31: error: 'rv64i_zvksed_sm4_encrypt' undeclared (first use in this function); did you mean 'rv64i_zvksed_sm4_gcm_initkey'? 23 | rv64i_zvksed_sm4_encrypt, NULL); | ^~~~~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_gcm_hw.c:19:51: note: in definition of macro 'SM4_GCM_HW_SET_KEY_CTR_FN' 19 | CRYPTO_gcm128_init(&ctx->gcm, ks, (block128_f)fn_block); \ | ^~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_gcm_hw_rv64i.inc:23:31: note: each undeclared identifier is reported only once for each function it appears in 23 | rv64i_zvksed_sm4_encrypt, NULL); | ^~~~~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_gcm_hw.c:19:51: note: in definition of macro 'SM4_GCM_HW_SET_KEY_CTR_FN' 19 | CRYPTO_gcm128_init(&ctx->gcm, ks, (block128_f)fn_block); \ | ^~~~~~~~ riscv64-unknown-linux-gnu-gcc -I. -Icrypto -Iinclude -Iproviders/implementations/include -Iproviders/common/include -I../openssl-3.3.1 -I../openssl-3.3.1/crypto -I../openssl-3.3.1/include -I../openssl-3.3.1/providers/implementations/include -I../openssl-3.3.1/providers/common/include -fPIC -pthread -O2 -pipe -fno-strict-aliasing -Wa,--noexecstack -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/usr/lib64/engines-3\"" -DMODULESDIR="\"/usr/lib64/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -DL_ENDIAN -MMD -MF providers/implementations/encode_decode/libdefault-lib-decode_der2key.d.tmp -MT providers/implementations/encode_decode/libdefault-lib-decode_der2key.o -c -o providers/implementations/encode_decode/libdefault-lib-decode_der2key.o ../openssl-3.3.1/providers/implementations/encode_decode/decode_der2key.c ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw_rv64i.inc: In function 'rv64i_zvksed_sm4_xts_initkey': ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw_rv64i.inc:23:20: error: implicit declaration of function 'rv64i_zvksed_sm4_set_encrypt_key'; did you mean 'rv64i_zvksed_sm4_xts_initkey'? [-Wimplicit-function-declaration] 23 | XTS_SET_KEY_FN(rv64i_zvksed_sm4_set_encrypt_key, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw.c:18:9: note: in definition of macro 'XTS_SET_KEY_FN' 18 | fn_set_enc_key(key, &xctx->ks1.ks); \ | ^~~~~~~~~~~~~~ In file included from ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_hw.c:138: ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_hw_rv64i.inc: In function 'cipher_hw_rv64i_zvksed_sm4_initkey': ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_hw_rv64i.inc:32:9: error: implicit declaration of function 'rv64i_zvksed_sm4_set_encrypt_key' [-Wimplicit-function-declaration] 32 | rv64i_zvksed_sm4_set_encrypt_key(key, ks); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ riscv64-unknown-linux-gnu-gcc -I. -Icrypto -Iinclude -Iproviders/implementations/include -Iproviders/common/include -I../openssl-3.3.1 -I../openssl-3.3.1/crypto -I../openssl-3.3.1/include -I../openssl-3.3.1/providers/implementations/include -I../openssl-3.3.1/providers/common/include -fPIC -pthread -O2 -pipe -fno-strict-aliasing -Wa,--noexecstack -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/usr/lib64/engines-3\"" -DMODULESDIR="\"/usr/lib64/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -DL_ENDIAN -MMD -MF providers/implementations/encode_decode/libdefault-lib-decode_epki2pki.d.tmp -MT providers/implementations/encode_decode/libdefault-lib-decode_epki2pki.o -c -o providers/implementations/encode_decode/libdefault-lib-decode_epki2pki.o ../openssl-3.3.1/providers/implementations/encode_decode/decode_epki2pki.c In file included from ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_ccm_hw.c:63: ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_ccm_hw_rv64i.inc: In function 'ossl_prov_sm4_hw_ccm': ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_ccm_hw_rv64i.inc:37:9: error: implicit declaration of function 'RISCV_HAS_ZVKB_AND_ZVKSED' [-Wimplicit-function-declaration] 37 | if (RISCV_HAS_ZVKB_AND_ZVKSED() && riscv_vlen() >= 128) | ^~~~~~~~~~~~~~~~~~~~~~~~~ riscv64-unknown-linux-gnu-gcc -I. -Icrypto -Iinclude -Iproviders/implementations/include -Iproviders/common/include -I../openssl-3.3.1 -I../openssl-3.3.1/crypto -I../openssl-3.3.1/include -I../openssl-3.3.1/providers/implementations/include -I../openssl-3.3.1/providers/common/include -fPIC -pthread -O2 -pipe -fno-strict-aliasing -Wa,--noexecstack -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/usr/lib64/engines-3\"" -DMODULESDIR="\"/usr/lib64/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -DL_ENDIAN -MMD -MF providers/implementations/encode_decode/libdefault-lib-decode_msblob2key.d.tmp -MT providers/implementations/encode_decode/libdefault-lib-decode_msblob2key.o -c -o providers/implementations/encode_decode/libdefault-lib-decode_msblob2key.o ../openssl-3.3.1/providers/implementations/encode_decode/decode_msblob2key.c ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_ccm_hw_rv64i.inc:37:40: error: implicit declaration of function 'riscv_vlen' [-Wimplicit-function-declaration] 37 | if (RISCV_HAS_ZVKB_AND_ZVKSED() && riscv_vlen() >= 128) | ^~~~~~~~~~ In file included from ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_gcm_hw.c:93: ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_gcm_hw_rv64i.inc: In function 'ossl_prov_sm4_hw_gcm': ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_gcm_hw_rv64i.inc:38:9: error: implicit declaration of function 'RISCV_HAS_ZVKB_AND_ZVKSED' [-Wimplicit-function-declaration] 38 | if (RISCV_HAS_ZVKB_AND_ZVKSED() && riscv_vlen() >= 128) | ^~~~~~~~~~~~~~~~~~~~~~~~~ make[1]: *** [Makefile:17217: providers/implementations/ciphers/libdefault-lib-cipher_sm4_ccm_hw.o] Error 1 make[1]: *** Waiting for unfinished jobs.... ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw_rv64i.inc:25:20: error: 'rv64i_zvksed_sm4_encrypt' undeclared (first use in this function); did you mean 'rv64i_zvksed_sm4_xts_initkey'? 25 | rv64i_zvksed_sm4_encrypt, | ^~~~~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw.c:19:40: note: in definition of macro 'XTS_SET_KEY_FN' 19 | xctx->xts.block1 = (block128_f)fn_block_enc; \ | ^~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw_rv64i.inc:25:20: note: each undeclared identifier is reported only once for each function it appears in 25 | rv64i_zvksed_sm4_encrypt, | ^~~~~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw.c:19:40: note: in definition of macro 'XTS_SET_KEY_FN' 19 | xctx->xts.block1 = (block128_f)fn_block_enc; \ | ^~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_gcm_hw_rv64i.inc:38:40: error: implicit declaration of function 'riscv_vlen' [-Wimplicit-function-declaration] 38 | if (RISCV_HAS_ZVKB_AND_ZVKSED() && riscv_vlen() >= 128) | ^~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_hw_rv64i.inc:33:35: error: 'rv64i_zvksed_sm4_encrypt' undeclared (first use in this function) 33 | ctx->block = (block128_f) rv64i_zvksed_sm4_encrypt; | ^~~~~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_hw_rv64i.inc:33:35: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [Makefile:17233: providers/implementations/ciphers/libdefault-lib-cipher_sm4_gcm_hw.o] Error 1 ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw_rv64i.inc:24:20: error: implicit declaration of function 'rv64i_zvksed_sm4_set_decrypt_key'; did you mean 'rv64i_zvksed_sm4_xts_initkey'? [-Wimplicit-function-declaration] 24 | rv64i_zvksed_sm4_set_decrypt_key, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw.c:21:9: note: in definition of macro 'XTS_SET_KEY_FN' 21 | fn_set_dec_key(key, &xctx->ks1.ks); \ | ^~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_hw_rv64i.inc:36:9: error: implicit declaration of function 'rv64i_zvksed_sm4_set_decrypt_key' [-Wimplicit-function-declaration] 36 | rv64i_zvksed_sm4_set_decrypt_key(key, ks); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw_rv64i.inc:26:20: error: 'rv64i_zvksed_sm4_decrypt' undeclared (first use in this function); did you mean 'rv64i_zvksed_sm4_xts_initkey'? 26 | rv64i_zvksed_sm4_decrypt, | ^~~~~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw.c:22:40: note: in definition of macro 'XTS_SET_KEY_FN' 22 | xctx->xts.block1 = (block128_f)fn_block_dec; \ | ^~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_hw_rv64i.inc:37:35: error: 'rv64i_zvksed_sm4_decrypt' undeclared (first use in this function) 37 | ctx->block = (block128_f) rv64i_zvksed_sm4_decrypt; | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw.c:93: ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw_rv64i.inc: In function 'ossl_prov_cipher_hw_sm4_xts': ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw_rv64i.inc:39:9: error: implicit declaration of function 'RISCV_HAS_ZVKB_AND_ZVKSED' [-Wimplicit-function-declaration] 39 | if (RISCV_HAS_ZVKB_AND_ZVKSED() && riscv_vlen() >= 128) | ^~~~~~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_hw.c: In function 'ossl_prov_cipher_hw_sm4_cbc': ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_hw_rv64i.inc:51:5: error: implicit declaration of function 'RISCV_HAS_ZVKB_AND_ZVKSED' [-Wimplicit-function-declaration] 51 | if (RISCV_HAS_ZVKB_AND_ZVKSED() && riscv_vlen() >= 128) \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_hw.c:133:5: note: in expansion of macro 'PROV_CIPHER_HW_select' 133 | PROV_CIPHER_HW_select(mode) \ | ^~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_hw.c:145:1: note: in expansion of macro 'PROV_CIPHER_HW_sm4_mode' 145 | PROV_CIPHER_HW_sm4_mode(cbc) | ^~~~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_xts_hw_rv64i.inc:39:40: error: implicit declaration of function 'riscv_vlen' [-Wimplicit-function-declaration] 39 | if (RISCV_HAS_ZVKB_AND_ZVKSED() && riscv_vlen() >= 128) | ^~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_hw_rv64i.inc:51:36: error: implicit declaration of function 'riscv_vlen' [-Wimplicit-function-declaration] 51 | if (RISCV_HAS_ZVKB_AND_ZVKSED() && riscv_vlen() >= 128) \ | ^~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_hw.c:133:5: note: in expansion of macro 'PROV_CIPHER_HW_select' 133 | PROV_CIPHER_HW_select(mode) \ | ^~~~~~~~~~~~~~~~~~~~~ ../openssl-3.3.1/providers/implementations/ciphers/cipher_sm4_hw.c:145:1: note: in expansion of macro 'PROV_CIPHER_HW_sm4_mode' 145 | PROV_CIPHER_HW_sm4_mode(cbc) | ^~~~~~~~~~~~~~~~~~~~~~~ make[1]: *** [Makefile:17257: providers/implementations/ciphers/libdefault-lib-cipher_sm4_xts_hw.o] Error 1 make[1]: *** [Makefile:17241: providers/implementations/ciphers/libdefault-lib-cipher_sm4_hw.o] Error 1 make[1]: Leaving directory '/var/tmp/portage/dev-libs/openssl-3.3.1/work/openssl-3.3.1-.lp64d' make: *** [Makefile:842: build_sw] Error 2 [31;01m*[0m ERROR: dev-libs/openssl-3.3.1::gentoo failed (compile phase): [31;01m*[0m emake failed [31;01m*[0m [31;01m*[0m If you need support, post the output of `emerge --info '=dev-libs/openssl-3.3.1::gentoo'`, [31;01m*[0m the complete build log and the output of `emerge -pqv '=dev-libs/openssl-3.3.1::gentoo'`. [31;01m*[0m The complete build log is located at '/var/tmp/portage/dev-libs/openssl-3.3.1/temp/build.log'. [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/dev-libs/openssl-3.3.1/temp/environment'. [31;01m*[0m Working directory: '/var/tmp/portage/dev-libs/openssl-3.3.1/work/openssl-3.3.1-.lp64d' [31;01m*[0m S: '/var/tmp/portage/dev-libs/openssl-3.3.1/work/openssl-3.3.1'
Created attachment 897995 [details] Build log
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7004197a2f486c7807e7ae8c5fc2fba65816ac9 commit c7004197a2f486c7807e7ae8c5fc2fba65816ac9 Author: Jakov Smolić <jsmolic@gentoo.org> AuthorDate: 2024-07-19 16:51:15 +0000 Commit: Jakov Smolić <jsmolic@gentoo.org> CommitDate: 2024-07-19 17:01:48 +0000 dev-libs/openssl: Fix riscv build issue in version 3.3.1 Closes: https://bugs.gentoo.org/936311 Signed-off-by: Jakov Smolić <jsmolic@gentoo.org> dev-libs/openssl/files/openssl-3.3.1-riscv.patch | 96 ++++++++++++++++++++++++ dev-libs/openssl/openssl-3.3.1.ebuild | 2 + 2 files changed, 98 insertions(+)