Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 111675 - cpufreqd-2.0.0 doesn't compile with USE=nvidia on AMD64
Summary: cpufreqd-2.0.0 doesn't compile with USE=nvidia on AMD64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Henrik Brix Andersen
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-11-06 03:13 UTC by LOTH Aurelien
Modified: 2005-12-22 03:03 UTC (History)
2 users (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 LOTH Aurelien 2005-11-06 03:13:26 UTC
This is the emerge's output :

/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
//var/tmp/portage/cpufreqd-2.0.0_pre2/work/nvclock0.8b/src/backend/libbackend.a(backend.o):
relocation R_X86_64_32S against `nv31_get_gpu_speed' can not be used when making
a shared object; recompile with -fPIC
//var/tmp/portage/cpufreqd-2.0.0_pre2/work/nvclock0.8b/src/backend/libbackend.a:
could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [cpufreqd_nvclock.la] Error 1
make[1]: Leaving directory
`/var/tmp/portage/cpufreqd-2.0.0_pre2/work/cpufreqd-2.0.0-pre2/src'
make: *** [install-recursive] Error 1


Reproducible: Always
Steps to Reproduce:
1. On a x86_64, USE="acpi apm lm_sensors nforce2 nvidia" emerge cpufreqd
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-11-06 03:15:24 UTC
Not really willing to guess what does not compile, and emerge --info is missing
as well. 
Comment 2 LOTH Aurelien 2005-11-06 03:38:54 UTC
This is the emerge --info

Portage 2.0.53_rc7 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r3,
2.6.14-gentoo x86_64)
=================================================================
System uname: 2.6.14-gentoo x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.0_pre9
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.13
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -mtune=athlon64 -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon64 -mtune=athlon64 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mir.zyrianes.net/gentoo/
ftp://ftp.tu-clausthal.de/pub/linux/gentoo/
ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo
http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/
ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/
http://ftp.uni-erlangen.de/pub/mirrors/gentoo
ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo
ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo
ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo
http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://ftp.gentoo.mesh-solutions.com/gentoo/
http://pandemonium.tiscali.de/pub/gentoo/
ftp://pandemonium.tiscali.de/pub/gentoo/
ftp://ftp.rz.tu-bs.de/pub/mirror/ftp.gentoo.org/gentoo-distfiles/
http://gentoo.blueyonder.co.uk ftp://mirrors.blueyonder.co.uk/mirrors/gentoo
http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/
ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/"
LINGUAS="fr FR"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="amd64 3dnowex X Xaw3d acpi alsa amuled apm arts avi berkdb bitmap-fonts cdr
corba crypt cups curl divx4linux dvd eds emboss encode esd fam ffmeg flac
foomaticdb fortran gd gdbm gif gmp gnome gpm gstreamer gtk gtk2 guile hal httpd
imlib ipv6 java jpeg junit kde lesstif libwww live lm_sensors lzw lzw-tiff mad
matroska mod motif mozilla mp3 mpeg musicbrainz ncurses neXt new-login nforce2
nls nptl nvidia ogg oggvorbis opengl oss pam pdflib perl png python qt quicktime
readline real remote samba sdl slang spell ssl stats stream svg tcpd tetex tiff
truetype-fonts type1-fonts udev unicode usb userlocales vorbis wmf wxwindows
xine xinerama xml xml2 xmms xosd xpm xv xvid zlib linguas_fr linguas_FR
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY


