Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 701316

Summary: dev-db/cockroach-19.1.1: iaesx64.s:1: Error: junk at end of line
Product: Gentoo Linux Reporter: Vincent de Phily <moltonel>
Component: Current packagesAssignee: William Hubbs <williamh>
Status: CONFIRMED ---    
Severity: normal CC: jstein, zmedico
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
iaesx64.s

Description Vincent de Phily 2019-11-27 11:03:51 UTC
Cockroach 19.1.1 fails to build:


as   -o iaesx64.o /var/tmp/portage/dev-db/cockroach-19.1.1/work/cockroach-v19.1.1/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/crypto/builtin/aes/iaesx64.s
/var/tmp/portage/dev-db/cockroach-19.1.1/work/cockroach-v19.1.1/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/crypto/builtin/aes/iaesx64.s: Assembler messages:
/var/tmp/portage/dev-db/cockroach-19.1.1/work/cockroach-v19.1.1/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/crypto/builtin/aes/iaesx64.s:1: Error: junk at end of line, first unrecognized character is `['
/var/tmp/portage/dev-db/cockroach-19.1.1/work/cockroach-v19.1.1/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/crypto/builtin/aes/iaesx64.s:2: Error: junk at end of line, first unrecognized character is `['
/var/tmp/portage/dev-db/cockroach-19.1.1/work/cockroach-v19.1.1/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/crypto/builtin/aes/iaesx64.s:4: Error: no such instruction: `copyright (c)2010,Intel Corporation'
/var/tmp/portage/dev-db/cockroach-19.1.1/work/cockroach-v19.1.1/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/crypto/builtin/aes/iaesx64.s:5: Error: no such instruction: `all rights reserved.'
/var/tmp/portage/dev-db/cockroach-19.1.1/work/cockroach-v19.1.1/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/crypto/builtin/aes/iaesx64.s:7: Error: no such instruction: `redistribution and use in source and binary forms,with or without'

Interestingly, the iaesx64.s file is identical to the one in app-crypt/mit-krb5-1.17-r1 (all the files inside krb5/src/lib/ are) but it compiles fine there. It is tempting to fix this build by using system-krb5.

There are also a few deprecation warnings apparently turned into error ("cc1plus: all warnings being treated as errors"), which we should really bug upstream about.

Reproducible: Always
Comment 1 Vincent de Phily 2019-11-27 11:05:31 UTC
Created attachment 597592 [details]
build.log
Comment 2 Vincent de Phily 2019-11-27 11:06:00 UTC
Created attachment 597594 [details]
iaesx64.s
Comment 3 Vincent de Phily 2019-11-27 11:06:43 UTC
 emerge --info cockroach
Portage 2.3.79 (python 3.6.9-final-0, default/linux/amd64/17.0/hardened, gcc-9.2.0, glibc-2.29-r2, 5.3.13-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.3.13-gentoo-x86_64-Intel-R-_Core-TM-_i7-9750H_CPU_@_2.60GHz-with-gentoo-2.6
KiB Mem:    16157536 total,   6792188 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Wed, 27 Nov 2019 10:06:16 +0000
Head commit of repository gentoo: d410adba0c14be6279ce4feb870fb4e707fdd03b

sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.9::gentoo
dev-util/cmake:           3.14.6::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.3-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: git://anongit.gentoo.org/repo/sync/gentoo.git
    priority: -1000
    sync-git-verify-commit-signature: yes

moltonel
    location: /home/work/c/ebuilds
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@BINARY-REDISTRIBUTABLE MSttfEULA Cockroach MicroChip-SDCC Atmel shmux no-source-code Broadcom bh-luxi unRAR MaxMind2 mplus-fonts BAEKMUK myspell-en_CA-KevinAtkinson vlgothic quake1-textures LDP-1a CC-BY-SA-1.0 LDP-1 man-pages man-pages-posix-2013 wxWinFDL-3 man-pages-posix CC-SA-1.0 UbuntuFontLicense-1.0 CC-PD Texinfo-manual BitstreamVera Unicode_Fonts_for_Ancient_Scripts FDL-1.1+ GPL-1 GPL-2 CC-BY-SA-4.0 FreeArt CC-BY-SA-3.0 CC-BY-SA-2.5 CC-BY-3.0 GPL-2+ GPL-3 CC-BY-2.0 FDL-1.3 FDL-1.1 Arphic OFL-1.1 OPL FDL-1.2 CC-BY-SA-2.0 GPL-1+ GPL-3+ FDL-1.2+ FDL-1.3+ CC-BY-2.5 OFL IPAfont CC-BY-4.0 BSD IBM GPL-2 wxWinLL-3 UoI-NCSA EPL-1.0 Sleepycat Artistic EPL-2.0 BSD-2 CPAL-1.0 AGPL-3 EUPL-1.1 GPL-2+ ZPL GPL-3 MPL-1.1 Ms-PL POSTGRESQL QPL NOSA ECL-2.0 CNRI Apache-2.0 OFL-1.1 Watcom-1.0 ZLIB LGPL-3+ APL-1.0 Boost-1.0 Apache-1.1 nethack W3C APSL-2 PSF-2 CPL-1.0 LPPL-1.3c AGPL-3+ AFL-3.0 GPL-1+ PHP-3.01 GPL-3+ LGPL-3 CDDL ISC MIT MPL-2.0 LGPL-2+ MPL-1.0 OSL-2.1 LGPL-2.1 LGPL-2.1+ HPND Artistic-2 IPAfont PHP-3 perforce psutils mpich2 photopc RSA xboing Toyoda NCSA-HDF Old-MIT rwpng freetts JOVE Xdebug otter htmlc netcat SVFL BZIP2 LPPL-1.3b tm-align alternate Info-ZIP w3m gd LIBGLOSS FLEX mm SMAIL DES dom4j LLVM-Grant symlinks tcp_wrappers_license File-MMagic Khronos-CLHPP canfep Snd CDDL-1.1 CDDL-Schily URT Ispell rc FLTK TeX-other-free bea.ri.jsr173 Time-Format Flashpix LPPL-1.3 PHP-2.02 JNIC ipx-utils minpack TeX Emacs VTK xvt UCAR-Unidata ElementTree Subversion XC BSD-1 NEWLIB ZSH Princeton pngnq buddy imagemagick CAOSL Crypt-IDEA BSD-with-attribution pngcrush gsm bufexplorer.vim shrimp rdisc CeCILL-C libmng ErlPL-1.1 regexp-UofT matplotlib PCRE repoze Mail-Sendmail Interbase-1.0 lsof the-Click-license Mini-XML iASL HTML-Tidy AIFFWriter.m CPL-0.5 MIT-with-advertising AMPAS docbook FastCGI BEER-WARE inner-net ipadic xbatt Time-modules totd feh flexmock FVWM scanlogd Sendmail-Open-Source icu DUMB-0.9.3 LambdaMOO SNIA libpng2 x2x torque-2.5 boehm-gc eGenixPublic-1.1 IDPL xtrs Allegro Openwall openafs-krb5-a ngrep CMake CRACKLIB JDOM libpng libtiff Sendmail SSLeay tcltk tablelist IBM BSD GPL-1 GPL-2 LGPL-3-with-linking-exception UoI-NCSA Sleepycat metapackage GPL-2-with-classpath-exception WTFPL-2 PSF-2.3 GPL-3+-with-cuda-openssl-exception Unlicense BSD-2 PYTHON GPL-2-with-MySQL-FLOSS-exception AGPL-3 gcc-runtime-library-exception-3.1 LGPL-2-with-linking-exception Ruby qwt FTL GPL-2+-with-openssl-exception GPL-3+-with-opencl-exception GPL-2+ unicode ZPL Transmission-OpenSSL-exception GPL-3 GPL-2-with-exceptions Apache-2.0-with-LLVM-exceptions SGI-B-2.0 ECL-2.0 GPL-2-with-font-exception Apache-2.0 UPX-exception ZLIB LGPL-3+ PSF-2.2 Boost-1.0 vim Clarified-Artistic GPL-3+-with-opencl-openssl-exception GPL-3-with-openssl-exception W3C PSF-2 wxWinLL-3.1 libgcc AGPL-3+ GPL-1+ GPL-3+-with-cuda-exception Nokia-Qt-LGPL-Exception-1.1 GPL-3+ LGPL-3 ISC Clear-BSD MIT CeCILL-2 MPL-2.0 PSF-2.4 Ruby-BSD LGPL-2+ GPL-2-with-linking-exception LGPL-2.1 LGPL-2.1+ LGPL-2.1-with-linking-exception libstdc++ public-domain HPND Artistic-2 GPL-3-with-font-exception OPENLDAP tanuki-community LGPL-2 CC0-1.0 IJG EPL-1.0 OSL-1.1 Zend-2.0 EPL-2.0 gnuplot CPAL-1.0 EUPL-1.1 QPL-1.0 OSL-2.0 openssl Ms-PL MPL-1.1 QPL CNRI LPPL-1.2 Apache-1.1 APSL-2 AFL-2.1 CPL-1.0 AFL-3.0 NPL-1.1 CDDL MPL-1.0 OSL-2.1 Apache-1.0 BSD-4 PHP-3.01 intel-ucode ISSL ipw2100-fw ipw3945 SmartLabs JSON sun-jlfgr LSI-tw_cli bonnie linux-fw-redistributable Amazon NVIDIA-r1 freedist ipw2200-fw qlogic-fibre-channel-firmware"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build --changed-deps-report=y"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -march=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=native -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/usr/share/locale/uk /usr/share/locale/ru /usr/share/locale/sv /usr/share/locale/zh_CN /usr/share/locale/pt_BR /usr/share/locale/pl /usr/share/locale/ta /usr/share/locale/mr /usr/share/locale/kn"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12 -l12.1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/var/tmp"
USE="X aac acl activities akonadi alsa amd64 apache2 apng avahi bash-completion bluetooth brightness-control btrfs bzip2 caps cdda cddb cdrom clang crash-reporter crypt cups cxx dbus declarative dri dvd ebook egl elogind emacs encode epub erlang exif ffmpeg fftw flac fontconfig gif git gstreamer gudev hardened http2 iconv icu ipv6 jit jpeg jpeg2k json jumbo-build kde kdepim kwallet libtirpc lm-sensors lto lzma marble markdown mng mp3 mpeg mplayer mtp multilib mysql ncurses nls nptl ogg openexr opengl openmp openssl opus orc otr pam pcre pdf pgo pie plasma pm-utils png policykit postgres printsupport prison pulseaudio python qrcode qt5 quiche readline rust samba script sddm seccomp semantic-desktop shapefile silk spatialite speex split-usr sql sqlite ssl ssp startup-notification svg sysstat system-cairo system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite taglib theora threads tiff truetype udev udisks unicode upnp usb uxa v4l video vlc vnc vorbis wayland webstart wifi x264 xattr xcb xcomposite xmp xtpax xvid xvmc zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" 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" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="keyboard mouse libinput evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="intel i915 i965 iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Zac Medico gentoo-dev 2020-12-25 16:42:30 UTC
I experienced the same error, and I found these related settings in the krb5/config.log:

AESNI_FLAGS='-D__linux__ -f elf -m amd64'
AESNI_OBJ='iaesx64.o'

I found that this command completes successfully:

yasm -D__linux__ -f elf -m amd64 iaesx64.s -o iaesx64.o

For some reason, the build system calls `as` on this file instead of yasm, and apparently that's why it fails.
Comment 5 Zac Medico gentoo-dev 2020-12-25 20:39:52 UTC
The trigger is is @AESNI_OBJ@ which contains iaesx64.o here and causes it to be built with `as` instead of yasm:

https://github.com/cockroachdb/krb5/blob/97e3c42b2a89a2ec60eb93d3f974769e3e3cbdc5/src/lib/crypto/builtin/aes/Makefile.in#L16
Comment 6 Zac Medico gentoo-dev 2020-12-25 21:11:13 UTC
If we remove the @AESNI_OBJ@ reference from aes/Makefile.in, then it fails earlier due to undefined references:


> : updated OBJS.ST
> rm -f libgssrpc.a
> building static gssrpc library
> set -x; objlist=`set -x && perl -p -e 'BEGIN { $SIG{__WARN__} = sub {die @_} }; $e=$ARGV; $e =~ s/OBJS\...$//; s/^/ /; s/ $//; s/ / $e/g;' OBJS.ST` && ar cq libgssrpc.a $objlist
> ++ set -x
> ++ perl -p -e 'BEGIN { $SIG{__WARN__} = sub {die @_} }; $e=$ARGV; $e =~ s/OBJS\...$//; s/^/ /; s/ $//; s/ / $e/g;' OBJS.ST
> + objlist=' auth_none.o auth_unix.o authgss_prot.o authunix_prot.o auth_gss.o auth_gssapi.o auth_gssapi_misc.o bindresvport.o clnt_generic.o clnt_perror.o clnt_raw.o clnt_simple.o clnt_tcp.o clnt_udp.o dyn.o rpc_dtablesize.o get_myaddress.o getrpcport.o pmap_clnt.o pmap_getmaps.o pmap_getport.o pmap_prot.o pmap_prot2.o pmap_rmt.o rpc_prot.o rpc_commondata.o rpc_callmsg.o svc.o svc_auth.o svc_auth_gss.o svc_auth_gssapi.o svc_auth_none.o svc_auth_unix.o svc_raw.o svc_run.o svc_simple.o svc_tcp.o svc_udp.o xdr.o xdr_array.o xdr_float.o xdr_mem.o xdr_rec.o xdr_reference.o xdr_stdio.o xdr_sizeof.o xdr_alloc.o'
> + ar cq libgssrpc.a auth_none.o auth_unix.o authgss_prot.o authunix_prot.o auth_gss.o auth_gssapi.o auth_gssapi_misc.o bindresvport.o clnt_generic.o clnt_perror.o clnt_raw.o clnt_simple.o clnt_tcp.o clnt_udp.o dyn.o rpc_dtablesize.o get_myaddress.o getrpcport.o pmap_clnt.o pmap_getmaps.o pmap_getport.o pmap_prot.o pmap_prot2.o pmap_rmt.o rpc_prot.o rpc_commondata.o rpc_callmsg.o svc.o svc_auth.o svc_auth_gss.o svc_auth_gssapi.o svc_auth_none.o svc_auth_unix.o svc_raw.o svc_run.o svc_simple.o svc_tcp.o svc_udp.o xdr.o xdr_array.o xdr_float.o xdr_mem.o xdr_rec.o xdr_reference.o xdr_stdio.o xdr_sizeof.o xdr_alloc.o
> ranlib libgssrpc.a
> rm -f ../../lib/libgssrpc.a
> (cd ../../lib && ln -s rpc/libgssrpc.a .)
> making all in lib/rpc/unit-test...
> gcc -DHAVE_CONFIG_H  -I../../../include -I/var/tmp/portage/dev-db/cockroach-20.1.10/work/cockroach-v20.1.10/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/include  -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE  -g -O2 -Wall -Wcast-align -Wshadow -Wmissing-prototypes -Wno-format-zero-length -Woverflow -Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare -Werror=uninitialized -Wno-maybe-uninitialized -Werror=pointer-arith -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=discarded-qualifiers -Werror=implicit-int -Werror=declaration-after-statement -Werror-implicit-function-declaration -pthread  -c /var/tmp/portage/dev-db/cockroach-20.1.10/work/cockroach-v20.1.10/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/rpc/unit-test/client.c
> gcc -DHAVE_CONFIG_H  -I../../../include -I/var/tmp/portage/dev-db/cockroach-20.1.10/work/cockroach-v20.1.10/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/include  -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE  -g -O2 -Wall -Wcast-align -Wshadow -Wmissing-prototypes -Wno-format-zero-length -Woverflow -Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare -Werror=uninitialized -Wno-maybe-uninitialized -Werror=pointer-arith -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=discarded-qualifiers -Werror=implicit-int -Werror=declaration-after-statement -Werror-implicit-function-declaration -pthread  -c /var/tmp/portage/dev-db/cockroach-20.1.10/work/cockroach-v20.1.10/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/rpc/unit-test/rpc_test_clnt.c
> gcc -DHAVE_CONFIG_H  -I../../../include -I/var/tmp/portage/dev-db/cockroach-20.1.10/work/cockroach-v20.1.10/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/include  -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE  -g -O2 -Wall -Wcast-align -Wshadow -Wmissing-prototypes -Wno-format-zero-length -Woverflow -Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare -Werror=uninitialized -Wno-maybe-uninitialized -Werror=pointer-arith -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=discarded-qualifiers -Werror=implicit-int -Werror=declaration-after-statement -Werror-implicit-function-declaration -pthread  -c /var/tmp/portage/dev-db/cockroach-20.1.10/work/cockroach-v20.1.10/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/rpc/unit-test/server.c
> gcc -DHAVE_CONFIG_H  -I../../../include -I/var/tmp/portage/dev-db/cockroach-20.1.10/work/cockroach-v20.1.10/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/include  -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE  -g -O2 -Wall -Wcast-align -Wshadow -Wmissing-prototypes -Wno-format-zero-length -Woverflow -Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare -Werror=uninitialized -Wno-maybe-uninitialized -Werror=pointer-arith -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=discarded-qualifiers -Werror=implicit-int -Werror=declaration-after-statement -Werror-implicit-function-declaration -pthread  -c /var/tmp/portage/dev-db/cockroach-20.1.10/work/cockroach-v20.1.10/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/rpc/unit-test/rpc_test_svc.c
> [ 24%] Building CXX object CMakeFiles/rocksdb.dir/db/version_edit.cc.o
> /var/tmp/portage/dev-db/cockroach-20.1.10/work/cockroach-v20.1.10/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/rpc/unit-test/server.c: In function 'rpc_test_echo_1_svc':
> /var/tmp/portage/dev-db/cockroach-20.1.10/work/cockroach-v20.1.10/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/rpc/unit-test/server.c:160:6: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]
>   160 |      asprintf(&res, "Echo: %s", *arg);
>       |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> gcc -L../../../lib -Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/local/lib -g -O2 -Wl,--as-needed  -o client client.o rpc_test_clnt.o \
> 	-lgssrpc -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkrb5support  -lkeyutils -lresolv  -ldl
> gcc -L../../../lib -Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/local/lib -g -O2 -Wl,--as-needed  -o server server.o rpc_test_svc.o \
> 	-lgssrpc -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkrb5support  -lkeyutils -lresolv  -ldl
> [ 24%] Building CXX object CMakeFiles/rocksdb.dir/db/version_set.cc.o
> /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../../lib/libk5crypto.a(aes.o): in function `aesni_expand_enc_key':
> /var/tmp/portage/dev-db/cockroach-20.1.10/work/cockroach-v20.1.10/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/crypto/builtin/enc_provider/aes.c:90: undefined reference to `k5_iEncExpandKey256'
> /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../../lib/libk5crypto.a(aes.o): in function `aesni_enc':
> /var/tmp/portage/dev-db/cockroach-20.1.10/work/cockroach-v20.1.10/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/crypto/builtin/enc_provider/aes.c:120: undefined reference to `k5_iEnc256_CBC'
> /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-db/cockroach-20.1.10/work/cockroach-v20.1.10/src/github.com/cockroachdb/cockroach/c-deps/krb5/src/lib/crypto/builtin/enc_provider/aes.c:120: undefined reference to `k5_iEnc256_CBC'
Comment 7 Zac Medico gentoo-dev 2020-12-27 22:12:14 UTC
Also, I needed to apply this patch to the bundled version of libedit:

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

commit decac89babd088840fd738bdbece4cdd36e24cfb
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2017-06-12 21:41:18 +0200
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2017-06-12 23:27:43 +0200

    dev-libs/libedit: Fix building with ncurses[tinfo]

 .../libedit/files/libedit-20170329.3.1-tinfo.patch | 30 ++++++++++++++++++++++
 dev-libs/libedit/libedit-20170329.3.1.ebuild       |  8 +++++-
 2 files changed, 37 insertions(+), 1 deletion(-)