In kernel-3.7-rc1 the include/ and arch/* directories have been reorganized: See the following thread on lkml: [PATCH 00/13] UAPI header file split: https://lkml.org/lkml/2012/7/20/406 nvidia-drivers does not include the include/uapi path so the build fails with a lot of "conftest failed" errors. A patch found here http://www.nvnews.net/vbulletin/showthread.php?t=194465#1 adds the necessary -I flags to kernel/conftest.sh Another patch, removing the VM_RESERVED flag, has also been merged into kernel-3.7-rc1: [PATCH v3 10/10] mm: kill vma flag VM_RESERVED and mm->reserved_vm counter: https://lkml.org/lkml/2012/7/31/231 This change makes the nvidia-drivers build die with: /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/nv-mmap.c:466:53: error: ‘VM_RESERVED’ undeclared (first use in this function) As suggested in the patch notes, VM_RESERVED can be replaced with VM_DONTEXPAND | VM_DONTDUMP . This post suggests a patch doing that: http://www.nvnews.net/vbulletin/showthread.php?t=194465#4 The combination of these two patches, together with a fix to the linux-info.eclass, makes nvidia-drivers build fine vs git-sources-3.7-rc1 for me. The linux-info.eclass issue is related to the include/ reorganization, moving include/version.h (https://bugs.gentoo.org/show_bug.cgi?id=438876) I have not checked, but these issues probably affect earlier versions of nvidia-drivers aswell. Reproducible: Always Steps to Reproduce: 1. Build git-sources-3.7-rc1 2. Fix the linux-info.eclass issue 3. emerge x11-drivers/nvidia-drivers-304.51 Actual Results: Build fails with a lot of "conftest failed" errors Expected Results: nvidia-drivers compiles without issues From build.log without patch: ... In file included from /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/nv-linux.h:15:0, from /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/nv-acpi.c:15: /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/conftest.h:8:2: error: #error remap_page_range() conftest failed! /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/conftest.h:10:2: error: #error vmap() conftest failed! /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/conftest.h:11:2: error: #error agp_backend_acquire() conftest failed! /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/conftest.h:26:2: error: #error kmem_cache_create() conftest failed! /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/conftest.h:27:2: error: #error on_each_cpu() conftest failed! /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/conftest.h:28:2: error: #error smp_call_function() conftest failed! /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/conftest.h:35:2: error: #error INIT_WORK() conftest failed! /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/conftest.h:36:2: error: #error acpi_walk_namespace() conftest failed! /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/conftest.h:37:2: error: #error acpi_os_wait_events_complete() conftest failed! /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/conftest.h:41:2: error: #error pci_dma_mapping_error() conftest failed! ... From build.log after applying the uapi-patch: ... /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/nv-mmap.c: In function ‘nv_kern_mmap’: /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/nv-mmap.c:466:53: error: ‘VM_RESERVED’ undeclared (first use in this function) /var/tmp/portage/x11-drivers/nvidia-drivers-304.51/work/kernel/nv-mmap.c:466:53: note: each undeclared identifier is reported only once for each function it appears in ... waterhouse ~ # emerge --info #~ [0] Portage 2.1.11.30 (default/linux/amd64/10.0/desktop/gnome, gcc-4.6.3, glibc-2.15-r3, 3.7.0-rc1 x86_64) ================================================================= System uname: Linux-3.7.0-rc1-x86_64-AMD_Athlon-tm-_II_X3_445_Processor-with-gentoo-2.2 Timestamp of tree: Thu, 18 Oct 2012 23:30:01 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] ccache version 3.1.8 [enabled] app-shells/bash: 4.2_p37 dev-java/java-config: 2.1.12 dev-lang/python: 2.7.3-r2, 3.2.3-r1 dev-util/ccache: 3.1.8 dev-util/cmake: 2.8.9-r1 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11 sys-apps/sandbox: 2.6 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.6, 1.12.4 sys-devel/binutils: 2.22.90 sys-devel/gcc: 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.6 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo x-portage mozilla sunrise jxh mistafunk daks proaudio ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=amdfam10 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=amdfam10 -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="-j4 --load-average=2.85 --quiet n --quiet-build y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs candy ccache config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="ftp://ftp.ds.karen.hj.se/gentoo/" LANG="sv_SE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="sv en en_GB" MAKEOPTS="-j4 -l2.95" PKGDIR="/usr/portage/" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/mozilla /var/lib/layman/sunrise /var/lib/layman/jxh /var/lib/layman/mistafunk /var/lib/layman/daks /var/lib/layman/pro-audio" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X a52 aac acl acpi alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cdr cleartype cli colord consolekit corefonts cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam fbcondecor ffmpeg firefox flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 hddtemp iconv icu ipv6 java javascript jpeg kerberos lcms ldap libnotify lm_sensors mad mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pppd pulseaudio qt3 qt3support qt4 readline sdl session smp socialweb spell sse sse2 ssl startup-notification svg tcpd tiff truetype type1 udev udisks unicode upower usb vim-syntax vorbis wxwidgets x264 xcb xml xv xvid zlib zsh-completion" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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 proxy proxy_ajp proxy_balancer proxy_ftp proxy_http proxy_scgi" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="gensplash plymouth" ELIBC="glibc" FOO2ZJS_DEVICES="hp1018" 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 ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="sv en en_GB" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" 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
Created attachment 327004 [details, diff] Propesed patch: Add -I flags for generated/uapi and replace VM_RESERVED with VM_DONTEXPAND | VM_DONTDUMP
As so many times before...