Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 409479 - sys-apps/kmod-7: modprobe doesn't work with -funroll-loops in CFLAGS
Summary: sys-apps/kmod-7: modprobe doesn't work with -funroll-loops in CFLAGS
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal minor (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-23 22:31 UTC by Jens Maus
Modified: 2012-03-24 21:01 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Maus 2012-03-23 22:31:52 UTC
Yesterday I freshly emerged my system and the updates came with new udev-182 requiring kmod-7 to be merged. It first showed me a conflict because of module-init-tools still being installed. Thus I first unmerged the init-tools and manually merged kmod-7. After reboot the system came up fine. However, I did notice that my ip_tables based firewall wasn't active.

After inspection I recognized that no kernel modules were loaded at all (lsmod returned completly empty). After further investigation I tried to manually "modprobe ip_tables" but got an "FATAL: Module ip_tables not found.". After checking that the module was in the right path I found that "modinfo ip_tables" worked fine returning all information about the module. After another few hours of inspection and a manual recompile of the kmod-7 sources I found that the reason seem to be that I had "-funroll-loops" in my CFLAGS variable in /etc/make.conf. After removing "-funroll-loops" and remerging kmod-7 the "modprobe ip_tables" command worked fine and loaded all modules again after a reboot.

Reproducible: Always

Steps to Reproduce:
1. add "-funroll-loops" in your CFLAGS env variable in /etc/make.conf
2. run "emerge kmod" to remerge the kmod-7 module
3. run "modprobe" on any known kernel module (e.g. 'modprobe ip_tables')

Actual Results:  
the kernel returns with a "FATAL: Module ip_tables not found." error making it impossible to load any kernel module at all. However, doing a "modinfo ip_tables" works perfectly and returns info on the kernel module.

Expected Results:  
kmod-7 should be able to be compiled with "-funroll-loops" or the kmod-7 ebuild should enforce "-funroll-loops" to be removed from CFLAGS.

Portage 2.1.10.51 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.14.1-r2, 3.3.0-gentoo x86_64)
=================================================================
System uname: Linux-3.3.0-gentoo-x86_64-Quad-Core_AMD_Opteron-tm-_Processor_1381-with-gentoo-2.1
Timestamp of tree: Fri, 23 Mar 2012 20:00:01 +0000
app-shells/bash:          4.2_p24
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.7-r2, 2.7.2-r3, 3.2.2-r1
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.9.3
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.3
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O3 -march=opteron -funroll-loops -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/bind /var/www/localhost/htdocs/roundcube"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-pipe -O3 -march=opteron -funroll-loops -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 apache2 bash-completion berkdb bzip2 chroot cli cracklib crypt cxx dri fortran gdbm gif gnutls gpm iconv idn iproute2 ipv6 jbig jpeg jpeg2k logrotate mmx modules mpeg mudflap multilib ncurses nls nptl nptlonly openmp pam pcre png pppd readline session sse sse2 ssl sysfs tcpd threads tiff unicode urandom vim-syntax xorg zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" 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 ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-4 php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 William Hubbs gentoo-dev 2012-03-24 21:01:47 UTC
According to our optimization guide [1], you should never use
dangerously agressive CFLAGS like this in make.conf.

[1] http://www.gentoo.org/doc/en/gcc-optimization.xml