openssl: Build of libcrypto.a linux-armv4 fails with -march=armv8-a

OpenSSL 3.1.0 build issue

Since 37f1828d8701662c40cc98172001a533fe49764c builds failing on linux-armv4 (if userland is arm32 / not aarch64)

A quick fix is to configure with no-sm4 on ARM 32-bit userland builds.

${LDCMD:-/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-iMX8.arm-12.0-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-gcc} -pthread -Wa,--noexecstack -march=armv8-a+crc -mtune=cortex-a53 -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mfloat-abi=hard -mfpu=neon-fp-armv8 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG -march=armv8-a+crc -mtune=cortex-a53 -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mfloat-abi=hard -mfpu=neon-fp-armv8 -Wall -pipe -O2 -fomit-frame-pointer -fuse-ld=gold  -Wl,--as-needed -fuse-ld=gold -Wl,--as-needed \
        -o test/cmp_protect_test \
        test/cmp_protect_test-bin-cmp_protect_test.o \
        test/helpers/cmp_protect_test-bin-cmp_testlib.o \
        test/libtestutil.a libcrypto.a -ldl -pthread -latomic
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
collect2: error: ld returned 1 exit status
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:22732: test/bn_internal_test] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:22484: test/asn1_dsa_internal_test] Error 1
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:22454: test/algorithmid_test] Error 1
make[1]: *** [Makefile:24035: test/cmactest] Error 1
make[1]: *** [Makefile:24051: test/cmp_asn_test] Error 1
make[1]: *** [Makefile:24136: test/cmp_hdr_test] Error 1
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:24077: test/cmp_client_test] Error 1
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:22195: fuzz/cmp-test] Error 1
make[1]: *** [Makefile:22514: test/asn1_internal_test] Error 1
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:22319: fuzz/punycode-test] Error 1
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:23946: test/chacha_internal_test] Error 1
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
collect2: error: ld returned 1 exit status
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_gcm_hw.o):cipher_sm4_gcm_hw.c:function sm4_gcm_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_ecb_encrypt'
make[1]: *** [Makefile:24186: test/cmp_protect_test] Error 1
libcrypto.a(libdefault-lib-cipher_sm4_hw.o):cipher_sm4_hw.c:function cipher_hw_sm4_initkey: error: undefined reference to 'sm4_v8_cbc_encrypt'
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_encrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_set_decrypt_key'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ctr32_encrypt_blocks'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_decrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_ecb_encrypt'
libcrypto.a(libcrypto-lib-e_sm4.o):e_sm4.c:function sm4_init_key: error: undefined reference to 'sm4_v8_cbc_encrypt'
make[1]: *** [Makefile:24111: test/cmp_ctx_test] Error 1
make[1]: *** [Makefile:24161: test/cmp_msg_test] Error 1
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:23961: test/cipher_overhead_test] Error 1
make[1]: Leaving directory '/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-iMX8.arm-12.0-devel/build/openssl-3.1.0/.armv8a-libreelec-linux-gnueabihf'

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for the extra detail - I am now able to reproduce, and will raise a patch to fix (needs to be reviewed internally first)

Okay @heitbaum I’ve raised a separate PR for 3.1 - #20624. Can you check that it fixes your issue please? (it does locally!)

Tested successfully with 3.1 (both arm32 and aarch64 builds on ARMv8 cross-compiled)

Failed build (with sm4)

docker@b52b3c26dfee:/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-iMX8.arm-12.0-devel/build/openssl-3.1.0/.armv8a-libreelec-linux-gnueabihf$ perl configdata.pm --dump

Command line (with current working directory = .):

    /usr/bin/perl ./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=lib shared threads no-ec2m no-md2 no-rc5 no-rfc3779 no-sctp no-ssl-trace no-ssl3 no-unit-test no-weak-ssl-ciphers no-zlib no-zlib-dynamic no-static-engine linux-armv4 -march=armv8-a+crc -mtune=cortex-a53 -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mfloat-abi=hard -mfpu=neon-fp-armv8 -Wall -pipe -O2 -fomit-frame-pointer -DNDEBUG -Wl,--as-needed -fuse-ld=gold

