noloader / cryptopp-autotools

Autotools files for Crypto++ project
9 stars 9 forks source link

build failure when cross compile for linux armv7 #10

Open minnyres opened 11 months ago

minnyres commented 11 months ago

Cryptopp 8.8.0 configured with

TARGET=armv7-linux-musleabihf
./bootstrap.sh
CPPFLAGS="-DNDEBUG" CXXFLAGS="-g0 -O3" LDFLAGS="-s" ./configure --prefix=$BUILDDIR/cryptopp --host=$TARGET --enable-shared=no --enable-static

Below are the logs. There is a related issue at https://github.com/abdes/cryptopp-cmake/issues/45. The option --enable-shared=no is not working and the shared library is still built.

***********************************************************************
Auto-configuration is complete. A summary of options are below. If
something looks wrong then please modify config.h and please report
it at http://github.com/noloader/cryptopp-autotools.

    Host triplet: armv7-unknown-linux-musleabihf
 Compiler target: armv7-linux-musleabihf
Compiler version: armv7-linux-musleabihf-g++ (GCC) 11.2.0

Static library: yes
Shared library: yes

CRYPTOPP_NEON_FLAG: -march=armv7-a -mfpu=neon
CRYPTOPP_ARIA_FLAG: -march=armv7-a -mfpu=neon
CRYPTOPP_BLAKE2S_FLAG: -march=armv7-a -mfpu=neon
CRYPTOPP_BLAKE2B_FLAG: -march=armv7-a -mfpu=neon
CRYPTOPP_CHACHA_FLAG: -march=armv7-a -mfpu=neon
CRYPTOPP_CHAM_FLAG: -march=armv7-a -mfpu=neon
CRYPTOPP_CRC_FLAG: -march=armv7-a -mfpu=neon
CRYPTOPP_LEA_FLAG: -march=armv7-a -mfpu=neon
CRYPTOPP_GCM_FLAG: -march=armv7-a -mfpu=neon
CRYPTOPP_AES_FLAG: -march=armv7-a -mfpu=neon
CRYPTOPP_SHA_FLAG: -march=armv7-a -mfpu=neon
CRYPTOPP_SIMON128_FLAG: -march=armv7-a -mfpu=neon
CRYPTOPP_SPECK128_FLAG: -march=armv7-a -mfpu=neon
CRYPTOPP_SM4_FLAG: -march=armv7-a -mfpu=neon

Automake flags (can be overridden by user flags):
AM_CPPFLAGS: 
AM_CXXFLAGS:  -pthread -fdata-sections -ffunction-sections
 AM_ASFLAGS:  -Wa,--noexecstack
 AM_LDFLAGS:  -pthread -Wl,--gc-sections -Wl,--build-id -Wl,--demangle -Wl,--exclude-libs,ALL -Wl,--as-needed

User flags (overrides Automake flags on conflict):
CPPFLAGS: -DNDEBUG
CXXFLAGS: -g0 -O3
 ASFLAGS: 
 LDFLAGS: -s
***********************************************************************

