Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 653320 - x11-drivers/xf86-video-intel CFLAGS=-flto - .../work/xf86-video-intel-9999/src/sna/blt.c: In function ‘to_memcpy’: /usr/include/bits/string_fortified.h:31:1: error: inlining failed in call to always_inline ‘memcpy’: target specific option mismatch
Summary: x11-drivers/xf86-video-intel CFLAGS=-flto - .../work/xf86-video-intel-9999/sr...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Other
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-16 17:34 UTC by n05ph3r42
Modified: 2019-04-26 21:20 UTC (History)
0 users

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


Attachments
emerge --info (emerge_--info.txt,7.14 KB, text/plain)
2018-04-18 10:35 UTC, n05ph3r42
Details
emerge build log (emerge_log.txt,164.19 KB, text/plain)
2018-04-18 10:39 UTC, n05ph3r42
Details

Note You need to log in before you can comment on or make changes to this bug.
Description n05ph3r42 2018-04-16 17:34:29 UTC
Emerging x11-drivers/xf86-video-intel-xx with CFLAG "-flto"  causes "inlining failed in call to always_inline ‘memcpy’: target specific option mismatch" 



Reproducible: Always

Steps to Reproduce:
1. set CFLAGS to use LTO (-flto)
2. emerge x11-drivers/xf86-video-intel
3.
Actual Results:  
emake failed
"inlining failed in call to always_inline ‘memcpy’: target specific option mismatch"


Here i used 9999, but stable and unstable versions gives same result

emerge --info =x11-drivers/xf86-video-intel-9999:
https://paste.pound-python.org/show/tMnROhRyZIl7i0kjnLVT/

emerge -pqv =x11-drivers/xf86-video-intel-9999
https://paste.pound-python.org/show/JUpMgRe1mQTBe9Hun1rB/

emerge build log:
https://paste.pound-python.org/show/OeV5uD8xshuD37cDMTDf/

env:
https://paste.pound-python.org/show/fOyaNhNHud3GJtiojtpb/

/bin/sh ../../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna -I../..    -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Wimplicit -Wnonnull -Winit-self -Wmain -Wmissing-braces -Wsequence-point -Wreturn-type -Wtrigraphs -Warray-bounds -Wwrite-strings -Waddress -Wint-to-pointer-cast -Wpointer-to-int-cast -fno-strict-aliasing -I/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src -I/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/render_program -fvisibility=hidden -I/usr/include/xorg -I/usr/include/libdrm -I/usr/include/pixman-1 -I/usr/include/X11/dri  -I/usr/include/libdrm       -Wno-cast-qual -Wno-redundant-decls -Wno-maybe-uninitialized -march=sandybridge -mfpmath=both -mavx -maes -O2 -pipe -fuse-ld=gold -flto=8 -fomit-frame-pointer -ftree-vectorize -c -o sna_display_fake.lo /var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/sna_display_fake.c
In file included from /usr/include/features.h:423:0,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdint.h:26,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/stdint.h:9,
                 from /var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/sna.h:40,
                 from /var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c:32:
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c: In function ‘to_memcpy’:
/usr/include/bits/string_fortified.h:31:1: error: inlining failed in call to always_inline ‘memcpy’: target specific option mismatch
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
 ^
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c:156:4: note: called from here
    memcpy(dst, src, len);
    ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/features.h:423:0,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdint.h:26,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/stdint.h:9,
                 from /var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/sna.h:40,
                 from /var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c:32:
/usr/include/bits/string_fortified.h:31:1: error: inlining failed in call to always_inline ‘memcpy’: target specific option mismatch
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
 ^
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c:221:2: note: called from here
  memcpy(dst, src, len & 3);
  ^~~~~~~~~~~~~~~~~~~~~~~~~
