Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 581114 - dev-libs/libgcrypt-1.7.0 with gcc-5.3 -flto: /usr/include/bits/string3.h:50:1: error: inlining failed in call to always_inline 'memcpy': target specific option mismatch
Summary: dev-libs/libgcrypt-1.7.0 with gcc-5.3 -flto: /usr/include/bits/string3.h:50:1...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
Whiteboard: LTO
: 583792 (view as bug list)
Depends on:
Blocks: lto
  Show dependency tree
Reported: 2016-04-25 05:32 UTC by Klaus Kusche
Modified: 2017-12-17 22:49 UTC (History)
6 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Kusche 2016-04-25 05:32:18 UTC
Emerging libgcrypt fails with a compile error:

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/portage/portage/dev-libs/libgcrypt-1.7.0/work/libgcrypt-1.7.0/cipher -I.. -I../src -I/var/portage/portage/dev-libs/libgcrypt-1.7.0/work/libgcrypt-1.7.0/src -march=native -mtune=native -flto -fuse-linker-plugin -O3 -fomit-frame-pointer -fweb -ftracer -fivopts -frename-registers -maccumulate-outgoing-args -pipe -fvisibility=hidden -Wall -c /var/portage/portage/dev-libs/libgcrypt-1.7.0/work/libgcrypt-1.7.0/cipher/rijndael-ssse3-amd64.c  -fPIC -DPIC -o .libs/rijndael-ssse3-amd64.o

In file included from /usr/include/features.h:368:0,
                 from /usr/include/stdio.h:27,
                 from /var/portage/portage/dev-libs/libgcrypt-1.7.0/work/libgcrypt-1.7.0/cipher/rijndael-ssse3-amd64.c:38:
/var/portage/portage/dev-libs/libgcrypt-1.7.0/work/libgcrypt-1.7.0/cipher/rijndael-ssse3-amd64.c: In function '_gcry_aes_ssse3_do_setkey':
/usr/include/bits/string3.h:50:1: error: inlining failed in call to always_inline 'memcpy': target specific option mismatch
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
/var/portage/portage/dev-libs/libgcrypt-1.7.0/work/libgcrypt-1.7.0/cipher/rijndael-ssse3-amd64.c:175:3: error: called from here
   memcpy(&ctx->keyschdec32[0][0], key, keybits / 8);

emerge --info:

Portage 2.2.28 (python 2.7.11-final-0, default/linux/amd64/13.0/no-multilib, gcc-5.3.0, glibc-2.23-r2, 4.4.8-hardened x86_64)
System uname: Linux-4.4.8-hardened-x86_64-Intel-R-_Core-TM-_i7-3940XM_CPU_@_3.00GHz-with-gentoo-2.2
KiB Mem:    32904708 total,  31094812 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 25 Apr 2016 04:45:01 +0000
sh bash 4.3_p42-r2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r2::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo
dev-util/cmake:           3.5.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.20.5::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            5.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo

    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 AdobeFlash-11.x Oracle-BCLA-JavaSE google-chrome googleearth Vivaldi FraunhoferFDK"