make  all-am
make[1]: Entering directory '/home/cat/git/amule-daemon-static/sources/cryptopp880'
/bin/bash ./libtool  --tag=CXX   --mode=link armv7-linux-musleabihf-g++  -pthread -fdata-sections -ffunction-sections  -DCRYPTOPP_DATA_DIR='"/home/cat/git/amule-daemon-static/build-armv7/cryptopp/share/cryptopp/"' -g0 -O3 -pthread -Wl,--gc-sections -Wl,--build-id -Wl,--demangle -Wl,--exclude-libs,ALL -Wl,--as-needed -s -o cryptest cryptest-test.o cryptest-bench1.o cryptest-bench2.o cryptest-bench3.o cryptest-datatest.o cryptest-dlltest.o cryptest-fipsalgt.o cryptest-validat0.o cryptest-validat1.o cryptest-validat2.o cryptest-validat3.o cryptest-validat4.o cryptest-validat5.o cryptest-validat6.o cryptest-validat7.o cryptest-validat8.o cryptest-validat9.o cryptest-validat10.o cryptest-regtest1.o cryptest-regtest2.o cryptest-regtest3.o cryptest-regtest4.o cryptest-adhoc.o libcryptopp.la 
libtool: link: armv7-linux-musleabihf-g++ -fdata-sections -ffunction-sections -DCRYPTOPP_DATA_DIR=\"/home/cat/git/amule-daemon-static/build-armv7/cryptopp/share/cryptopp/\" -g0 -O3 -Wl,--gc-sections -Wl,--build-id -Wl,--demangle -Wl,--exclude-libs -Wl,ALL -Wl,--as-needed -s -o .libs/cryptest cryptest-test.o cryptest-bench1.o cryptest-bench2.o cryptest-bench3.o cryptest-datatest.o cryptest-dlltest.o cryptest-fipsalgt.o cryptest-validat0.o cryptest-validat1.o cryptest-validat2.o cryptest-validat3.o cryptest-validat4.o cryptest-validat5.o cryptest-validat6.o cryptest-validat7.o cryptest-validat8.o cryptest-validat9.o cryptest-validat10.o cryptest-regtest1.o cryptest-regtest2.o cryptest-regtest3.o cryptest-regtest4.o cryptest-adhoc.o  ./.libs/libcryptopp.so -pthread -Wl,-rpath -Wl,/home/cat/git/amule-daemon-static/build-armv7/cryptopp/lib
/home/cat/git/amule-daemon-static/toolchain/gcc-armv7-linux-musleabihf/bin/../lib/gcc/armv7-linux-musleabihf/11.2.0/../../../../armv7-linux-musleabihf/bin/ld: ./.libs/libcryptopp.so: undefined reference to `cryptogams_sha256_block_data_order_neon'
/home/cat/git/amule-daemon-static/toolchain/gcc-armv7-linux-musleabihf/bin/../lib/gcc/armv7-linux-musleabihf/11.2.0/../../../../armv7-linux-musleabihf/bin/ld: ./.libs/libcryptopp.so: undefined reference to `cryptogams_sha1_block_data_order'
/home/cat/git/amule-daemon-static/toolchain/gcc-armv7-linux-musleabihf/bin/../lib/gcc/armv7-linux-musleabihf/11.2.0/../../../../armv7-linux-musleabihf/bin/ld: ./.libs/libcryptopp.so: undefined reference to `cryptogams_sha512_block_data_order'
/home/cat/git/amule-daemon-static/toolchain/gcc-armv7-linux-musleabihf/bin/../lib/gcc/armv7-linux-musleabihf/11.2.0/../../../../armv7-linux-musleabihf/bin/ld: ./.libs/libcryptopp.so: undefined reference to `cryptogams_AES_decrypt_block'
/home/cat/git/amule-daemon-static/toolchain/gcc-armv7-linux-musleabihf/bin/../lib/gcc/armv7-linux-musleabihf/11.2.0/../../../../armv7-linux-musleabihf/bin/ld: ./.libs/libcryptopp.so: undefined reference to `cryptogams_sha1_block_data_order_neon'
/home/cat/git/amule-daemon-static/toolchain/gcc-armv7-linux-musleabihf/bin/../lib/gcc/armv7-linux-musleabihf/11.2.0/../../../../armv7-linux-musleabihf/bin/ld: ./.libs/libcryptopp.so: undefined reference to `cryptogams_AES_encrypt_block'
/home/cat/git/amule-daemon-static/toolchain/gcc-armv7-linux-musleabihf/bin/../lib/gcc/armv7-linux-musleabihf/11.2.0/../../../../armv7-linux-musleabihf/bin/ld: ./.libs/libcryptopp.so: undefined reference to `cryptogams_AES_set_encrypt_key'
/home/cat/git/amule-daemon-static/toolchain/gcc-armv7-linux-musleabihf/bin/../lib/gcc/armv7-linux-musleabihf/11.2.0/../../../../armv7-linux-musleabihf/bin/ld: ./.libs/libcryptopp.so: undefined reference to `cryptogams_AES_set_decrypt_key'
/home/cat/git/amule-daemon-static/toolchain/gcc-armv7-linux-musleabihf/bin/../lib/gcc/armv7-linux-musleabihf/11.2.0/../../../../armv7-linux-musleabihf/bin/ld: ./.libs/libcryptopp.so: undefined reference to `cryptogams_sha512_block_data_order_neon'
/home/cat/git/amule-daemon-static/toolchain/gcc-armv7-linux-musleabihf/bin/../lib/gcc/armv7-linux-musleabihf/11.2.0/../../../../armv7-linux-musleabihf/bin/ld: ./.libs/libcryptopp.so: undefined reference to `cryptogams_sha256_block_data_order'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:1565: cryptest] Error 1
make[1]: Leaving directory '/home/cat/git/amule-daemon-static/sources/cryptopp880'
make: *** [Makefile:1313: all] Error 2