Mailing List Archive

Error when making "libgcrypt" [rndgetentropy.c ]
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@kasaneiro.jp
Re: Error when making "libgcrypt" [rndgetentropy.c ] [ In reply to ]
Hi!

> rndgetentropy.c:98:48: error: use of undeclared identifier 'GRND_RANDOM'
> ret = getrandom (buffer, nbytes, GRND_RANDOM);

> OS : macOS 13.3.1 (a) / Command Line Tools for Xcode 14.3
> Platform : Darwin (x86_64-apple-darwin22.4.0)

There is a glitch in 1.10 which affects macOS. Please see

https://dev.gnupg.org/T6442

which has a patch. It should also be possible to use

./configure --enable-random=linux

which uses the old /dev/random entrop gatherer.


Shalom-Salam,

Werner

--
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein
Re: Error when making "libgcrypt" [rndgetentropy.c ] [ In reply to ]
Hi.

on Fri, 05 May 2023 10:45:52 +0200
Werner Koch <wk@gnupg.org> wrote:

>> rndgetentropy.c:98:48: error: use of undeclared identifier 'GRND_RANDOM'
>> ret = getrandom (buffer, nbytes, GRND_RANDOM);
>
>> OS : macOS 13.3.1 (a) / Command Line Tools for Xcode 14.3
>> Platform : Darwin (x86_64-apple-darwin22.4.0)
>
> There is a glitch in 1.10 which affects macOS. Please see
>
> https://dev.gnupg.org/T6442
>
> which has a patch. It should also be possible to use
>
> ./configure --enable-random=linux
>
> which uses the old /dev/random entrop gatherer.

I applied the three patches listed on the indicated webpage,
and make went through without any problems.

Thank you very much for your help.

Sincerely yours

---
WATANABE, Takeo
take@kasaneiro.jp

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users