CFLAGS="-march=native -mtune=native -flto -fuse-linker-plugin -O3 -fomit-frame-pointer -fweb -ftracer -fivopts -frename-registers -maccumulate-outgoing-args -pipe"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -mtune=native -flto -fuse-linker-plugin -O3 -fomit-frame-pointer -fweb -ftracer -fivopts -frename-registers -maccumulate-outgoing-args -pipe"
EMERGE_DEFAULT_OPTS="--quiet-build --quiet-fail --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles keeptemp keepwork merge-sync news noclean parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
LDFLAGS="-march=native -mtune=native -flto -fuse-linker-plugin -O3 -fomit-frame-pointer -fweb -ftracer -fivopts -frename-registers -maccumulate-outgoing-args -pipe"
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"
USE="64bit X a52 aac adobe-cff alsa amd64 apng applet archive ass avx bzip2 cairo cdda cdparanoia clang cli clipboard clockdiff contrast cups curl cxx dbus dconf demosaic detex devfs-compat dga divx dns dot dri dri3 drm dts dvd dvdnav dvdr dvi dvipdfm egl encode epspdf exif expat extra faad fdk ffmpeg fftw flac fontconfig foomaticdb fts3 g3dvl gallium gbm gdk-pixbuf gif gimp glamor gles gles1 gles2 glib glibc-omitfp gmp graphics gs gstreamer gtk gtk2 gudev harfbuzz hpack-tools hpn htmlreport http http2 hwdb iconv icu imagemagick inotify jbig jemalloc jemalloc3 jit jpeg jpeg2k kpathsea lasi latex latex3 lcdfilter lcms leaps_timezone lensfun libkms libnotify libopts libsamplerate libwww lightning llvm llvm-gcc llvm-shared-libs lz4 lzma lzo mad metric midi minizip mmap mms mmx mmxext mng modern-top modules monolithic mp3 mpeg mpfr mta mudflap multicall natspec ncat ncurses ndiff nping nptl nscd nsplugin offensive ogg oldnet opencl opengl openmax openmp openvg opus orc pam pango pax_kernel pcap pcre pdf pic plugins png policykit postproc postscript ppds proprietary-codecs pstricks pth ptpax quicktime r600-llvm-compiler rar raw readline realmedia right_timezone rle rpc rtc rule_generator sanitize scanner schroedinger scope seccomp secure-delete session smp sndfile sound sqlite sqlite3 sse sse2 sse3 sse4 sse4_1 sse4_2 ssh ssl ssse3 svg symlink sync-plugin-portage system-cairo system-ffmpeg system-icu system-jpeg system-jsoncpp system-libevent system-libvpx system-sqlite systemd t1lib texi2html theora threads thunar tiff tools tracepath tremor truetype udev udisks unicode unlock-notify unwind usb user-session utils v4l v4l2 vaapi vdpau vim-with-x vorbis vpx webkit2 webp wext wifi wmf wmp wxwidgets x264 x265 xa xcb xcomposite xetex xkb xmp xorg xpm xrandr xulrunner xv xvid xvmc zenmap zip zlib" ABI_X86="64" 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer pdfimport" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python3_4 python2_7" RUBY_TARGETS="ruby22" SANE_BACKENDS="epson" USERLAND="GNU" VIDEO_CARDS="radeon radeonsi amdgpu" 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"
Comment 1 Fabio Coatti 2016-04-25 08:48:50 UTC
Same problem here, maybe this is relevant (not really sure :) )

Does anyone tried with gcc 4.X? I'm using 5.3.
Comment 2 Fabio Coatti 2016-04-25 10:23:37 UTC
The patch in gcc bugzilla has been applied by gentoo, I just noticed it. 

The error seems to be trigged by lto flag, at least I've been able to compile libgcrypt by turning off lto optimiziation.
Maybe it could be worthwile to report this to gcc folks...
Comment 3 Klaus Kusche 2016-04-25 13:54:01 UTC
(In reply to Fabio Coatti from comment #2)
> The error seems to be trigged by lto flag, at least I've been able to
> compile libgcrypt by turning off lto optimiziation.

I can confirm that libgcrypt emerges without errors with lto turned off.
Comment 4 SpanKY gentoo-dev 2016-05-11 06:00:18 UTC
not a libgcrypt bug.  only option is to simply avoid -flto for this package currently.
Comment 5 Coacher 2016-05-22 20:41:36 UTC
*** Bug 583792 has been marked as a duplicate of this bug. ***
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2017-12-09 22:08:47 UTC
Fixed in upstream gcc-6
Comment 7 Andreas K. Hüttel archtester gentoo-dev 2017-12-17 22:49:45 UTC
(In reply to Andreas K. Hüttel from comment #6)
> Fixed in upstream gcc-6

We can probably close this now gcc-6 is stable.