The latest tuxonice-sources at the time of writing fail to compile at file mm/shmem.c. I suspect that the applied tuxonice patch, targeted (as its name says) primarily at kernel version 3.13.0-rc8, is not fully compatible with kernel 3.13.1 because sys-kernel/gentoo-sources-3.13.1 do compile with the same kernel configuration. Reproducible: Always Steps to Reproduce: 1. Execute emerge =sys-kernel/tuxonice-sources-3.13.1 2. As root, navigate to /usr/src/linux-3.13.1-tuxonice and configure kernel in any way you prefer. 3. Execute make. Actual Results: Compilation stops at the file mm/shmem.c with the following messages being printed: mm/shmem.c:2997:90: error: unknown type name ‘atomic_copy’ struct file *shmem_kernel_file_setup(const char *name, loff_t size, unsigned long flags, atomic_copy) ^ mm/shmem.c:3008:83: error: unknown type name ‘atomic_copy’ struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags, atomic_copy) ^ mm/shmem.c: In function ‘shmem_zero_setup’: mm/shmem.c:3023:2: error: too many arguments to function ‘shmem_file_setup’ file = shmem_file_setup("dev/zero", size, vma->vm_flags, 0, 0); ^ In file included from include/linux/linkage.h:6:0, from include/linux/fs.h:5, from mm/shmem.c:24: mm/shmem.c:3012:19: note: declared here EXPORT_SYMBOL_GPL(shmem_file_setup); ^ include/linux/export.h:57:21: note: in definition of macro ‘__EXPORT_SYMBOL’ extern typeof(sym) sym; \ ^ mm/shmem.c:3012:1: note: in expansion of macro ‘EXPORT_SYMBOL_GPL’ EXPORT_SYMBOL_GPL(shmem_file_setup); ^ mm/shmem.c: At top level: mm/shmem.c:2930:21: warning: ‘__shmem_file_setup’ defined but not used [-Wunused-function] static struct file *__shmem_file_setup(const char *name, loff_t size, ^ scripts/Makefile.build:308: recipe for target 'mm/shmem.o' failed make[1]: *** [mm/shmem.o] Error 1 Makefile:816: recipe for target 'mm' failed make: *** [mm] Error 2 Expected Results: Compilation succeeds. emerge --info Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop, gcc-4.8.2, glibc-2.18-r1, 3.12.8-tuxonice x86_64) ================================================================= System uname: Linux-3.12.8-tuxonice-x86_64-Intel-R-_Core-TM-_i5-3350P_CPU_@_3.10GHz-with-gentoo-2.2 KiB Mem: 8152212 total, 6007532 free KiB Swap: 8388604 total, 8388604 free Timestamp of tree: Mon, 03 Feb 2014 10:15:01 +0000 ld GNU ld (GNU Binutils) 2.24 app-shells/bash: 4.2_p45-r1 dev-java/java-config: 2.2.0 dev-lang/python: 2.7.6, 3.2.5-r3, 3.3.3 dev-util/cmake: 2.8.12.2 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.12.6, 1.13.4, 1.14.1 sys-devel/binutils: 2.24-r2 sys-devel/gcc: 4.8.2 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.2 sys-devel/make: 4.0-r1 sys-kernel/linux-headers: 3.13 (virtual/os-headers) sys-libs/glibc: 2.18-r1 Repositories: gentoo steam-overlay rafaelmartins event-horizon ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -fno-var-tracking" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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 -fno-var-tracking" DISTDIR="/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" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.po.opole.pl ftp://gentoo.po.opole.pl http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo" LANG="en_GB.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j5" 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" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/steam /var/lib/layman/rafaelmartins /usr/local/portage" SYNC="rsync://rsync1.pl.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth bzip2 cairo cdda cdr cli cracklib crypt cscope cups cxx dbus djvu dri dts dvd dvdr dvi emboss encode exif faac faad fam ffmpeg firefox flac fontconfig fortran gadu gdbm gif gpm gtk iconv ipv6 jack jpeg lcms ldap mad mmx mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf pmu png ppds readline sdl session spell sse sse2 sse3 sse4_1 ssl ssse3 startup-notification svg symlink tcpd theora tiff truetype udev unicode upower usb v4l2 vdpau vim-syntax vorbis x264 xcb xml xmpp xv xvid zlib" ABI_X86="64 32" 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" 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="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB pl pl_PL" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby20" 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 369468 [details] kernel configuration file Added kernel configuration used for building.
Please attach the full output of make after executing make mrproper.
Created attachment 369480 [details] make output Make output attached, I've gathered it when running make after: 1) running make proper, 2) restoring kernel configuration, 3) running make silentoldconfig. I assumed that running make without kernel configuration wouldn't make sense, but if that was exactly what I was supposed to do, please let me know.
I confirm the bug too. The same happens with linux-3.13.0-tuxonice. I don't know if it helps but the signature for shmem_kernel_file_setup in sshmem.c and in include/linux/shmem_fs.h don't match. sshmem.c: struct file *shmem_kernel_file_setup(const char *name, loff_t size, unsigned long flags, atomic_copy) sshmem_fs.h: extern struct file *shmem_kernel_file_setup(const char *name, loff_t size, unsigned long flags);
Created attachment 370108 [details, diff] Fixes compile errors, appears to work. I've had luck running two boxes with this home made patch. I can't vouch for its correctness, but it makes sense. I haven't looked as to where the origin of the problem actually is.
I'm also seeing this with tuxonice-sources-3.13.1. Unless there's some C syntax that I'm unaware of, this is an upstream problem, where the type of the atomic_copy argument to some functions is missing (guessing from elsewhere, it should be int). Someone filed an upstream bug, which has yet to get any attention: http://bugzilla.tuxonice.net/show_bug.cgi?id=489 I've traced this back to an upstream commit, which looks to me like a botched merge: https://github.com/NigelCunningham/tuxonice-kernel/commit/2656e47754a02d39f750c195b2b55bd98dddeb2f
I can also confirm that after manually making the same changes shown in Dan's patch, my kernel compiles successfully.
Fixed in 3.13.2.