Errors compiling libgcrypt-1.7.1

Andrew Lyon orthecreedence at gmail.com
Thu Jul 7 21:49:02 CEST 2016


Hello, everyone. I hope this is the correct place to post. I am trying to
compile gcrypt 1.7.1 on my machine (MSYS2, Mingw64).

I doing the following:

tar -xvf libgcrypt-1.7.1.tar.bz2
cd libgcrypt-1.7.1/
mkdir build && cd build/
../configure --prefix=/usr --enable-static --disable-shared

Outputs:

        Libgcrypt v1.7.1 has been configured as follows:

        Platform:                  W32 (x86_64-w64-mingw32)
        Hardware detection module: hwf-x86
        Enabled cipher algorithms: arcfour blowfish cast5 des aes twofish
                                   serpent rfc2268 seed camellia idea
salsa20
                                   gost28147 chacha20
        Enabled digest algorithms: crc gostr3411-94 md4 md5 rmd160 sha1
                                   sha256 sha512 sha3 tiger whirlpool
stribog

        Enabled kdf algorithms:    s2k pkdf2 scrypt
        Enabled pubkey algorithms: dsa elgamal rsa ecc
        Random number generator:   default
        Using linux capabilities:  no
        Try using Padlock crypto:  yes
        Try using AES-NI crypto:   yes
        Try using Intel PCLMUL:    yes
        Try using Intel SSE4.1:    yes
        Try using DRNG (RDRAND):   yes
        Try using Intel AVX:       yes
        Try using Intel AVX2:      yes
        Try using ARM NEON:        n/a

Then running:

make

The build seems to run fine, until I get to the tests, then:

/bin/sh ../libtool  --tag=CC   --mode=link /mingw64/bin/gcc  -I/usr/include
-L/usr/lib -Wall -no-install  -o pubkey.exe pubkey.o ../src/libgcrypt.la
 ../compat/libcompat.la -lgpg-error
libtool: link: warning: `-no-install' is ignored for x86_64-w64-mingw32
libtool: link: warning: assuming `-no-fast-install' instead
libtool: link: /mingw64/bin/gcc -I/usr/include -Wall -o pubkey.exe pubkey.o
 -L/usr/lib ../src/.libs/libgcrypt.a ../compat/.libs/libcompat.a
/usr/lib/libgpg-error.a
../src/.libs/libgcrypt.a(pubkey-util.o):pubkey-util.c:(.text+0x6e0):
multiple definition of `_gcry_pk_util_get_nbits'
pubkey.o:pubkey.c:(.text+0x211): first defined here
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile:671: pubkey.exe] Error 1
make[2]: Leaving directory '/d/src/libgcrypt-1.7.1/build/tests'
make[1]: *** [Makefile:477: all-recursive] Error 1
make[1]: Leaving directory '/d/src/libgcrypt-1.7.1/build'
make: *** [Makefile:408: all] Error 2

Note that I tried running configure with --disable-asm / make
CFLAGS+="-DNO_ASM" as well, no luck (I read somewhere that might help with
build problems on windows).

I tried building v1.7.0 as well, same result, while v1.6.5 compiles just
fine.

Ok, so it failed while building the tests. I figured I'd try running them
to see if it works regardless:

./tests/basic

selftest for CTR failed - see syslog for details
pass 0, algo 7, mode 1, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 7, mode 2, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 7, mode 5, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 7, mode 3, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 7, mode 3, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 7, mode 6, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 7, mode 8, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 7, mode 9, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 7, mode 11, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 8, mode 1, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 8, mode 2, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 8, mode 5, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 8, mode 3, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 8, mode 3, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 8, mode 6, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 8, mode 8, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 8, mode 9, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 8, mode 11, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 9, mode 1, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 9, mode 2, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 9, mode 5, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 9, mode 3, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 9, mode 3, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 9, mode 6, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 9, mode 8, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 9, mode 9, gcry_cipher_setkey failed: Selftest failed
pass 0, algo 9, mode 11, gcry_cipher_setkey failed: Selftest failed
aes-cbc-cts, gcry_cipher_setkey failed: Selftest failed
cbc-mac algo 7, gcry_cipher_setkey failed: Selftest failed
aes-ctr, gcry_cipher_setkey failed: Selftest failed
aes-cfb, gcry_cipher_setkey failed: Selftest failed
aes-ofb, gcry_cipher_setkey failed: Selftest failed
cipher-ccm, gcry_cipher_setkey failed: Selftest failed
aes-gcm, gcry_cipher_setkey failed: Selftest failed
aes-gcm, gcry_cipher_setkey failed: Selftest failed
aes-gcm, gcry_cipher_setkey failed: Selftest failed
aes-gcm, gcry_cipher_setkey failed: Selftest failed
cipher-ocb, gcry_cipher_setkey failed (tv 0): Selftest failed
cipher-ocb, gcry_cipher_setkey failed (tv 0): Selftest failed
cipher-ocb, gcry_cipher_setkey failed (large, algo 7): Selftest failed
cipher-ocb, gcry_cipher_setkey failed (large, algo 7): Selftest failed
cipher-ocb, gcry_cipher_setkey failed (large, algo 7): Selftest failed
cipher-ocb, gcry_cipher_setkey failed (large, algo 7): Selftest failed
cipher-ocb, gcry_cipher_setkey failed (large, algo 7): Selftest failed
cipher-ocb, gcry_cipher_setkey failed (large, algo 7): Selftest failed
cipher-ocb, gcry_cipher_setkey failed (large, algo 9): Selftest failed
cipher-ocb, gcry_cipher_setkey failed (large, algo 9): Selftest failed
cipher-ocb, gcry_cipher_setkey failed (large, algo 9): Selftest failed
cipher-ocb, gcry_cipher_setkey failed (large, algo 9): Selftest failed
cipher-ocb, gcry_cipher_setkey failed (large, algo 9): Selftest failed
cipher-ocb, gcry_cipher_setkey failed (large, algo 9): Selftest failed
cipher-ocb-splitaad, gcry_cipher_setkey failed: Selftest failed
gcry_cipher_setkey failed: Selftest failed
algo 201, mac gcry_mac_setkey failed: Selftest failed
algo 201, mac gcry_mac_setkey failed: Selftest failed
algo 201, mac gcry_mac_setkey failed: Selftest failed
algo 201, mac gcry_mac_setkey failed: Selftest failed
algo 201, mac gcry_mac_setkey failed: Selftest failed
algo 201, mac gcry_mac_setkey failed: Selftest failed
algo 201, mac gcry_mac_setkey failed: Selftest failed
algo 201, mac gcry_mac_setkey failed: Selftest failed
algo 201, mac gcry_mac_setkey failed: Selftest failed
algo 201, mac gcry_mac_setkey failed: Selftest failed
algo 201, mac gcry_mac_setkey failed: Selftest failed
algo 201, mac gcry_mac_s

I tried using the lib in my app anyway (it builds fine against the static
lib) but I just keep getting "Selftest failed" errors. Once again, v1.6.5
builds fine, and I get no "Selftest error" when using it in my app.

Any ideas? Thanks for the help! Please let me know if I omitted any details.

Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20160707/57e5b75a/attachment-0001.html>


More information about the Gcrypt-devel mailing list