Perl information:

    /usr/bin/perl
    5.30.0 for x86_64-linux-gnu-thread-multi

Enabled features:

    afalgeng
    aria
    asm
    async
    autoalginit
    autoerrinit
    autoload-config
    bf
    blake2
    bulk
    cached-fetch
    camellia
    capieng
    cast
    chacha
    cmac
    cmp
    cms
    comp
    ct
    deprecated
    des
    dgram
    dh
    dsa
    dso
    dtls
    dynamic-engine
    ec
    ecdh
    ecdsa
    engine
    err
    filenames
    gost
    idea
    legacy
    loadereng
    makedepend
    md4
    mdc2
    module
    multiblock
    nextprotoneg
    ocb
    ocsp
    padlockeng
    pic
    pinshared
    poly1305
    posix-io
    psk
    rc2
    rc4
    rdrand
    rmd160
    scrypt
    secure-memory
    seed
    shared
    siphash
    siv
    sm2
    sm3
    sm4
    sock
    srp
    srtp
    sse2
    ssl
    static-engine
    stdio
    tests
    threads
    tls
    ts
    ui-console
    whirlpool
    tls1
    tls1-method
    tls1_1
    tls1_1-method
    tls1_2
    tls1_2-method
    tls1_3
    dtls1
    dtls1-method
    dtls1_2
    dtls1_2-method

Disabled features:

    acvp-tests          [cascade]        OPENSSL_NO_ACVP_TESTS
    asan                [default]        OPENSSL_NO_ASAN
    buildtest-c++       [default]
    crypto-mdebug       [default]        OPENSSL_NO_CRYPTO_MDEBUG
    devcryptoeng        [default]        OPENSSL_NO_DEVCRYPTOENG
    ec2m                [option]         OPENSSL_NO_EC2M
    ec_nistp_64_gcc_128 [default]        OPENSSL_NO_EC_NISTP_64_GCC_128
    egd                 [default]        OPENSSL_NO_EGD
    external-tests      [default]        OPENSSL_NO_EXTERNAL_TESTS
    fips                [default]
    fips-securitychecks [cascade]        OPENSSL_NO_FIPS_SECURITYCHECKS
    fuzz-afl            [default]        OPENSSL_NO_FUZZ_AFL
    fuzz-libfuzzer      [default]        OPENSSL_NO_FUZZ_LIBFUZZER
    ktls                [default]        OPENSSL_NO_KTLS
    md2                 [option]         OPENSSL_NO_MD2 (skip crypto/md2)
    msan                [default]        OPENSSL_NO_MSAN
    rc5                 [option]         OPENSSL_NO_RC5 (skip crypto/rc5)
    rfc3779             [option]         OPENSSL_NO_RFC3779
    sctp                [option]         OPENSSL_NO_SCTP
    ssl-trace           [option]         OPENSSL_NO_SSL_TRACE
    trace               [default]        OPENSSL_NO_TRACE
    ubsan               [default]        OPENSSL_NO_UBSAN
    unit-test           [option]         OPENSSL_NO_UNIT_TEST
    uplink              [no uplink_arch] OPENSSL_NO_UPLINK
    weak-ssl-ciphers    [option]         OPENSSL_NO_WEAK_SSL_CIPHERS
    zlib                [option]
    zlib-dynamic        [option]
    ssl3                [option]         OPENSSL_NO_SSL3
    ssl3-method         [default]        OPENSSL_NO_SSL3_METHOD

