randombit / botan

Cryptography Toolkit
https://botan.randombit.net
BSD 2-Clause "Simplified" License
2.55k stars 561 forks source link

Problem for building botan 2.6.0 by mingw32 on win10 X64 #1689

Closed wimotek closed 6 years ago

wimotek commented 6 years ago

./configure.py --prefix=/mingw32 --cpu=i386 --disable-modules=tls --os=mingw --without-stack-protector

INFO: ./configure.py invoked with options "--prefix=/mingw32 --cpu=i386 --disable-modules=tls --os=mingw --without-stack-protector" INFO: Autodetected platform information: OS="MINGW32_NT-10.0" machine="x86_64" proc="" INFO: Guessing to use compiler gcc (use --cc or CXX to set) INFO: Canonicalized CPU target i386 to x86_32 INFO: Shared libs not supported on mingw, disabling shared lib support INFO: Auto-detected compiler version 7.3 INFO: Auto-detected compiler arch x86_32 INFO: Target is gcc:7.3-mingw-x86_32 INFO: Skipping (dependency failure): certstor_sqlite3 sessions_sql sessions_sqlite3 tls_cbc INFO: Skipping (disabled by user): tls INFO: Skipping (incompatible CPU): aes_power8 INFO: Skipping (incompatible OS): darwin_secrandom dev_random fd_unix getentropy proc_walk INFO: Skipping (incompatible compiler): aes_armv8 pmull sha1_armv8 sha2_32_armv8 INFO: Skipping (no enabled compression schemes): compression INFO: Skipping (requires external dependency): bearssl boost bzip2 lzma openssl sqlite3 tpm zlib INFO: Loading modules: adler32 aead aes aes_ni aes_ssse3 aont aria asn1 auto_rng base base64 bcrypt bigint blake2 block blowfish camellia cascade cast cbc cbc_mac ccm cecpq1 certstor_sql cfb chacha chacha20poly1305 chacha_rng chacha_sse2 checksum clmul clmul_ssse3 cmac codec_filt comb4p cpuid crc24 crc32 cryptobox ctr curve25519 des dh dl_algo dl_group dlies dsa dyn_load eax ec_group ecc_key ecdh ecdsa ecgdsa ecies eckcdsa ed25519 elgamal eme_oaep eme_pkcs1 eme_raw emsa1 emsa_pkcs1 emsa_pssr emsa_raw emsa_x931 entropy ffi filters fpe_fe1 gcm gmac gost_28147 gost_3410 gost_3411 hash hash_id hex hkdf hmac hmac_drbg hotp http_util idea idea_sse2 iso9796 kasumi kdf kdf1 kdf1_iso18033 kdf2 keccak keypair lion locking_allocator mac mce mceies md4 md5 mdx_hash mem_pool mgf1 misty1 mode_pad modes mp newhope nist_keywrap noekeon noekeon_simd numbertheory ocb ofb par_hash passhash9 pbes2 pbkdf pbkdf1 pbkdf2 pem pgp_s2k pk_pad pkcs11 poly1305 poly_dbl prf_tls prf_x942 psk_db pubkey rc4 rdrand rdrand_rng rdseed rfc3394 rfc6979 rmd160 rng rsa salsa20 seed serpent serpent_simd sha1 sha1_sse2 sha1_x86 sha2_32 sha2_32_x86 sha2_64 sha3 shacal2 shacal2_simd shacal2_x86 shake shake_cipher simd siphash siv skein sm2 sm3 sm4 socket sp800_108 sp800_56a sp800_56c srp6 stateful_rng stream streebog system_rng thread_utils threefish_512 threefish_512_avx2 tiger tss twofish utils whirlpool win32_stats x509 x919_mac xmss xtea xts INFO: Defaulting to assuming little endian INFO: Using symlink to link files into build dir (use --link-method to change) INFO: Botan 2.6.0 (revision git:d7d080992372cf4fbd569cce1d8cd6aa7599fa0d) (release dated 20180410) build setup is complete

Then make -j4 some warnings src/lib/utils/os_utils.cpp: In function 'int Botan::OS::run_cpu_instruction_probe(std::function<int()>)': src/lib/utils/os_utils.cpp:395:57: warning: unused parameter 'probe_fn' [-Wunused-parameter] int OS::run_cpu_instruction_probe(std::function<int ()> probe_fn) ^~~~ g++ -pthread -std=c++11 -D_REENTRANT -O3 -momit-leaf-frame-pointer -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wzero-as-null-pointer-constant -Wnon-virtual-dtor -Ibuild/include -Ibuild/include/external -c src/lib/utils/socket/socket.cpp -o build/obj/lib/utils_socket.o g++ -pthread -std=c++11 -D_REENTRANT -O3 -momit-leaf-frame-pointer -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wzero-as-null-pointer-constant -Wnon-virtual-dtor -Ibuild/include -Ibuild/include/external -c src/lib/utils/thread_utils/barrier.cpp -o build/obj/lib/utils_thread_utils_barrier.o src/lib/utils/socket/socket.cpp: In function 'std::unique_ptr Botan::OS::open_socket(const string&, const string&, std::chrono::milliseconds)': src/lib/utils/socket/socket.cpp:352:36: warning: unused parameter 'hostname' [-Wunused-parameter] OS::open_socket(const std::string& hostname, ^~~~ src/lib/utils/socket/socket.cpp:353:36: warning: unused parameter 'service' [-Wunused-parameter] const std::string& service, ^~~ src/lib/utils/socket/socket.cpp:354:43: warning: unused parameter 'timeout' [-Wunused-parameter] std::chrono::milliseconds timeout) ^~~

finally make install python src/scripts/install.py --prefix=/mingw32 --build-dir="build" --bindir=bin --libdir=lib --docdir=share/doc --includedir=include INFO: Botan 2.6.0 installation complete

it looks ok. but i build another program , which is used botan . error occured.

Administrator@MyPCs MINGW32 /g/libQtShadowsocks-2.1.0/build

cmake -G "MSYS Makefiles" .. -DUSE_BOTAN2=ON -DCMAKE_INSTALL_PREFIX=/mingw32

-- Checking for one of the modules 'botan-2>=2.3.0;botan-1.10' CMake Error at D:/msys64/mingw32/share/cmake-3.12/Modules/FindPkgConfig.cmake:664 (message): None of the required 'botan-2>=2.3.0;botan-1.10' found Call Stack (most recent call first): CMakeLists.txt:23 (pkg_search_module)

CMake Deprecation Warning at CMakeLists.txt:28 (message): Botan-1.10 is found and will be used in this build. However, Botan-1.10 is deprecated and should not be used if possible

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: BOTAN_LIBRARY_VAR linked by target "QtShadowsocks" in directory G:/libQtShadowsocks-2.1.0/lib

-- Configuring incomplete, errors occurred! See also "G:/libQtShadowsocks-2.1.0/build/CMakeFiles/CMakeOutput.log".

so what's the problem?

randombit commented 6 years ago

It does not look like there is any problem with the library. I think you need to take this up with the libQtShadowsocks developers.