Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 550784 - x11-drivers/xf86-video-intel-2.99.917[udev] error: implicit declaration of function 'fstat'
Summary: x11-drivers/xf86-video-intel-2.99.917[udev] error: implicit declaration of fu...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal minor (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 550766 551402 551462 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-05-30 01:19 UTC by Markus
Modified: 2015-07-20 11:42 UTC (History)
8 users (show)

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


Attachments
build.log (build.log,147.71 KB, text/plain)
2015-05-30 01:24 UTC, Markus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus 2015-05-30 01:19:08 UTC
I was trying to reinstall x11-drivers/xf86-video-intel-2.99.917 and it failed as long as I used the udev useflag. USE="-udev" emerge -1 xf86-video-intel works.
I got an error:
/var/tmp/portage/x11-drivers/xf86-video-intel-2.99.917/work/xf86-video-intel-2.99.917/src/sna/sna_driver.c:799:2: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration]

After adding the following two libs in sna_driver.c and intel_driver.c it worked for me.
#include <sys/stat.h>
#include <sys/types.h>
I assume a problem with gcc. since it is the first time I compiled the package with gcc 4.9.2 (stricter rules ?)

Reproducible: Always

Steps to Reproduce:
1. USE="udev" emerge -1 xf86-video-intel

Actual Results:  
Installation fails 


 emerge --info '=x11-drivers/xf86-video-intel-2.99.917::gentoo'
Portage 2.2.20 (python 2.7.10-final-0, default/linux/amd64/13.0/desktop/kde/systemd, gcc-4.9.2, glibc-2.20-r2, 4.0.4-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.0.4-gentoo-x86_64-Genuine_Intel-R-_CPU_U7300_@_1.30GHz-with-gentoo-2.2
KiB Mem:     3952064 total,   1149440 free
KiB Swap:    4498164 total,   4498164 free
Timestamp of repository gentoo: Thu, 28 May 2015 21:30:01 +0000
sh bash 4.3_p39
ld GNU ld (Gentoo 2.25 p1.2) 2.25
app-shells/bash:          4.3_p39::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2-r1::gentoo
dev-lang/python:          2.7.10::gentoo, 3.3.5-r1::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.2.2::gentoo
dev-util/pkgconfig:       0.28-r3::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.16.3::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25-r1::gentoo
sys-devel/gcc:            4.4.7::gentoo, 4.9.2::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.0::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

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

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE PUEL skype-eula skype-4.0.0.7-copyright as-is AdobeFlash-10.3 AdobeFlash-11.x dlj-1.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -msse4.1 -pipe -fomit-frame-pointer"
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/init.d/ /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="-O2 -march=core2 -msse4.1 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-a"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nodoc parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo"
LANG="de_DE.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
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"
PORTAGE_TMPDIR="/var/tmp"
USE="64bit X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gstreamer gtk iconv ipv4 jpeg kde kipi laptop lcms libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl nsplugin ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qt qt3support qt4 qt5 readline sdl semantic-desktop session spell sse sse2 ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb uxa vaapi vorbis wifi wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3" DRACUT_MODULES="plymouth caps" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="intel i965" 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:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

x11-drivers/xf86-video-intel-2.99.917::gentoo was built with the following:
USE="dri sna udev uxa -debug -xvmc" ABI_X86="64"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,lazy"
Comment 1 Markus 2015-05-30 01:24:34 UTC
Created attachment 404312 [details]
build.log
Comment 2 Mike Gilbert gentoo-dev 2015-05-30 07:22:29 UTC
*** Bug 550766 has been marked as a duplicate of this bug. ***
Comment 3 Rémi Cardona (RETIRED) gentoo-dev 2015-05-30 09:37:59 UTC
Looks like bug is fixed upstream in commits: 

http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=12af8a575d1518d40416f83195049157c3a062a5

http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=369ceec0e4910ba2c37736a59c55c0d6c26433bf

There has been no release since December 2014 unfortunately.
Comment 4 Mike Gilbert gentoo-dev 2015-06-07 14:10:35 UTC
*** Bug 551402 has been marked as a duplicate of this bug. ***
Comment 5 Mike Gilbert gentoo-dev 2015-06-07 21:38:38 UTC
*** Bug 551462 has been marked as a duplicate of this bug. ***
Comment 6 klaus818 2015-06-10 04:52:26 UTC
And what can I do? I need this driver for a new installation.
Comment 7 Olaf Leidinger 2015-06-10 07:04:05 UTC
You can either use an older gcc or use the patch I provided in bug #550766 as user patch.
Comment 8 Markus Rathgeb 2015-06-13 07:48:49 UTC
Could we add the path to the current ebuilds in the portage tree, until a new version is relelased?
Comment 9 Chí-Thanh Christopher Nguyễn gentoo-dev 2015-06-13 22:54:30 UTC
+  13 Jun 2015; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
+  +files/xf86-video-intel-2.99.917-sna-udev-fstat.patch,
+  +files/xf86-video-intel-2.99.917-uxa-udev-fstat.patch,
+  +xf86-video-intel-2.99.917-r1.ebuild:
+  Add patches to fix building against newer gcc, bug #550784.
Comment 10 jorgicio 2015-06-14 05:59:17 UTC
It works, but now it crashes with sna enabled. It works with uxa enabled.
Comment 11 Markus Rathgeb 2015-06-14 08:16:52 UTC
I think the proble "crashs with sna, not with uxa" should be handled in another issue. This one concentrate on the build failures.
Am I right?
Comment 12 jorgicio 2015-06-14 16:46:57 UTC
(In reply to Markus Rathgeb from comment #11)
> I think the proble "crashs with sna, not with uxa" should be handled in
> another issue. This one concentrate on the build failures.
> Am I right?

Maybe, except for that issue appears when those patches were applied. Also, it broke the previous version of the ebuild. That's weird?
Comment 13 Markus Rathgeb 2015-06-14 17:49:32 UTC
Fixing missing includes with the correct system header should not break other stuff.
But sure, in general custom patches could break stuff.
Comment 14 Olaf Leidinger 2015-06-14 18:24:58 UTC
@ jorgicio : The issue appeared when the patch was introduced? Maybe the new revision just made you compile the driver with a later version of GCC or something like that. As Markus said, this patch can't possible be *directly* responsible for your crashes.
Comment 15 Chí-Thanh Christopher Nguyễn gentoo-dev 2015-06-14 18:26:53 UTC
If you see crashes, please open a separate bug report. If possible, try to get a backtrace from the X server.
Comment 16 jorgicio 2015-06-14 22:28:35 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #15)
> If you see crashes, please open a separate bug report. If possible, try to
> get a backtrace from the X server.

Done. https://bugs.gentoo.org/show_bug.cgi?id=552124
Comment 17 Alexander Tsoy 2015-07-20 07:40:28 UTC
(In reply to Markus from comment #0)
> I assume a problem with gcc. since it is the first time I compiled the
> package with gcc 4.9.2 (stricter rules ?)
I had exactly the same issue with gcc-4.8.4. So this is likely caused by glibc-2.20, not gcc.
Comment 18 Alexander Tsoy 2015-07-20 08:34:17 UTC
Please ignore my previous comment. Last successful build om my system was Jun 19. At this point I already had gcc-4.8.4 and glibc-2.20.
Comment 19 Alexander Tsoy 2015-07-20 11:42:09 UTC
This bug is triggered by udev-220/systemd-220 and above. Sorry for the noise. :)