Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 637430 - sys-power/acpi_call-1.1.0-r2 fails with kernel 4.14.x
Summary: sys-power/acpi_call-1.1.0-r2 fails with kernel 4.14.x
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Maxim Koltsov (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-13 22:42 UTC by Conrad Kostecki
Modified: 2017-12-19 06:03 UTC (History)
4 users (show)

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


Attachments
acpi_call-1.1.0-linux-4.14.patch (acpi_call-1.1.0-linux-4.14.patch,319 bytes, patch)
2017-11-14 17:02 UTC, Conrad Kostecki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Kostecki gentoo-dev 2017-11-13 22:42:24 UTC
>>> Emerging (1 of 1) sys-power/acpi_call-1.1.0-r2::gentoo
 * acpi_call-1.1.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                               [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/4.14.0-gentoo/build
 * Found sources for kernel version:
 *     4.14.0-gentoo
 * Checking for suitable kernel configuration options...                                                                                                     [ ok ]
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/sys-power/acpi_call-1.1.0-r2/work
>>> Preparing source in /var/tmp/portage/sys-power/acpi_call-1.1.0-r2/work/acpi_call-1.1.0 ...
 * Applying acpi_call-1.1.0-linux-3.17.patch ...                                                                                                             [ ok ]
 * Applying acpi_call-1.1.0-linux-4.12.patch ...                                                                                                             [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-power/acpi_call-1.1.0-r2/work/acpi_call-1.1.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-power/acpi_call-1.1.0-r2/work/acpi_call-1.1.0 ...
ln: failed to create symbolic link 'Module.symvers': File exists
 * Preparing acpi_call module
make -j13 -l4 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' KDIR=/lib/modules/4.14.0-gentoo/build M=/var/tmp/portage/sys-power/acpi_call-1.1.0-r2/work/acpi_call-1.1.0 default
make -C /lib/modules/4.14.0-gentoo/build M=/var/tmp/portage/sys-power/acpi_call-1.1.0-r2/work/acpi_call-1.1.0 modules
make[1]: Entering directory '/usr/src/linux-4.14.0-gentoo'
  CC [M]  /var/tmp/portage/sys-power/acpi_call-1.1.0-r2/work/acpi_call-1.1.0/acpi_call.o
In file included from /var/tmp/portage/sys-power/acpi_call-1.1.0-r2/work/acpi_call-1.1.0/acpi_call.c:8:0:
./arch/x86/include/asm/uaccess.h: In function 'set_fs':
./arch/x86/include/asm/uaccess.h:32:9: error: dereferencing pointer to incomplete type 'struct task_struct'
  current->thread.addr_limit = fs;
         ^~
make[2]: *** [scripts/Makefile.build:321: /var/tmp/portage/sys-power/acpi_call-1.1.0-r2/work/acpi_call-1.1.0/acpi_call.o] Error 1
make[1]: *** [Makefile:1503: _module_/var/tmp/portage/sys-power/acpi_call-1.1.0-r2/work/acpi_call-1.1.0] Error 2
make[1]: Leaving directory '/usr/src/linux-4.14.0-gentoo'
make: *** [Makefile:8: default] Error 2
 * ERROR: sys-power/acpi_call-1.1.0-r2::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sys-power/acpi_call-1.1.0-r2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-power/acpi_call-1.1.0-r2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-power/acpi_call-1.1.0-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-power/acpi_call-1.1.0-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-power/acpi_call-1.1.0-r2/work/acpi_call-1.1.0'
 * S: '/var/tmp/portage/sys-power/acpi_call-1.1.0-r2/work/acpi_call-1.1.0'
Comment 1 Mike Gilbert gentoo-dev 2017-11-14 01:55:38 UTC
Please provide emerge --info.
Comment 2 Conrad Kostecki gentoo-dev 2017-11-14 06:17:13 UTC
Portage 2.3.13 (python 3.6.3-final-0, default/linux/amd64/13.0/desktop, gcc-6.4.0, glibc-2.26-r3, 4.14.0-gentoo x86_64)
=================================================================
System uname: Linux-4.14.0-gentoo-x86_64-Intel-R-_Core-TM-_i7-6600U_CPU_@_2.60GHz-with-gentoo-2.4.1
KiB Swap:   17301500 total,  17301500 free
Timestamp of repository gentoo: Mon, 13 Nov 2017 20:15:02 +0000
Head commit of repository gentoo: fb22e64161356b145266c144200dfafc7fcbdcf3
Head commit of repository steam-overlay: 356032984149c3ca0bd0cceea6e00f973356d226

sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.3.4 [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.1-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.6-r1::gentoo, 3.5.4-r1::gentoo, 3.6.3-r1::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.6::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0::gentoo
sys-devel/gcc-config:     1.9.0::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r3::gentoo
Repositories:

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

serenity
    location: /usr/local/portage
    masters: gentoo

steam-overlay
    location: /usr/local/portage/steam-overlay
    sync-type: git
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /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/php/apache2-php7.1/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/"
INSTALL_MASK="/etc/systemd/* /etc/xinetd.d/* /usr/lib/systemd/system/*"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,now"
MAKEOPTS="-j13 -l4"
PKGDIR="/usr/portage/packages"
PORTAGE_BUNZIP2_COMMAND="pbunzip2"
PORTAGE_BZIP2_COMMAND="pbzip2"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9e"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--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 aalib accessibility acl acpi adns alsa amd64 ao bcmath berkdb bluetooth bzip2 cairo caps cdda cddb cdinstall cjk cracklib crypt css ctype cups curl cvs cxx dbus dga djvu dri dts dvb dvd encode exif fbcon ffmpeg fftw flac flite fontconfig ftp gd gdbm gif gimp git glut gmp gnome-keyring gnutls gphoto2 gpm gps graphviz gsm gstreamer gtk http iconv icu idn imlib inotify introspection ipv6 java javascript jbig jit joystick jpeg jpeg2k lame lcms ldap libcaca libnotify libsamplerate lm_sensors lzma lzo mad maildir matroska mbox mhash mikmod mmap mng modplug mono mp3 mpeg mtp mysql mysqli ncurses networkmanager nls nntp nptl nsplugin offensive ogg openal opencl openexr opengl openmp orc oss pam pcre pdf perl pie png policykit posix postproc postscript pulseaudio python qt4 qt5 quicktime raw readline recode rtmp samba sasl scanner sdl seccomp session simplexml slang smartcard smp sndfile snmp sockets sound speex spell sqlite ssl startup-notification subversion suid svg symlink syslog tcpd theora threads tiff timidity truetype udev udisks unicode upnp usb v4l vaapi vcd vdpau vim-syntax vnc vorbis wavpack webkit webp wifi wmf x264 xattr xcb xcomposite xface xft xml xmlrpc xmp xpm xscreensaver xv xvid zeroconf zlib zsh-completion" ABI_X86="32 64" COLLECTD_PLUGINS="battery cgroups conntrack contextswitch cpu cpufreq cpusleep df disk dns entropy ethstat exec filecount hddtemp hugepages interface ipc iptables irq load lvm memory netlink nfs nginx openvpn ping postgresql processes protocols rrdcached sensors serial smart swap syslog tcpconns thermal turbostat unixsock uptime users wireless" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2" CURL_SSL="openssl" ELIBC="glibc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de de_DE" LINGUAS="de de_DE" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset fancyindex fastcgi geo geoip gunzip gzip headers_more limit_conn proxy realip referer rewrite sticky stub_status upstream_keepalive" NGINX_MODULES_STREAM="access geo geoip limit_conn realip return ssl_preread" PHP_TARGETS="php7-1" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby24" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="i965 intel"
Unset:  CC, CPPFLAGS, CTARGET, CXX
Comment 3 Conrad Kostecki gentoo-dev 2017-11-14 17:02:02 UTC
Created attachment 504242 [details, diff]
acpi_call-1.1.0-linux-4.14.patch

I don't know, if the solution is me, but when I do remove "#include <asm/uaccess.h>", i am able to compile with kernel 4.14.

Loading module acpi_call works and sending a command via /proc/acpi/call works too.
Comment 4 Zac Medico gentoo-dev 2017-11-15 22:05:03 UTC
There's a similar patch here:

https://github.com/mkottman/acpi_call/pull/67

From ed11815a613908fba103c09c5548469c8640dd19 Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king@canonical.com>
Date: Wed, 28 Jun 2017 14:25:01 +0100
Subject: [PATCH] Include uaccess.h from linux rather than asm path

This fixes a build issue on 4.12 kernels (LP: #1700783)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 acpi_call.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/acpi_call.c b/acpi_call.c
index 3025d97..dede8e9 100644
--- a/acpi_call.c
+++ b/acpi_call.c
@@ -5,7 +5,7 @@
 #include <linux/version.h>
 #include <linux/proc_fs.h>
 #include <linux/slab.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 #include <acpi/acpi.h>
 
 MODULE_LICENSE("GPL");
Comment 5 Conrad Kostecki gentoo-dev 2017-11-15 22:31:09 UTC
(In reply to Zac Medico from comment #4)
> -#include <asm/uaccess.h>
> +#include <linux/uaccess.h>

Yep, I also see, that <linux/uaccess.h> got already added by acpi_call-1.1.0-linux-4.12.patch.
Comment 6 Zac Medico gentoo-dev 2017-11-15 22:48:49 UTC
With "#include <linux/uaccess.h>" it fails for me like in comment #0, and it compiles successfully if I remove the include as in attachment #504242 [details, diff].
Comment 7 Juergen Rose 2017-11-25 16:09:56 UTC
(In reply to Conrad Kostecki from comment #3)
> Created attachment 504242 [details, diff] [details, diff]
> acpi_call-1.1.0-linux-4.14.patch
> 
> I don't know, if the solution is me, but when I do remove "#include
> <asm/uaccess.h>", i am able to compile with kernel 4.14.
> 
> Loading module acpi_call works and sending a command via /proc/acpi/call
> works too.

The patch worked for me.
Comment 8 Juergen Rose 2017-12-15 22:31:46 UTC
(In reply to Conrad Kostecki from comment #3)
> Created attachment 504242 [details, diff] [details, diff]
> acpi_call-1.1.0-linux-4.14.patch
> 
> I don't know, if the solution is me, but when I do remove "#include
> <asm/uaccess.h>", i am able to compile with kernel 4.14.
> 
> Loading module acpi_call works and sending a command via /proc/acpi/call
> works too.

Thanks, the patch worked for me.
Comment 9 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2017-12-19 06:03:53 UTC
fix merged in place, build error.