Ran configure thus :
$ ./configure --libdir=/usr/local/lib64 --disable-silent-rules \
> --enable-dependency-tracking --enable-static=yes --enable-shared=yes \
> --enable-large-data-tests --enable-hmac-binary-check \
> --disable-O-flag-munging --disable-optimization --with-gnu-ld \
> --with-sysroot=/usr/local --with-libgpg-error-prefix=/usr/local
That resulted in what seems to be reasonable :
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether /usr/local/bin/gmake sets $(MAKE)... yes
checking whether /usr/local/bin/gmake supports nested variables... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether /usr/local/bin/gmake supports nested variables... (cached) yes
checking whether /usr/local/bin/gmake sets $(MAKE)... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by /usr/local/bin/gmake... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for gawk... (cached) gawk
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cc for build... gcc
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /bin/ld
checking if the linker (/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /bin/nm -B
checking the name lister (/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /bin/nm -B output from gcc object... ok
checking for sysroot... /usr/local
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for windres... no
checking whether byte ordering is bigendian... no
checking size of unsigned short... 2
checking size of unsigned int... 4
checking size of unsigned long... 8
checking size of unsigned long long... 8
checking size of void *... 8
checking for uintptr_t... yes
checking for UINT64_C... yes
checking size of uint64_t... 8
checking which symmetric ciphers to include... arcfour blowfish cast5 des aes twofish serpent rfc2268 seed camellia idea salsa20 gost28147 chacha20
checking which public-key ciphers to include... dsa elgamal rsa ecc
checking which message digests to include... crc gostr3411-94 md4 md5 rmd160 sha1 sha256 sha512 sha3 tiger whirlpool stribog blake2
checking which key derivation functions to include... s2k pkdf2 scrypt
checking which random module to use... default
checking whether use of /dev/random is requested... yes
checking whether the experimental random daemon is requested... no
checking whether MPI assembler modules are requested... yes
checking whether memory guard is requested... no
checking whether to run large data tests... yes
checking whether use of capabilities is requested... no
checking whether a HMAC binary check is requested... yes
checking whether jitter entropy support is requested... yes
checking whether padlock support is requested... yes
checking whether AESNI support is requested... yes
checking whether PCLMUL support is requested... yes
checking whether SSE4.1 support is requested... yes
checking whether DRNG support is requested... yes
checking whether AVX support is requested... yes
checking whether AVX2 support is requested... yes
checking whether NEON support is requested... yes
checking whether ARMv8 Crypto Extension support is requested... yes
checking whether a -O flag munging is requested... no
checking whether to enable AMD64 as(1) feature detection... yes
checking for gpg-error-config... /usr/local/bin/gpg-error-config
checking for GPG Error - version >= 1.25... yes (1.27)
checking for pthread_create in -lpthread... yes
checking for library containing setsockopt... none required
checking for library containing setsockopt... (cached) none required
checking for ANSI C header files... (cached) yes
checking for unistd.h... (cached) yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/msg.h usability... yes
checking sys/msg.h presence... yes
checking for sys/msg.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking return type of signal handlers... void
checking whether sys_siglist is declared... yes
checking for pid_t... yes
checking for byte typedef... no
checking for ushort typedef... yes
checking for ulong typedef... yes
checking for u16 typedef... no
checking for u32 typedef... no
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for socklen_t... yes
checking for __builtin_bswap32... yes
checking for __builtin_bswap64... yes
checking for __builtin_ctz... yes
checking whether the variable length arrays are supported... yes
checking whether the visibility attribute is supported... yes
checking for broken visibility attribute... no
checking for broken alias attribute... no
checking if gcc supports -fvisibility=hidden... yes
checking whether the GCC style aligned attribute is supported... yes
checking whether the GCC style packed attribute is supported... yes
checking whether the GCC style may_alias attribute is supported... yes
checking whether 'asm' assembler keyword is supported... yes
checking whether '__asm__' assembler keyword is supported... yes
checking whether inline assembly memory barrier is supported... yes
checking whether GCC assembler is compatible for ARM assembly implementations... no
checking whether GCC assembler is compatible for ARMv8/Aarch64 assembly implementations... no
checking for _ prefix in compiled symbols... no
checking architecture and mpi assembler functions... x86
checking whether compiler supports 'ms_abi' function attribute... yes
checking whether compiler supports 'sysv_abi' function attribute... yes
checking whether default calling convention is 'ms_abi'... no
checking whether default calling convention is 'sysv_abi'... yes
checking whether GCC inline assembler supports SSSE3 instructions... yes
checking whether GCC inline assembler supports PCLMUL instructions... yes
checking whether GCC inline assembler supports SSE4.1 instructions... yes
checking whether GCC inline assembler supports AVX instructions... yes
checking whether GCC inline assembler supports AVX2 instructions... yes
checking whether GCC inline assembler supports BMI2 instructions... yes
checking whether GCC assembler handles division correctly... yes
checking whether GCC assembler is compatible for amd64 assembly implementations... yes
checking whether GCC assembler is compatible for Intel syntax assembly implementations... yes
checking whether compiler is configured for ARMv6 or newer architecture... n/a
checking whether GCC inline assembler supports NEON instructions... n/a
checking whether GCC inline assembler supports AArch32 Crypto Extension instructions... n/a
checking whether GCC inline assembler supports AArch64 NEON instructions... n/a
checking whether GCC inline assembler supports AArch64 Crypto Extension instructions... n/a
checking for vprintf... yes
checking for _doprnt... no
checking for stpcpy... yes
checking for strcasecmp... yes
checking for strtoul... yes
checking for memmove... yes
checking for stricmp... no
checking for atexit... yes
checking for raise... yes
checking for strerror... yes
checking for rand... yes
checking for mmap... yes
checking for getpagesize... yes
checking for sysconf... yes
checking for waitpid... yes
checking for wait4... yes
checking for gettimeofday... yes
checking for getrusage... yes
checking for gethrtime... no
checking for clock_gettime... yes
checking for syslog... yes
checking for syscall... yes
checking for fcntl... yes
checking for ftruncate... yes
checking for flockfile... yes
checking for mlock... yes
checking for sysconf... (cached) yes
checking for getpagesize... (cached) yes
checking whether mlock is broken... no
checking for getpid... yes
checking for clock... yes
checking for library containing dlopen... -ldl
checking for random device... yes
checking whether non excutable stack support is requested... yes
checking whether assembler supports --noexecstack option... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating m4/Makefile
config.status: creating compat/Makefile
config.status: creating mpi/Makefile
config.status: creating cipher/Makefile
config.status: creating random/Makefile
config.status: creating doc/Makefile
config.status: creating src/Makefile
config.status: creating src/gcrypt.h
config.status: creating src/libgcrypt-config
config.status: creating src/versioninfo.rc
config.status: creating tests/Makefile
config.status: creating tests/hashtest-256g
config.status: creating tests/basic-disable-all-hwf
config.status: creating config.h
config.status: linking mpi/amd64/mpih-add1.S to mpi/mpih-add1-asm.S
config.status: linking mpi/amd64/mpih-sub1.S to mpi/mpih-sub1-asm.S
config.status: linking mpi/amd64/mpih-mul1.S to mpi/mpih-mul1-asm.S
config.status: linking mpi/amd64/mpih-mul2.S to mpi/mpih-mul2-asm.S
config.status: linking mpi/amd64/mpih-mul3.S to mpi/mpih-mul3-asm.S
config.status: linking mpi/amd64/mpih-lshift.S to mpi/mpih-lshift-asm.S
config.status: linking mpi/amd64/mpih-rshift.S to mpi/mpih-rshift-asm.S
config.status: linking mpi/amd64/mpi-asm-defs.h to mpi/mpi-asm-defs.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing gcrypt-conf commands
Libgcrypt v1.8.1 has been configured as follows:
Platform: GNU/Linux (x86_64-pc-linux-gnu)
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
blake2
Enabled kdf algorithms: s2k pkdf2 scrypt
Enabled pubkey algorithms: dsa elgamal rsa ecc
Random number generator: default
Try using jitter entropy: yes
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
Try using ARMv8 crypto: n/a
The compile ran fine however there were many strange warnings thus :
libtool: link: warning: library `/usr/local/lib64/libgpg-error.la' was moved.
That makes no sense as libgpg-error.la was not moved and has always been built and installed into /usr/local with the usual libs in /usr/local/lib64 and here is an example :
gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -I/usr/local/include -m64 -g -Wl,-rpath=/usr/local/lib64,--enable-new-dtags -malign-double -m128bit-long-double -mpc80 -D_LARGEFILE64_SOURCE -fvisibility=hidden -Wall -MT mpicalc-mpicalc.o -MD -MP -MF .deps/mpicalc-mpicalc.Tpo -c -o mpicalc-mpicalc.o `test -f 'mpicalc.c' || echo './'`mpicalc.c
mv -f .deps/mpicalc-mpicalc.Tpo .deps/mpicalc-mpicalc.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -I/usr/local/include -m64 -g -Wl,-rpath=/usr/local/lib64,--enable-new-dtags -malign-double -m128bit-long-double -mpc80 -D_LARGEFILE64_SOURCE -fvisibility=hidden -Wall -o mpicalc mpicalc-mpicalc.o libgcrypt.la -ldl -L/usr/local/lib64 -lgpg-error
libtool: link: warning: library `/usr/local/lib64/libgpg-error.la' was moved.
libtool: link: warning: library `/usr/local/lib64/libgpg-error.la' was moved.
Regardless the compile finished with reasonable output thus :
$ readelf -d ./src/.libs/libgcrypt.so.20.2.1
Dynamic section at offset 0x157dc0 contains 29 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libgpg-error.so.0]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000e (SONAME) Library soname: [libgcrypt.so.20]
0x000000000000001d (RUNPATH) Library runpath: [/usr/local/lib64]
0x000000000000000c (INIT) 0xb710
0x000000000000000d (FINI) 0x11c470
0x0000000000000019 (INIT_ARRAY) 0x3571e0
0x000000000000001b (INIT_ARRAYSZ) 16 (bytes)
0x000000000000001a (FINI_ARRAY) 0x3571f0
0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)
0x000000006ffffef5 (GNU_HASH) 0x1f0
0x0000000000000005 (STRTAB) 0x24c8
0x0000000000000006 (SYMTAB) 0x950
0x000000000000000a (STRSZ) 4544 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000003 (PLTGOT) 0x358000
0x0000000000000002 (PLTRELSZ) 1944 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0xaf78
0x0000000000000007 (RELA) 0x3970
0x0000000000000008 (RELASZ) 30216 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffffc (VERDEF) 0x38d8
0x000000006ffffffd (VERDEFNUM) 2
0x000000006ffffffe (VERNEED) 0x3910
0x000000006fffffff (VERNEEDNUM) 2
0x000000006ffffff0 (VERSYM) 0x3688
0x000000006ffffff9 (RELACOUNT) 1253
0x0000000000000000 (NULL) 0x0
$
A few tests failed where I note the README claims :
--enable-hmac-binary-check
Include support to check the binary at runtime
against a HMAC checksum. This works only in FIPS
mode and on systems providing the dladdr function.
Perhaps that is a problem on Red Hat Enterprise Linux 7.4 but I don't
know. There is no reason that I can see why the non-POSIX Glibc
extension does not exist on this system but perhaps it is an error to
use the extension? I would not know but the test fails:
.
.
.
PASS: prime
libgcrypt selftest: binary (0): No such file or directory (/usr/local/build/libgcrypt-1.8.1_3.10.0-693.11.1.el7.x86_64.001/src/.libs/.libgcrypt.so.20.hmac)
basic: running self-test failed
FAIL: basic
.
.
.
PASS: t-cv25519
now running 'basic' test with all hardware features disabled.
libgcrypt selftest: binary (0): No such file or directory (/usr/local/build/libgcrypt-1.8.1_3.10.0-693.11.1.el7.x86_64.001/src/.libs/.libgcrypt.so.20.hmac)
basic: running self-test failed
FAIL: basic-disable-all-hwf
.
.
.
Perhaps this is related to some "FIPS mode" requirement ?
I did not see anything in the README nor elsewhere to see what this "FIPS mode" was.
All other tests seems to run fine and this includes the really long tests with 256G of data fed
to the various SHA hash algorithms. However I do note that the "cycles/byte" column is always
just a blank and someone spelled megabytes as "mebibytes" somewhere. May want to fix that
in line 581 of tests/bench-slope.c thus :
567 static void
568 bench_print_header (int algo_width, const char *algo_name)
569 {
570 if (csv_mode)
571 {
572 gcry_free (current_algo_name);
573 current_algo_name = gcry_xstrdup (algo_name);
574 }
575 else
576 {
577 if (algo_width < 0)
578 printf (" %-*s | ", -algo_width, algo_name);
579 else
580 printf (" %-*s | ", algo_width, algo_name);
581 printf ("%14s %15s %13s\n", "nanosecs/byte", "mebibytes/sec",
582 "cycles/byte");
583 }
584 }
585
So that output looks like this :
PASS: benchmark
Note: bench-slope running in quick regression test mode.
Hash:
| nanosecs/byte mebibytes/sec cycles/byte
MD5 | 13.96 ns/B 68.32 MiB/s - c/B
SHA1 | 28.70 ns/B 33.23 MiB/s - c/B
RIPEMD160 | 41.97 ns/B 22.72 MiB/s - c/B
TIGER192 | 14.31 ns/B 66.66 MiB/s - c/B
SHA256 | 61.45 ns/B 15.52 MiB/s - c/B
SHA384 | 52.70 ns/B 18.10 MiB/s - c/B
SHA512 | 49.12 ns/B 19.42 MiB/s - c/B
SHA224 | 54.79 ns/B 17.41 MiB/s - c/B
MD4 | 7.36 ns/B 129.6 MiB/s - c/B
CRC32 | 5.99 ns/B 159.3 MiB/s - c/B
CRC32RFC1510 | 5.96 ns/B 160.1 MiB/s - c/B
CRC24RFC2440 | 6.04 ns/B 157.8 MiB/s - c/B
WHIRLPOOL | 8.64 ns/B 110.4 MiB/s - c/B
TIGER | 10.36 ns/B 92.03 MiB/s - c/B
TIGER2 | 10.36 ns/B 92.04 MiB/s - c/B
GOSTR3411_94 | 136.8 ns/B 6.97 MiB/s - c/B
STRIBOG256 | 134.8 ns/B 7.07 MiB/s - c/B
STRIBOG512 | 147.3 ns/B 6.48 MiB/s - c/B
GOSTR3411_CP | 170.6 ns/B 5.59 MiB/s - c/B
SHA3-224 | 15.26 ns/B 62.48 MiB/s - c/B
SHA3-256 | 16.17 ns/B 58.99 MiB/s - c/B
SHA3-384 | 21.07 ns/B 45.27 MiB/s - c/B
SHA3-512 | 30.34 ns/B 31.43 MiB/s - c/B
SHAKE128 | 12.71 ns/B 75.05 MiB/s - c/B
SHAKE256 | 14.90 ns/B 64.01 MiB/s - c/B
BLAKE2B_512 | 24.20 ns/B 39.40 MiB/s - c/B
BLAKE2B_384 | 24.66 ns/B 38.67 MiB/s - c/B
BLAKE2B_256 | 24.69 ns/B 38.62 MiB/s - c/B
BLAKE2B_160 | 22.47 ns/B 42.45 MiB/s - c/B
BLAKE2S_256 | 38.31 ns/B 24.89 MiB/s - c/B
BLAKE2S_224 | 38.68 ns/B 24.65 MiB/s - c/B
BLAKE2S_160 | 38.83 ns/B 24.56 MiB/s - c/B
BLAKE2S_128 | 38.85 ns/B 24.55 MiB/s - c/B
=
Not sure what cycles per byte should be about.
In any case the testsuite runs for hours and then outputs some spooky results :
======================================
2 of 28 tests failed
Please report to http://bugs.gnupg.org
======================================
gmake[2]: *** [Makefile:864: check-TESTS] Error 1
gmake[2]: Leaving directory '/usr/local/build/libgcrypt-1.8.1_3.10.0-693.11.1.el7.x86_64.001/tests'
gmake[1]: *** [Makefile:987: check-am] Error 2
gmake[1]: Leaving directory '/usr/local/build/libgcrypt-1.8.1_3.10.0-693.11.1.el7.x86_64.001/tests'
gmake: *** [Makefile:477: check-recursive] Error 1
$
Perhaps the "--enable-hmac-binary-check" should be checked in the
configure stage for the required mystery "FIPS mode" as well as
the needed Glibc extension dladdr?
In any case the result can not be installed as is with tests failed.
Dennis Clarke