Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failure when cross compile for linux armv7 #10

Open
minnyres opened this issue Nov 22, 2023 · 0 comments
Open

build failure when cross compile for linux armv7 #10

minnyres opened this issue Nov 22, 2023 · 0 comments

Comments

@minnyres
Copy link

minnyres commented Nov 22, 2023

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 abdes/cryptopp-cmake#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant