Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 606866 - sys-kernel/ck-sources-4.9.4 and 4.9.5 build fails if CONFIG_SUSPEND is disabled in kernel options
Summary: sys-kernel/ck-sources-4.9.4 and 4.9.5 build fails if CONFIG_SUSPEND is disabl...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: kuzetsa CatSwarm (kuza for short)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-23 02:53 UTC by thunderrd
Modified: 2017-01-24 00:12 UTC (History)
3 users (show)

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


Attachments
fix_build_when_CONFIG_SUSPEND_disabled.patch (Fix_build_when_CONFIG_SUSPEND_disabled.patch,271 bytes, text/plain)
2017-01-23 03:03 UTC, thunderrd
Details
.config, fails (.config,81.96 KB, text/plain)
2017-01-23 03:05 UTC, thunderrd
Details
exact patch from upstream (ckolivas) (7de569950716147ed436b27936628ee3ab5b45cc.patch,684 bytes, patch)
2017-01-23 09:28 UTC, kuzetsa CatSwarm (kuza for short)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description thunderrd 2017-01-23 02:53:25 UTC
CC      kernel/sched/idle.o
LD      kernel/sched/built-in.o
CC      kernel/time/timer.o
kernel/time/timer.c: In function ‘msleep’:
kernel/time/timer.c:1914:62: error: ‘pm_freezing’ undeclared (first use in this function)
if (jiffs < 5 && hrtimer_resolution < NSEC_PER_SEC / HZ && !pm_freezing) {

kernel/time/timer.c:1914:62: note: each undeclared identifier is reported only once for each function it appears in
kernel/time/timer.c: In function ‘msleep_interruptible’:
kernel/time/timer.c:1936:62: error: ‘pm_freezing’ undeclared (first use in this function)
if (jiffs < 5 && hrtimer_resolution < NSEC_PER_SEC / HZ && !pm_freezing) {

make[2]: *** [scripts/Makefile.build:294: kernel/time/timer.o] Error 1
make[1]: *** [scripts/Makefile.build:544: kernel/time] Error 2
make: *** [Makefile:992: kernel] Error 2

Reproducible: Always

Steps to Reproduce:
1. disable CONFIG_SUSPEND
2. build the kernel with the above result




root@Q6600: ~# emerge --info
Portage 2.3.3 (python 3.5.2-final-0, default/linux/amd64/13.0/desktop, gcc-5.4.0, glibc-2.23-r3, 4.9.4-ck x86_64)
=================================================================
System uname: Linux-4.9.4-ck-x86_64-Intel-R-_Core-TM-2_Extreme_CPU_X9650_@_3.00GHz-with-gentoo-2.3
KiB Mem:     8169016 total,   5608664 free
KiB Swap:    1060860 total,   1060860 free
Timestamp of repository gentoo: Sun, 22 Jan 2017 11:00:01 +0000
sh bash 4.4_p11
ld GNU ld (Gentoo 2.27 p1.0) 2.27
app-shells/bash:          4.4_p11::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.23.1::gentoo
sys-apps/sandbox:         2.10-r3::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.27::gentoo
sys-devel/gcc:            5.4.0-r2::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.9::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /mnt/ext4_STORAGE/usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: --verbose --progress --exclude-from=/etc/portage/rsync_excludes

hnaparst
    location: /mnt/ext4_STORAGE/var/lib/layman/hnaparst
    sync-type: laymansync
    sync-uri: https://github.com/hnaparst/overlay.git
    masters: gentoo
    priority: 50

palemoon
    location: /mnt/ext4_STORAGE/var/lib/layman/palemoon
    sync-type: laymansync
    sync-uri: https://github.com/deuiore/palemoon-overlay.git
    masters: gentoo
    priority: 50

BZ-overlay
    location: /mnt/ext4_STORAGE/usr/local/portage
    masters: gentoo
    priority: 60

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
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"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/mnt/ext4_STORAGE/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs 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 -pipe"
GENTOO_MIRRORS="http://gentoo.mirrors.easynews.com/linux/gentoo/ http://ftp.lecl.net/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/mnt/ext4_STORAGE/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--verbose --progress --exclude-from=/etc/portage/rsync_excludes"
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 amd64 branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cxx dbus device-mapper directfb dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran gdbm gif glamor gpm gtk iconv infinality ipv6 jack jpeg lcms ldap libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl offensive ogg opengl openmp openssl pam pango pcre pdf png policykit ppds python qt5 readline samba sdl seccomp session spell sse sse2 ssh ssl startup-notification svg tcpd threads tiff truetype udev udisks unicode usb uuid vdpau vorbis wxwidgets x264 xattr xcb xcomposite xft xml xv xvid zlib" ABI_X86="32 64" ALSA_CARDS="ca0106" 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="mmx mmxext sse sse2 sse3 sse4_1 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="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 python3_5" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 1 thunderrd 2017-01-23 02:56:08 UTC
This one-line patch for freezer.h fixes the build failure:

https://github.com/torvalds/linux/commit/7de569950716147ed436b27936628ee3ab5b45cc?diff=unified

Please include in next ck-sources release.  Thanks
Comment 2 thunderrd 2017-01-23 03:03:05 UTC
Created attachment 461000 [details]
fix_build_when_CONFIG_SUSPEND_disabled.patch
Comment 3 thunderrd 2017-01-23 03:05:35 UTC
Created attachment 461002 [details]
.config, fails
Comment 4 Göktürk Yüksek archtester gentoo-dev 2017-01-23 06:45:20 UTC
I can reproduce the problem and I confirm that the patch fixes the build failure. However, we should use the exact patch from the upstream instead: https://github.com/torvalds/linux/commit/7de569950716147ed436b27936628ee3ab5b45cc.patch
Comment 5 kuzetsa CatSwarm (kuza for short) 2017-01-23 09:28:36 UTC
Created attachment 461046 [details, diff]
exact patch from upstream (ckolivas)

> Please include in next ck-sources release.  Thanks
@ thunderrd:

I've got enough info to start on this now. Thanks. The testing might take some time, but likely it will be in time for the sys-kernel/ck-sources-4.9.6 version bump (mainline kernel.org hasn't even released 4.9.6 yet)

Turns out the modern 4.9.x ck patches actually //DO// have their version history available via git:

https://github.com/ckolivas/linux/tree/4.9-ck

(ck patches were originally provided as tarballs / standalone patches)

---

In the meantime - for anyone using an older build without this fix, the best bet is going to be to leave suspend enabled (default setting, I believe) or manually apply the patch prior to building.
Comment 6 kuzetsa CatSwarm (kuza for short) 2017-01-23 11:02:38 UTC
thunderrd, gokturk: Thanks for the report & testing respectively. Locally testing an ebuild for sys-kernel/ck-sources which fixes the issue as per the upstream fix. (7de569950716147ed436b27936628ee3ab5b45cc.patch)

Some time "soon" (in the 72 hours?) all the QA should be finished. Updated ebuilds which fix this particular issue will definitely be available in portage before sys-kernel/ck-sources-4.9.6 is ready for release :)
Comment 7 kuzetsa CatSwarm (kuza for short) 2017-01-23 12:46:10 UTC
It now occurs to me my pull request isn't yet "in the tree" (I marked the status as FIXED prematurely)
Comment 8 Göktürk Yüksek archtester gentoo-dev 2017-01-24 00:12:22 UTC
commit 0a5a8dedd843c590634d9b07fb55ce0350ba5dd5
Author:     Sarah White <kuzetsa@gmail.com>
AuthorDate: Mon Jan 23 07:12:31 2017 -0500
Commit:     Göktürk Yüksek <gokturk@gentoo.org>
CommitDate: Mon Jan 23 18:17:09 2017 -0500

    sys-kernel/ck-sources: upstream patch - 4.9.x @ bug #606866
    
    Package-Manager: portage-2.3.0