Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 579718 - hardened-sources-4.4.x can't compile external module: error: code model kernel does not support PIC mode
Summary: hardened-sources-4.4.x can't compile external module: error: code model kern...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-12 11:09 UTC by Marcin Mirosław
Modified: 2016-05-09 19:35 UTC (History)
0 users

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


Attachments
kernel .config (.config,65.40 KB, text/x-mpsub)
2016-04-12 11:11 UTC, Marcin Mirosław
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Mirosław 2016-04-12 11:09:06 UTC
When I try to compile e.g. xtables-addons I'm getting:
/var/tmp/portage/net-firewall/xtables-addons-2.10/work/xtables-addons-2.10/extensions/compat_xtables.c:1:0: error: code model kernel does not support PIC mode
 /*
 ^
scripts/Makefile.build:264: recipe for target '/var/tmp/portage/net-firewall/xtables-addons-2.10/work/xtables-addons-2.10/extensions/compat_xtables.o' failed


ALso on other kernel modules I've got similar problem:
/var/tmp/portage/sys-kernel/cryptodev-1.7/work/cryptodev-linux-1.7/ioctl.c:1:0: error: code model kernel does not support PIC mode
 /*

Reproducible: Always




Portage 2.2.26 (python 3.4.3-final-0, hardened/linux/amd64/no-multilib, gcc-4.9.3, glibc-2.22-r4, 4.4.2-hardened x86_64)
=================================================================
System uname: Linux-4.4.2-hardened-x86_64-Intel-R-_Xeon-R-_CPU_E5-2630_v2_@_2.60GHz-with-gentoo-2.2
KiB Mem:     1018512 total,     36824 free
KiB Swap:     819196 total,    761572 free
Timestamp of repository gentoo: Tue, 12 Apr 2016 10:00:01 +0000
sh bash 4.3_p42-r1
ld GNU gold (Gentoo 2.25.1 p1.1 2.25.1) 1.11
ccache version 3.2.4 [enabled]
app-shells/bash:          4.3_p42-r1::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

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


Installed sets: @nagios-plugins, @sheepdog
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=corei7 -mtune=native    -fno-unwind-tables -fno-asynchronous-unwind-tables -fuse-linker-plugin -s    -ftracer    -fuse-ld=gold -fvar-tracking-assignments"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=corei7 -mtune=native    -fno-unwind-tables -fno-asynchronous-unwind-tables -fuse-linker-plugin -s    -ftracer    -fuse-ld=gold -fvar-tracking-assignments"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -march=corei7 -mtune=native    -fno-unwind-tables -fno-asynchronous-unwind-tables -fuse-linker-plugin -s    -ftracer    -fuse-ld=gold -fvar-tracking-assignments"
FEATURES="assume-digests binpkg-logs ccache cgroup collision-protect compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=corei7 -mtune=native    -fno-unwind-tables -fno-asynchronous-unwind-tables -fuse-linker-plugin -s    -ftracer    -fuse-ld=gold -fvar-tracking-assignments"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="pl_PL.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-O"
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"
USE="acl aio amd64 apache2 bash-completion bzip2 caps cli cracklib crypt cxx dri hardened iconv idn ipv6 justify lto mmx mmxext modules nano-syntax ncurses nls nptl openmp pax_kernel pcre pie readline seccomp session smp sse sse2 ssl ssp threads unicode urandom vhosts vim-syntax xattr xtpax zlib" ABI_X86="64" APACHE2_MODULES="alias auth_basic authn_alias authn_anon auth_digest authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cgi dav dav_fs dav_lock dir env expires ext_filter filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif status unique_id usertrack vhost_alias" APACHE2_MPMS="itk" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="apache aggregation bind cgroups conntrack contextswitch cpu curl curl_json df disk dns email entropy ethstat exec filecount interface iptables irq lvm match_regex mysql netlink load memory network nginx notify_email ntpd openvpn ping postgresql processes protocols rrdcached rrdtool snmp statsd swap syslog tail tcpconns unixsock uptime vmem" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4 sse4.1 ssse3" ELIBC="glibc" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" NGINX_MODULES_HTTP="access browser charset gzip map limit_zone proxy rewrite spdy stub_status gzip_static" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" USERLAND="GNU" XTABLES_ADDONS="fuzzy geoip lscan psd sysrq tarpit"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 1 Marcin Mirosław 2016-04-12 11:11:32 UTC
Created attachment 430232 [details]
kernel .config
Comment 2 Marcin Mirosław 2016-04-16 23:57:12 UTC
This happened also on other host with gcc with hardened profile and sys-kernel/aufs-sources.
Comment 3 Marcin Mirosław 2016-04-29 09:48:05 UTC
I'm very missing my external kernel modules...;)
Comment 4 Magnus Granberg gentoo-dev 2016-05-09 15:29:38 UTC
Disable ccache when you build kernels moduls.
Comment 5 Marcin Mirosław 2016-05-09 19:35:38 UTC
Magnus, thank you for your advice. It looks that ccache-3.2.x changes behaviour, with ccache-3.1.x I don't have such problem.