Config target attributes:

    AR => "ar",
    ARFLAGS => "qc",
    CC => "gcc",
    CFLAGS => "-Wall -O3",
    CXX => "g++",
    CXXFLAGS => "-Wall -O3",
    HASHBANGPERL => "/usr/bin/env perl",
    RANLIB => "ranlib",
    RC => "windres",
    asm_arch => "armv4",
    bn_ops => "BN_LLONG RC4_CHAR",
    build_file => "Makefile",
    build_scheme => [ "unified", "unix" ],
    cflags => "-pthread",
    cppflags => "",
    cxxflags => "-std=c++11 -pthread",
    defines => [ "OPENSSL_BUILDING_OPENSSL" ],
    disable => [  ],
    dso_ldflags => "-Wl,-z,defs",
    dso_scheme => "dlfcn",
    enable => [ "afalgeng" ],
    ex_libs => "-ldl -pthread -latomic",
    includes => [  ],
    lflags => "",
    lib_cflags => "",
    lib_cppflags => "-DOPENSSL_USE_NODELETE",
    lib_defines => [  ],
    module_cflags => "-fPIC",
    module_cxxflags => undef,
    module_ldflags => "-Wl,-znodelete -shared -Wl,-Bsymbolic",
    perl_platform => "Unix",
    perlasm_scheme => "linux32",
    shared_cflag => "-fPIC",
    shared_defflag => "-Wl,--version-script=",
    shared_defines => [  ],
    shared_ldflag => "-Wl,-znodelete -shared -Wl,-Bsymbolic",
    shared_rcflag => "",
    shared_sonameflag => "-Wl,-soname=",
    shared_target => "linux-shared",
    thread_defines => [  ],
    thread_scheme => "pthreads",
    unistd => "<unistd.h>",

Recorded environment:

    AR = /var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-iMX8.arm-12.0-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-ar
    BUILDFILE =
    CC = /var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-iMX8.arm-12.0-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-gcc
    CFLAGS = -march=armv8-a+crc -mtune=cortex-a53 -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mfloat-abi=hard -mfpu=neon-fp-armv8 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG
    CPPFLAGS =
    CROSS_COMPILE =
    CXX = /var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-iMX8.arm-12.0-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-g++
    CXXFLAGS = -march=armv8-a+crc -mtune=cortex-a53 -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mfloat-abi=hard -mfpu=neon-fp-armv8 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG
    HASHBANGPERL =
    LDFLAGS =  -Wl,--as-needed -fuse-ld=gold
    LDLIBS =
    OPENSSL_LOCAL_CONFIG_DIR =
    PERL =
    RANLIB = /var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-iMX8.arm-12.0-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-ranlib
    RC =
    RCFLAGS =
    WINDRES =
    __CNF_CFLAGS =
    __CNF_CPPDEFINES =
    __CNF_CPPFLAGS =
    __CNF_CPPINCLUDES =
    __CNF_CXXFLAGS =
    __CNF_LDFLAGS =
    __CNF_LDLIBS =

Makevars:

    AR              = /var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-iMX8.arm-12.0-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-ar
    ARFLAGS         = qc
    CC              = /var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-iMX8.arm-12.0-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-gcc
    CFLAGS          = -march=armv8-a+crc -mtune=cortex-a53 -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mfloat-abi=hard -mfpu=neon-fp-armv8 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG -march=armv8-a+crc -mtune=cortex-a53 -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mfloat-abi=hard -mfpu=neon-fp-armv8 -Wall -pipe -O2 -fomit-frame-pointer -fuse-ld=gold
    CPPDEFINES      = NDEBUG
    CPPFLAGS        =
    CPPINCLUDES     =
    CXX             = /var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-iMX8.arm-12.0-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-g++
    CXXFLAGS        = -march=armv8-a+crc -mtune=cortex-a53 -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mfloat-abi=hard -mfpu=neon-fp-armv8 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG -march=armv8-a+crc -mtune=cortex-a53 -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mfloat-abi=hard -mfpu=neon-fp-armv8 -Wall -pipe -O2 -fomit-frame-pointer -fuse-ld=gold
    HASHBANGPERL    = /usr/bin/env perl
    LDFLAGS         =  -Wl,--as-needed -fuse-ld=gold -Wl,--as-needed
    LDLIBS          =
    PERL            = /usr/bin/perl
    RANLIB          = /var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-iMX8.arm-12.0-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-ranlib
    RC              = windres
    RCFLAGS         =

NOTE: These variables only represent the configuration view.  The build file
template may have processed these variables further, please have a look at the
build file for more exact data:
    Makefile

build file:

    Makefile

build file templates:

    Configurations/common0.tmpl
    Configurations/unix-Makefile.tmpl