make[4]: *** [Makefile:694: blt.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna -I../.. -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Wimplicit -Wnonnull -Winit-self -Wmain -Wmissing-braces -Wsequence-point -Wreturn-type -Wtrigraphs -Warray-bounds -Wwrite-strings -Waddress -Wint-to-pointer-cast -Wpointer-to-int-cast -fno-strict-aliasing -I/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src -I/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/render_program -fvisibility=hidden -I/usr/include/xorg -I/usr/include/libdrm -I/usr/include/pixman-1 -I/usr/include/X11/dri -I/usr/include/libdrm -Wno-cast-qual -Wno-redundant-decls -Wno-maybe-uninitialized -march=sandybridge -mfpmath=both -mavx -maes -O2 -pipe -fuse-ld=gold -flto=8 -fomit-frame-pointer -ftree-vectorize -c /var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/sna_display_fake.c  -fPIC -DPIC -o .libs/sna_display_fake.o
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna -I../.. -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Wimplicit -Wnonnull -Winit-self -Wmain -Wmissing-braces -Wsequence-point -Wreturn-type -Wtrigraphs -Warray-bounds -Wwrite-strings -Waddress -Wint-to-pointer-cast -Wpointer-to-int-cast -fno-strict-aliasing -I/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src -I/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/render_program -fvisibility=hidden -I/usr/include/xorg -I/usr/include/libdrm -I/usr/include/pixman-1 -I/usr/include/X11/dri -I/usr/include/libdrm -Wno-cast-qual -Wno-redundant-decls -Wno-maybe-uninitialized -march=sandybridge -mfpmath=both -mavx -maes -O2 -pipe -fuse-ld=gold -flto=8 -fomit-frame-pointer -ftree-vectorize -c /var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/sna_display.c  -fPIC -DPIC -o .libs/sna_display.o
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/sna_accel.c:124:0: warning: "FontSetPrivate" redefined
 #define FontSetPrivate(font, idx, data) xfont2_font_set_private(font, idx, data)
 
In file included from /var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/sna_accel.c:40:0:
/usr/include/X11/fonts/fontstruct.h:135:0: note: this is the location of the previous definition
 #define FontSetPrivate(pFont,n,ptr) ((n) > (pFont)->maxPrivate ? \
 
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/sna_accel.c: In function ‘sna_poly_zero_line_blt’:
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/sna_accel.c:9270:11: warning: variable ‘intersects’ set but not used [-Wunused-but-set-variable]
      bool intersects;
           ^~~~~~~~~~
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/sna_accel.c:9170:7: warning: variable ‘degenerate’ set but not used [-Wunused-but-set-variable]
  bool degenerate = true;
       ^~~~~~~~~~
make[4]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999_build/src/sna'
make[3]: *** [Makefile:709: all-recursive] Error 1
make[3]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999_build/src/sna'
make[2]: *** [Makefile:622: all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999_build/src'
make[1]: *** [Makefile:486: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999_build'
make: *** [Makefile:418: all] Error 2
 * ERROR: x11-drivers/xf86-video-intel-9999::gentoo failed (compile phase):
 *   emake failed
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2018-04-18 07:03:24 UTC
Please attach the entire build log to this bug report.
Please post your `emerge --info` output in a comment.
(Do not use paste sites.)
Comment 2 n05ph3r42 2018-04-18 10:35:32 UTC
Created attachment 527920 [details]
emerge --info
Comment 3 n05ph3r42 2018-04-18 10:39:16 UTC
Created attachment 527922 [details]
emerge build log
Comment 4 Matt Turner gentoo-dev 2019-03-17 20:05:59 UTC
Fedora has a hacky patch to work around this, or a similar problem:

https://src.fedoraproject.org/rpms/xorg-x11-drv-intel/blob/master/f/intel-gcc-pr65873.patch

Seems like the real bug is in GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65873
Comment 5 Larry the Git Cow gentoo-dev 2019-04-26 21:20:41 UTC
The bug has been closed via the following commit(s):

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

commit 4e6ac224882527af7d365ef4b2bf909513504e4a
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2019-04-26 21:17:27 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2019-04-26 21:20:26 +0000

    x11-drivers/xf86-video-intel: Version bump to 2.99.917_p20190301
    
    Closes: https://bugs.gentoo.org/653320
    Closes: https://bugs.gentoo.org/673040
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 x11-drivers/xf86-video-intel/Manifest              |  1 +
 .../files/xf86-video-intel-gcc-pr65873.patch       | 12 +++
 .../xf86-video-intel-2.99.917_p20190301.ebuild     | 91 ++++++++++++++++++++++
 3 files changed, 104 insertions(+)