The package doesn't compile because it needs the flag -fPic
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-11-06 03:42:35 UTC
(In reply to comment #2)
> The package doesn't compile because it needs the flag -fPic

Not asking *why* but *what* in the first place; don't you think it would be
really useful to post ebuild name and version into bug summary?
Comment 4 LOTH Aurelien 2005-11-06 04:15:41 UTC
Sorry, I thinked that I tell you these informations :
So the package is  sys-power/cpufreqd-2.0.0_pre2 with these flags :
 +acpi* +apm* +lm_sensors* +nforce2* +nvidia* -pmu
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2005-11-06 04:22:44 UTC
Reopen
Comment 6 Daniel Michael 2005-11-06 07:54:22 UTC
(In reply to comment #0)
> This is the emerge's output :
> 
> /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
>
//var/tmp/portage/cpufreqd-2.0.0_pre2/work/nvclock0.8b/src/backend/libbackend.a(backend.o):
> relocation R_X86_64_32S against `nv31_get_gpu_speed' can not be used when making
> a shared object; recompile with -fPIC
> //var/tmp/portage/cpufreqd-2.0.0_pre2/work/nvclock0.8b/src/backend/libbackend.a:
> could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[1]: *** [cpufreqd_nvclock.la] Error 1
> make[1]: Leaving directory
> `/var/tmp/portage/cpufreqd-2.0.0_pre2/work/cpufreqd-2.0.0-pre2/src'
> make: *** [install-recursive] Error 1
> 
> 
> Reproducible: Always
> Steps to Reproduce:
> 1. On a x86_64, USE="acpi apm lm_sensors nforce2 nvidia" emerge cpufreqd

(In reply to comment #0)
> This is the emerge's output :
> 
> /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
>
//var/tmp/portage/cpufreqd-2.0.0_pre2/work/nvclock0.8b/src/backend/libbackend.a(backend.o):
> relocation R_X86_64_32S against `nv31_get_gpu_speed' can not be used when making
> a shared object; recompile with -fPIC
> //var/tmp/portage/cpufreqd-2.0.0_pre2/work/nvclock0.8b/src/backend/libbackend.a:
> could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[1]: *** [cpufreqd_nvclock.la] Error 1
> make[1]: Leaving directory
> `/var/tmp/portage/cpufreqd-2.0.0_pre2/work/cpufreqd-2.0.0-pre2/src'
> make: *** [install-recursive] Error 1
> 
> 
> Reproducible: Always
> Steps to Reproduce:
> 1. On a x86_64, USE="acpi apm lm_sensors nforce2 nvidia" emerge cpufreqd

This seems to be just the nvidia use flag. 
I bet that USE="acpi apm lm_sensors nforce2 -nvidia" emerge cpufreqd
will work.
Comment 7 LOTH Aurelien 2005-11-06 10:14:20 UTC
Yes, the flag nvidia crashes the compilation.
It works without it.
Comment 8 Henrik Brix Andersen 2005-11-07 01:26:04 UTC
This compiles and works fine on x86.

Reporter, please try adding "-fPIC" to your CFLAGS and see if that fixes it for
AMD64.
Comment 9 Henrik Brix Andersen 2005-11-07 01:37:05 UTC
Updated summary.
Comment 10 Bernard Cafarelli gentoo-dev 2005-11-07 03:16:24 UTC
Adding -fPIC to CFLAGS won't help, the makefile for nvclock backend redefines it
statically in
/var/tmp/portage/cpufreqd-2.0.0_pre2/work/nvclock0.8b/src/backend/Makefile.in:

CC=@CC@
AR=ar
RANLIB=@RANLIB@

system=@system@
HAVE_NVCONTROL=@HAVE_NVCONTROL@
OBJECTS=backend.o bios.o config.o error.o nv30.o nv31.o nv40.o info.o
overclock.o i2c.o xf86i2c.o lm99.o f75375.o w83l785r.o libc_wrapper.o
CFLAGS=-I../.. -I../nvcontrol


Adding -fPIC to this file CFLAGS did the job for me 
Comment 11 Bernard Cafarelli gentoo-dev 2005-11-27 23:45:11 UTC
Same problem with 2.0.0 final, same fix in
/var/tmp/portage/cpufreqd-2.0.0/work/nvclock0.8b/src/backend/Makefile.in working
for me
Comment 12 Henrik Brix Andersen 2005-11-28 00:49:50 UTC
Reopening.
Comment 13 Henrik Brix Andersen 2005-12-22 03:03:10 UTC
Fixed in CVS. Thank you for reporting this.

Wait a couple of hours, `emerge --sync` and retry.