Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 614706 - x11-drivers/nvidia-drivers-304.135 without CONFIG_MTRR - .../work/kernel/os-agp.c:177:1: error: label at end of compound statement
Summary: x11-drivers/nvidia-drivers-304.135 without CONFIG_MTRR - .../work/kernel/os-a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-04 23:13 UTC by David Flogeras
Modified: 2017-04-12 17:30 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,391.62 KB, text/plain)
2017-04-11 01:59 UTC, David Flogeras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Flogeras 2017-04-04 23:13:13 UTC
Building against currently stable 4.9.16 on x86.  304.134 builds fine.



/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c:177:1: error: label at end of compound statement
 failed:
 ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c:133:13  error: label ‘release’ used but not defined
             goto release;
             ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c:108:9: error: label ‘bailout’ used but not defined
         goto bailout;
         ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c: At top level:
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c:185:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
 release:
        ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c:187:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
 bailout:
        ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c:195:1: error: expected identifier or ‘(’ before ‘}’ token
 }
 ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c: In function ‘KernInitAGP’:
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c:184:5: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
make[4]: *** [/usr/src/linux-4.9.16-gentoo/scripts/Makefile.build:294: /var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.o] Error 1
make[3]: *** [/usr/src/linux-4.9.16-gentoo/Makefile:1490: _module_/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel] Error 2
make[2]: *** [Makefile:150: sub-make] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [Makefile:257: module] Error 1
make: *** [makefile:59: module] Error 2
 * ERROR: x11-drivers/nvidia-drivers-304.135::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-304.135::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-304.135::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/'

>>> Failed to emerge x11-drivers/nvidia-drivers-304.135, Log file:

>>>  '/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/temp/build.log'

 * Messages for package x11-drivers/nvidia-drivers-304.135:

 * User patches applied.
 * ERROR: x11-drivers/nvidia-drivers-304.135::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-304.135::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-304.135::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/'

Reproducible: Always
Comment 1 David Flogeras 2017-04-08 11:55:28 UTC
What info is needed?
Comment 2 David Flogeras 2017-04-10 18:29:49 UTC
Portage 2.3.3 (python 2.7.12-final-0, default/linux/x86/13.0/desktop/plasma, gcc-4.9.4, glibc-2.23-r3, 4.9.16-gentoo i686)
=================================================================
System uname: Linux-4.9.16-gentoo-i686-Intel-R-_Core-TM-_i7-4770_CPU_@_3.40GHz-with-gentoo-2.3
KiB Mem:    16342140 total,   3225112 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 09 Apr 2017 13:45:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.3_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.23.2::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            4.7.4::gentoo, 4.8.5::gentoo, 4.9.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

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

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=prescott -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
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 a52 aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv jpeg kde kipi kwallet lcms libnotify mad mng modules mozbranding mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt3support qt4 qt5 readline sdl seccomp session spell ssl startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 x86 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="32" 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 3 David Flogeras 2017-04-10 18:31:31 UTC
I should note, this is happening within a linux32 chroot where I build packages for an old laptop.

I use the command
KBUILD_OUTPUT=/path/to/my/kernel/tree emerge -1 nvidia-drivers

I just tried building directly on the target and that works.  I'm not sure what that says about it.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2017-04-10 21:21:49 UTC
(In reply to David Flogeras from comment #1)
> What info is needed?

Start by reading the output you posted in comment #0, as it contains the actual instructions that tell you what is needed.

In this case, the "complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/temp/build.log'" and should have been attached to this bug report.
Comment 5 David Flogeras 2017-04-11 01:59:11 UTC
Created attachment 469670 [details]
build.log

As requested
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2017-04-11 07:04:44 UTC
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c: In function ‘KernInitAGP’:
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c:177:1: error: label at end of compound statement
 failed:
 ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c:133:13: error: label ‘release’ used but not defined
             goto release;
             ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c:108:9: error: label ‘bailout’ used but not defined
         goto bailout;
         ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c: At top level:
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c:185:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
 release:
        ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c:187:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
 bailout:
        ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c:195:1: error: expected identifier or ‘(’ before ‘}’ token
 }
 ^
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c: In function ‘KernInitAGP’:
/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.c:184:5: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
make[4]: *** [/usr/src/linux-4.9.16-gentoo/scripts/Makefile.build:294: /var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel/os-agp.o] Error 1
make[3]: *** [/usr/src/linux-4.9.16-gentoo/Makefile:1490: _module_/var/tmp/portage/x11-drivers/nvidia-drivers-304.135/work/kernel] Error 2
make[2]: *** [Makefile:150: sub-make] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!

Um, yes, so they enable some additional code in os-agp.c when CONFIG_MTRR, but the closing brace of the conditional fell outside the #ifdef. Compared to 304.134, that code saw some whitespace changes that apparently caused this "functional" change as well.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2017-04-11 07:07:35 UTC
Should be fixed (without revision bump). Please try again.
Comment 8 David Flogeras 2017-04-11 11:33:52 UTC
Yep that worked in my chroot, thank you much!

However it does draw the question, why does it think in my chroot that I don't have CONFIG_MTRR?  I do, and I point it at the kernel configuration via KBUILD_OUTPUT.
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2017-04-12 10:54:03 UTC
(In reply to David Flogeras from comment #8)
> However it does draw the question, why does it think in my chroot that I
> don't have CONFIG_MTRR?  I do, and I point it at the kernel configuration
> via KBUILD_OUTPUT.

I have no idea what the correct way would be to cross-compile a kernel like that, and I think it's outside the scope of this bug report.
Comment 10 David Flogeras 2017-04-12 17:30:03 UTC
Fair enough. Thanks again for fixing it!