Error when making "libgcrypt" [rndgetentropy.c ]
WATANABE Takeo
take at kasaneiro.jp
Thu May 4 15:15:18 CEST 2023
Dear. GnuPG-Users.
When making "libgcrypt ver1.10.2" and "libgcrypt ver1.8.10",
I got the following error and the compilation could not proceed.
(Output is line-breaked where appropriate.)
---
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/usr/local/include -g
-O2 -fno-delete-null-pointer-checks -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat
-Wno-format-y2k -Wformat-security -W -Wextra -Wbad-function-cast -Wwrite-strings
-Wdeclaration-after-statement -Wno-missing-field-initializers -Wno-sign-compare -Wpointer-arith
-MT rndgetentropy.lo -MD -MP -MF .deps/rndgetentropy.Tpo -c rndgetentropy.c -fno-common
-DPIC -o .libs/rndgetentropy.orndgetentropy.c:98:21:
error: call to undeclared function 'getrandom'; ISO C99 and later do not support implicit
function declarations [-Wimplicit-function-declaration]
ret = getrandom (buffer, nbytes, GRND_RANDOM);
^
rndgetentropy.c:98:48: error: use of undeclared identifier 'GRND_RANDOM'
ret = getrandom (buffer, nbytes, GRND_RANDOM);
^
2 errors generated.
make[2]: *** [rndgetentropy.lo] Error 1
make[2]: Leaving directory `/Users/take/Downloads/GnuPG/libgcrypt-1.10.2/random'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/Users/take/Downloads/GnuPG/libgcrypt-1.10.2'
make: *** [all] Error 2
---
Unfortunately I don't know how to make this 'make' passable.
I am very sorry that this is not about "GnuPG".
Could you please advise me how to avoid this error?
My environment is as follows.
Also, ". /configure" output is attached.
OS : macOS 13.3.1 (a) / Command Line Tools for Xcode 14.3
Platform : Darwin (x86_64-apple-darwin22.4.0)
Sincerely yours.
---
WATANABE, Takeo
take at kasaneiro.jp
-------------- next part --------------
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-apple-darwin22.4.0
checking host system type... x86_64-apple-darwin22.4.0
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
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 dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/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 whether make sets $(MAKE)... (cached) yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) 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) awk
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/local/bin/nm -B
checking the name lister (/usr/local/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin22.4.0 file names to x86_64-apple-darwin22.4.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin22.4.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/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 /usr/local/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -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 (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin22.4.0 dyld
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... no
checking for windres... no
checking spawn.h usability... yes
checking spawn.h presence... yes
checking for spawn.h... yes
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 sm4
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 sm3
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 and cipher assembler modules are requested... yes
checking whether memory guard is requested... no
checking whether to run large data tests... no
checking whether 'soft' HW feature bits are forced on... no
checking whether use of capabilities is requested... no
checking whether a HMAC binary check is requested... no
checking whether jitter entropy support is requested... yes
checking whether padlock support is requested... yes
checking whether AESNI support is requested... yes
checking whether SHAEXT 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 PPC crypto support is requested... yes
checking whether a -O flag munging is requested... yes
checking whether a instrumentation (-fprofile, -fsanitize) munging is requested... yes
checking whether to enable AMD64 as(1) feature detection... yes
checking for gpg-error-config... no
checking for gpgrt-config... /usr/local/bin/gpgrt-config
configure: Use gpgrt-config with /usr/local/lib as gpg-error-config
checking for GPG Error - version >= 1.27... yes (1.47)
checking for pthread_create in -lpthread... yes
checking for library containing setsockopt... none required
checking for library containing setsockopt... (cached) none required
checking for unistd.h... (cached) yes
checking sys/auxv.h usability... no
checking sys/auxv.h presence... no
checking for sys/auxv.h... no
checking sys/random.h usability... yes
checking sys/random.h presence... yes
checking for sys/random.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking for pid_t... yes
checking for byte... no
checking for ushort... yes
checking for u16... no
checking for u32... no
checking for u64... no
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 for __builtin_ctzl... yes
checking for __builtin_clz... yes
checking for __builtin_clzl... yes
checking for __sync_synchronize... yes
checking whether the variable length arrays are supported... yes
checking whether the visibility attribute is supported... no
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 whether GCC assembler supports for CFI directives... no
checking whether GCC assembler supports for ELF directives... no
checking for _ prefix in compiled symbols... yes
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 SHA Extensions 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 VAES and VPCLMUL instructions... yes
checking whether GCC inline assembler supports BMI2 instructions... yes
checking whether GCC assembler handles division correctly... no
checking whether GCC assembler handles division correctly with "-Wa,--divide"... no
checking whether GCC assembler is compatible for amd64 assembly implementations... no
checking whether GCC assembler is compatible for Intel syntax assembly implementations... no
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 whether compiler supports PowerPC AltiVec/VSX intrinsics... n/a
checking whether GCC inline assembler supports PowerPC AltiVec/VSX/crypto instructions... n/a
checking whether GCC inline assembler supports PowerISA 3.00 instructions... n/a
checking whether GCC inline assembler supports zSeries instructions... n/a
checking whether GCC inline assembler supports zSeries vector 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 getauxval... no
checking for elf_aux_info... no
checking for explicit_bzero... no
checking for explicit_memset... no
checking for getentropy... 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 random device... yes
configure: checking for cc features
checking if gcc supports -fno-delete-null-pointer-checks... yes
checking if gcc supports -Wno-missing-field-initializers... yes
checking if gcc supports -Wpointer-arith... yes
checking whether non excutable stack support is requested... yes
checking whether assembler supports --noexecstack option... no
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/libgcrypt.pc
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.10.2 has been configured as follows:
Platform: Darwin (x86_64-apple-darwin22.4.0)
Hardware detection module: libgcrypt_la-hwf-x86
Enabled cipher algorithms: arcfour blowfish cast5 des aes twofish
serpent rfc2268 seed camellia idea salsa20
gost28147 chacha20 sm4
Enabled digest algorithms: crc gostr3411-94 md4 md5 rmd160 sha1
sha256 sha512 sha3 tiger whirlpool stribog
blake2 sm3
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
FIPS module version:
Try using Padlock crypto: yes
Try using AES-NI crypto: yes
Try using Intel SHAEXT: 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
Try using PPC crypto: n/a
More information about the Gnupg-users
mailing list