Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 375967 - sys-power/cpufrequtils-008{,-r1} compilation failed "can't find a register in class ‘BREG’ while reloading ‘asm’"
Summary: sys-power/cpufrequtils-008{,-r1} compilation failed "can't find a register in...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Matt Turner
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 375921
  Show dependency tree
 
Reported: 2011-07-22 08:10 UTC by Marcin Mirosław
Modified: 2011-07-29 18:45 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,7.07 KB, text/plain)
2011-07-22 08:13 UTC, Marcin Mirosław
Details
patch to fix compilation on x86-32 with -fPIC (0001-aperf-fix-compilation-on-x86-32-with-fPIC.patch,1.15 KB, patch)
2011-07-25 19:16 UTC, Matt Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Mirosław 2011-07-22 08:10:21 UTC
It looks problem appears on x86 and not on amd64.
utils/aperf.c: In function ‘main’:
utils/cpuid.h:8: error: can't find a register in class ‘BREG’ while reloading ‘asm’
utils/cpuid.h:8: error: can't find a register in class ‘BREG’ while reloading ‘asm’
utils/cpuid.h:8: error: ‘asm’ operand has impossible constraints
utils/cpuid.h:8: error: ‘asm’ operand has impossible constraints
make: *** [cpufreq-aperf] Error 1



Reproducible: Always




# emerge --info
Portage 2.1.10.3 (hardened/linux/x86, gcc-4.4.5, glibc-2.12.2-r0, 2.6.38-gentoo-r6 i686)
=================================================================
System uname: Linux-2.6.38-gentoo-r6-i686-Intel-R-_Pentium-R-_4_CPU_3.00GHz-with-gentoo-2.0.2
Timestamp of tree: Fri, 22 Jul 2011 07:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/ccache:          2.4-r9
dev-util/pkgconfig:       0.25-r2
sys-apps/baselayout:      2.0.2
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.68
sys-devel/automake:       1.10.3, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.4.5
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.2.10
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo miro-testowe horhe
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -mfpmath=sse -fprefetch-loop-arrays -fpeel-loops -pipe -s"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -mfpmath=sse -fprefetch-loop-arrays -fpeel-loops -pipe -s"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache collision-protect distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.mirror.pw.edu.pl/"
LANG="pl"
LC_ALL="pl_PL.utf-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="pl en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-y -O"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/staging /usr/portage/local/portage"
SYNC="rsync://rsync6.pl.gentoo.org/gentoo-portage"
USE="acl acpi async automount bash-completion bzip2 caps cdr chroot clamav clamdtop cli cracklib crypt cxx dri ftp gif gmp gpm graphite gzip hardened iconv iproute2 jpeg logrotate logwatch lzo mhash mime mmap mmx mmxext modules mudflap ncurses network-cron nls nologin nptl nptlonly openmp pam pcre pic png posix ppds pppd readline samba session sharedmem slang smp snmp spell sse sse2 ssl swat sysfs syslog threads unicode unzip urandom usb vhosts vim-pager vim-syntax x86 xattr xml xorg zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 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="braindump flow karbon kexi kpresenter krita tables words" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" 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"
Comment 1 Marcin Mirosław 2011-07-22 08:13:54 UTC
Created attachment 280579 [details]
build.log

build.log
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-07-22 09:39:02 UTC

*** This bug has been marked as a duplicate of bug 375899 ***
Comment 3 Marcin Mirosław 2011-07-22 10:00:07 UTC
Lars, what kind of problem is common for my bug and bug #375899 ?
Comment 4 Matt Turner gentoo-dev 2011-07-22 15:43:19 UTC
I don't see the similarity to the bug this is marked a duplicate of.

Marcin, can you reproduce this with cpufrequtils-008? You should be able to, since the cpuid code was added before -008.

I can't reproduce this with gcc-4.5.2 or 4.6.1, but I see that you're using 4.4.5, so maybe that's related?
Comment 5 Marcin Mirosław 2011-07-22 17:29:48 UTC
Indeed, -008 fails to compile too. I think this related to hardened gcc. Please look at those urls: http://linux.derkeiler.com/Newsgroups/comp.os.linux.development.system/2008-01/msg00173.html , http://comments.gmane.org/gmane.linux.oprofile/9684 .
Comment 6 Matt Turner gentoo-dev 2011-07-23 03:44:46 UTC
Thanks. I've got a good idea how to fix it, thanks to the first link you gave.
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-07-25 13:08:40 UTC
(In reply to comment #3)
> Lars, what kind of problem is common for my bug and bug #375899 ?

Sorry I did this by mistake. Of course these two bugs are completely unrelated to each other.
Comment 8 Matt Turner gentoo-dev 2011-07-25 19:16:11 UTC
Created attachment 280953 [details, diff]
patch to fix compilation on x86-32 with -fPIC

Please give the patch a test and confirm that it fixes the problem for you.
Comment 9 Marcin Mirosław 2011-07-26 20:30:17 UTC
Ok, with this patch cpufrequtils compiles cleanly.
Comment 10 Matt Turner gentoo-dev 2011-07-26 23:31:23 UTC
Committed and sent upstream as well. Thanks for reporting and testing!