Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 904083 - ERROR: dev-libs/libgcrypt-1.10.2::gentoo_prefix failed (compile phase)
Summary: ERROR: dev-libs/libgcrypt-1.10.2::gentoo_prefix failed (compile phase)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: ARM64 OS X
: Normal normal
Assignee: Gentoo Prefix
URL: https://dev.gnupg.org/T6442
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-09 21:42 UTC by Askar Bektassov
Modified: 2023-04-25 14:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,171.08 KB, application/octet-stream)
2023-04-09 21:44 UTC, Askar Bektassov
Details
config.log (config.log,161.23 KB, text/plain)
2023-04-09 21:46 UTC, Askar Bektassov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Askar Bektassov 2023-04-09 21:42:27 UTC
Tried to upgrade libgcrypt (installed version 1.10.1-r3). Unsure if I am missing proper reference to sys/random.h, fcntl.h and unsure where GRND_RANDOM is usually declared.

Reproducible: Always

Steps to Reproduce:
1. emerge libgcrypt
Actual Results:  
/Users/askarbektassov/Gentoo/var/tmp/portage/dev-libs/libgcrypt-1.10.2/work/libgcrypt-1.10.2/random/rndgetentropy.c:98:21: warning: implicit declaration of function 'getrandom'; did you mean 'srandom'? [-Wimplicit-function-declaration]
   98 |               ret = getrandom (buffer, nbytes, GRND_RANDOM);
      |                     ^~~~~~~~~
      |                     srandom
/Users/askarbektassov/Gentoo/var/tmp/portage/dev-libs/libgcrypt-1.10.2/work/libgcrypt-1.10.2/random/rndgetentropy.c:98:48: error: 'GRND_RANDOM' undeclared (first use in this function)
   98 |               ret = getrandom (buffer, nbytes, GRND_RANDOM);
      |                                                ^~~~~~~~~~~
/Users/askarbektassov/Gentoo/var/tmp/portage/dev-libs/libgcrypt-1.10.2/work/libgcrypt-1.10.2/random/rndgetentropy.c:98:48: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [Makefile:514: rndgetentropy.lo] Error 1

Expected Results:  
Successful completion
Comment 1 Askar Bektassov 2023-04-09 21:43:31 UTC
askarbektassov@Askars-MBP ~/Gentoo/var/db/repos/gentoo/dev-libs/libgcrypt $ emerge --info
Portage 3.0.34 (python 3.10.4-final-0, prefix/darwin/macos/12.0/arm64/gcc, gcc-12.1.0, unavailable, 22.4.0 arm64)
=================================================================
System uname: macOS-13.3-arm64-arm-64bit
Timestamp of repository gentoo_prefix: Sun, 09 Apr 2023 19:26:32 +0000
Head commit of repository gentoo_prefix: 072fd372872ae697a169fa108085ae6e33137dda
sh bash 5.2_p15-r2
app-misc/pax-utils:        1.3.7::gentoo_prefix
app-shells/bash:           5.2_p15-r2::gentoo_prefix
dev-lang/perl:             5.36.0-r2::gentoo_prefix
dev-lang/python:           3.10.4::gentoo_prefix
dev-util/cmake:            3.26.3::gentoo_prefix
dev-util/meson:            1.0.1::gentoo_prefix
sys-apps/baselayout:       2.13-r1::gentoo_prefix
sys-devel/autoconf:        2.71-r6::gentoo_prefix
sys-devel/automake:        1.16.5-r1::gentoo_prefix
sys-devel/binutils-config: 5.1-r5::gentoo_prefix
sys-devel/gcc:             12.1.0::gentoo_prefix
sys-devel/gcc-config:      2.7-r1::gentoo_prefix
sys-devel/libtool:         2.4.7-r1::gentoo_prefix
sys-devel/make:            4.4.1::gentoo_prefix
Repositories:

gentoo_prefix
    location: /Users/askarbektassov/Gentoo/var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: no

a5kar
    location: /Users/askarbektassov/Gentoo/var/db/repos/a5kar
    masters: gentoo_prefix

ACCEPT_KEYWORDS="~arm64-macos ~x64-macos"
ACCEPT_LICENSE="@FREE"
CBUILD="arm64-apple-darwin21"
CFLAGS=" -O2 -pipe"
CHOST="arm64-apple-darwin21"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release"
CONFIG_SHELL="/Users/askarbektassov/Gentoo/bin/bash"
CXXFLAGS=" -O2 -pipe"
DISTDIR="/Users/askarbektassov/Gentoo/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS=""
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live case-insensitive-fs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nostrip parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distfiles.prefix.bitzolder.nl/prefix"
LDFLAGS="-Wl,-dead_strip_dylibs"
LEX="flex"
MAKEOPTS="-j6"
PKGDIR="/Users/askarbektassov/Gentoo/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/Users/askarbektassov/Gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/Users/askarbektassov/Gentoo/var/tmp"
SHELL="/Users/askarbektassov/Gentoo/bin/zsh"
USE="aqua arm64-macos bzip2 coreaudio gdbm ipv6 libglvnd ncurses nls nptl objc objc++ prefix prefix-guest readline ssl test-rust unicode x64-macos zlib" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="Darwin" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby30" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LANG, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-09 21:44:12 UTC
Please always include the full build.log. config.log too here please.
Comment 3 Askar Bektassov 2023-04-09 21:44:16 UTC
Created attachment 859780 [details]
build.log
Comment 4 Askar Bektassov 2023-04-09 21:46:52 UTC
Created attachment 859781 [details]
config.log
Comment 5 Fabian Groffen gentoo-dev 2023-04-25 13:33:46 UTC
confirmed on Darwin 17 during bootstrap
Comment 6 Fabian Groffen gentoo-dev 2023-04-25 14:41:02 UTC
we can apply Werner's patch:

         if (fips_mode ())
           {
             /* DRBG chaining defined in SP 800-90A (rev 1) specify  */
#ifdef GRND_RANDOM
             ret = getrandom (buffer, nbytes, GRND_RANDOM);
#else
             ret = -1;
             gpg_err_set_errno (ENOSYS);
#endif
           }
Comment 7 Larry the Git Cow gentoo-dev 2023-04-25 14:50:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89dc47953394cbd86d303b939a7c77e1905a2af8

commit 89dc47953394cbd86d303b939a7c77e1905a2af8
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2023-04-25 14:49:09 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2023-04-25 14:50:14 +0000

    dev-libs/libgcrypt-1.10.2: fix compilation on Darwin, #904083
    
    Add patch as suggested on upstream bug to fix compilation on non-Linux.
    
    Closes: https://bugs.gentoo.org/904083
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 .../libgcrypt/files/libgcrypt-1.10.2-darwin.patch    | 20 ++++++++++++++++++++
 dev-libs/libgcrypt/libgcrypt-1.10.2.ebuild           |  1 +
 2 files changed, 21 insertions(+)