nvidia-settings fails with the following error: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.2/../../../../x86_64-pc-linux-gnu/bin/ld: .objs/NvCtrlAttributesVidMode.o: in function NvCtrlSetColorAttributes:NvCtrlAttributesVidMode.c(.text+0x4b9): undefined reference to 'pow' /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.2/../../../../x86_64-pc-linux-gnu/bin/ld: .objs/NvCtrlAttributesXv.o: in function NvCtrlXvAttributesClose:NvCtrlAttributesXv.c(.text+0x333): undefined reference to 'dlclose' and so on... the missing functions are parts of libm and libdl. I'm using binutils with gold-linker. emerge --info: Portage 2.2_rc46 (default/linux/amd64/2008.0/desktop, gcc-4.4.2, glibc-2.9_p20081201-r2, 2.6.31-gentoo-r3 x86_64) ================================================================= System uname: Linux-2.6.31-gentoo-r3-x86_64-AMD_Athlon-tm-_64_Processor_3700+-with-gentoo-2.0.1 Timestamp of tree: Thu, 22 Oct 2009 06:45:01 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] ccache version 2.4 [enabled] app-shells/bash: 4.0_p33 dev-java/java-config: 1.3.7-r1, 2.1.8-r1 dev-lang/python: 2.6.3, 3.1.1-r1 dev-python/pycrypto: 2.0.1-r8 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.6.4-r3 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.5.1-r1 sys-apps/sandbox: 2.1 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe -msse3" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config" 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/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=k8 -O2 -pipe -msse3" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests ccache collision-protect distlocks fixpackages metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS=" ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo" LANG="de_DE@euro" LC_ALL="de_DE@euro" LDFLAGS="-Wl,-O1" LINGUAS="de" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" 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/local/portage/layman/initng /usr/local/portage/layman/portato /usr/local/portage /usr/local/overlays/qt" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X a52 aac acl acpi aiglx alsa amd64 bash-completion berkdb branding bzip2 cairo cdr cli consolekit cracklib crypt cscope cups dbus dri dts dvb dvd dvdr dvdread emboss encode evo exceptions exif exiv2 fam fbcon ffmpeg flac flash fortran gdbm gif ginac glitz gphoto2 gpm hal iconv imagemagick ipv6 isdnlog java jpeg jpeg2k kde kdehiddenvisibility kipi lcms libnotify lm_sensors mad mikmod mmx mmxext modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin nvidia odbc ogg openal openexr opengl openmp pam pcre pdf perl png ppds pppd python qt-copy qt3 qt3support qt4 quicktime readline reflection scanner sdl session spell spl sqlite sqlite3 sse sse2 ssl ssse3 startup-notification svg sysfs tcpd tetex theora threads thunar tiff truetype unicode usb vcd vorbis x264 xcomposite xine xml xml2 xorg xscreensaver xulrunner xv xvid xvmc 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" SANE_BACKENDS="epson" USERLAND="GNU" VIDEO_CARDS="fbdev nv nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Reproducible: Always
Please post the build.log for reference.
Created attachment 208194 [details] build log
Hm, the link command doesn't seem to include -lm or -ldl, maybe that has something to do with the missing symbols...
It is much more likely that it has something to do with gold linker that OP mentioned. I already need to have few files like this: > $ cat /etc/portage/env/media-gfx/gimp-2.6.7 > # fix for gold linker > LDFLAGS="-lglib-2.0 -lgobject-2.0 -lm" I looks to me like gold is in some cases dropping/ignoring some transitive dependencies from libs, where original linker respects them. But I haven't investigated it too deep yet, I'm trying to rebuild system with gold first and see if it disappears when all files are linked by same linker (atm nvidia-settings fail for me with binutils-1.20[gold] too).
Same problem, binutils-1.20 WITHOUT gold. i686-pc-linux-gnu-gcc -c -O2 -march=native -pipe -fomit-frame-pointer -Wall -O -DNDEBUG -I/usr/X11R6/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I doc -I src -I src/image_data -I src/xpm_data -I src/gtk+-2.x -I src/libXNVCtrl -I src/libXNVCtrlAttributes -I src/XF86Config-parser -I samples src/libXNVCtrlAttributes/NvCtrlAttributesGlx.c -o .objs/NvCtrlAttributesGlx.o src/libXNVCtrlAttributes/NvCtrlAttributesXv.c: In function ‘NvCtrlInitXvAttributes’: src/libXNVCtrlAttributes/NvCtrlAttributesXv.c:214: warning: pointer targets in passing argument 2 of ‘__libXv->XvQueryExtension’ differ in signedness src/libXNVCtrlAttributes/NvCtrlAttributesXv.c:214: note: expected ‘unsigned int *’ but argument is of type ‘int *’ src/libXNVCtrlAttributes/NvCtrlAttributesXv.c:214: warning: pointer targets in passing argument 3 of ‘__libXv->XvQueryExtension’ differ in signedness src/libXNVCtrlAttributes/NvCtrlAttributesXv.c:214: note: expected ‘unsigned int *’ but argument is of type ‘int *’ src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:195:2: warning: #warning Old xf86vmode.h; dynamic gamma ramp support will not be compiled. src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c: In function ‘NvCtrlInitVidModeAttributes’: src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:214: error: ‘prev_error_handler’ undeclared (first use in this function) src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:214: error: (Each undeclared identifier is reported only once src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:214: error: for each function it appears in.) src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:199: warning: label ‘blocked’ defined but not used src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:84: warning: unused variable ‘i’ src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:84: warning: unused variable ‘event’ src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:84: warning: unused variable ‘ret’ src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c: In function ‘NvCtrlSetColorAttributes’: src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:273: warning: unused variable ‘ret’ src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:272: warning: unused variable ‘ch’ src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:272: warning: unused variable ‘i’ make: *** [.objs/NvCtrlAttributesVidMode.o] Error 1 make: *** Waiting for unfinished jobs....
(In reply to comment #5) > Same problem, binutils-1.20 WITHOUT gold. That is NOT the same problem. prev_error_handler is a function-pointer declared in NvCtrlAttributesVidMode.c, it is an internal symbol. "pow" "dlopen" etc. are external symbols lying in libm and libdl. What i don't like is this: ### src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:195:2: warning: #warning Old xf86vmode.h; dynamic gamma ramp support will not be compiled. ### That is the problem, as ### #if defined(X_XF86VidModeGetGammaRampSize) <---- LOOK HERE!!! /* * XXX The XF86VidMode extension can block remote clients. * Unfortunately, there doesn't seem to be a good way to determine if * we're blocked or not. So, we temporarily plug in an error handler, * and watch for the XF86VidModeClientNotLocal error code, set a flag * indicating that we should not use the XF86VidMode extension, and * then restore the previous error handler. Yuck. * * XXX Different versions of XFree86 trigger errors on different * protocol; older versions trigger an error on * XF86VidModeGetGammaRampSize(), but newer versions appear to only * error on XF86VidModeSetGammaRamp(). */ static Bool vidModeBlocked = False; static int vidModeErrorBase = 0; static int (*prev_error_handler)(Display *, XErrorEvent *) = NULL; ### prev_error_handler only gets declared, when X_XF86VidModeGetGammaRampSize is defined. Also have a look at the comment below the "if defined". Which versions of x11-libs/libXxf86vm and x11-proto/xf86vidmodeproto do you have installed? BTW: I did a complete rebuild of my system after upgrading GCC from 4.3 to 4.4, with binutils[gold], and i get this error.
I have same issues. The current version of libXx86vm is 1.1.0 and xf86vidmodeproto is 2.3
Missing symbols during _compilation_ is duplicate of bug #289744 and is caused by new libXxf86vm. I did some cleaner test case to confirm that gold is the culprit. With patch for libXxf86vm from that bug in local overlay: $ ld -v GNU ld (GNU Binutils) 2.20 $ emerge -1 =nvidia-settings-190.42 (no error) $ ld -v GNU gold (GNU Binutils 2.20) 1.9 $ emerge -1 =nvidia-settings-190.42 ... /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.2/../../../../x86_64-pc-linux-gnu/bin/ld: .objs/NvCtrlAttributesVidMode.o: in function NvCtrlSetColorAttributes:NvCtrlAttributesVidMode.c(.text+0x4b7): error: undefined reference to 'pow' /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.2/../../../../x86_64-pc-linux-gnu/bin/ld: .objs/NvCtrlAttributesXv.o: in function NvCtrlXvAttributesClose:NvCtrlAttributesXv.c(.text+0x333): error: undefined reference to 'dlclose' (... more link errors ...) $ echo 'LDFLAGS="-lm -ldl"' >> /etc/portage/env/media-video/nvidia-settings-190.42 $ emerge -1 =nvidia-settings-190.42 (no error again)
x11-proto/xf86vidmodeproto-2.3 x11-libs/libXxf86vm-1.1.0 Didn't realize its a different error. I'll try rebuild world and see what happens.
with x11-proto/xf86vidmodeproto-2.3 x11-libs/libXxf86vm-1.1.0 same errors
Yet another bug with 2 mixed issues. The header bug was fixed, sync in a hour. But the USE=gold and linking issue remains unsolved.
(In reply to comment #5) > Same problem, binutils-1.20 WITHOUT gold. > > i686-pc-linux-gnu-gcc -c -O2 -march=native -pipe -fomit-frame-pointer -Wall -O > -DNDEBUG -I/usr/X11R6/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include > -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 > -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 > -I/usr/include/freetype2 -I/usr/include/libpng12 -I doc -I src -I > src/image_data -I src/xpm_data -I src/gtk+-2.x -I src/libXNVCtrl -I > src/libXNVCtrlAttributes -I src/XF86Config-parser -I samples > src/libXNVCtrlAttributes/NvCtrlAttributesGlx.c -o .objs/NvCtrlAttributesGlx.o > src/libXNVCtrlAttributes/NvCtrlAttributesXv.c: In function > ‘NvCtrlInitXvAttributes’: > src/libXNVCtrlAttributes/NvCtrlAttributesXv.c:214: warning: pointer targets in > passing argument 2 of ‘__libXv->XvQueryExtension’ differ in signedness > src/libXNVCtrlAttributes/NvCtrlAttributesXv.c:214: note: expected ‘unsigned > int *’ but argument is of type ‘int *’ > src/libXNVCtrlAttributes/NvCtrlAttributesXv.c:214: warning: pointer targets in > passing argument 3 of ‘__libXv->XvQueryExtension’ differ in signedness > src/libXNVCtrlAttributes/NvCtrlAttributesXv.c:214: note: expected ‘unsigned > int *’ but argument is of type ‘int *’ > src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:195:2: warning: #warning Old > xf86vmode.h; dynamic gamma ramp support will not be compiled. > src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c: In function > ‘NvCtrlInitVidModeAttributes’: > src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:214: error: > ‘prev_error_handler’ undeclared (first use in this function) > src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:214: error: (Each undeclared > identifier is reported only once > src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:214: error: for each > function it appears in.) > src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:199: warning: label > ‘blocked’ defined but not used > src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:84: warning: unused variable > ‘i’ > src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:84: warning: unused variable > ‘event’ > src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:84: warning: unused variable > ‘ret’ > src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c: In function > ‘NvCtrlSetColorAttributes’: > src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:273: warning: unused > variable ‘ret’ > src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:272: warning: unused > variable ‘ch’ > src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c:272: warning: unused > variable ‘i’ > make: *** [.objs/NvCtrlAttributesVidMode.o] Error 1 > make: *** Waiting for unfinished jobs.... > Fixed by declaring static int (*prev_error_handler)(Display *, XErrorEvent *) = NULL; outside #if defined(X_XF86VidModeGetGammaRampSize) in src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c
(In reply to comment #12) > Fixed by declaring > static int (*prev_error_handler)(Display *, XErrorEvent *) = NULL; > outside #if defined(X_XF86VidModeGetGammaRampSize) > in src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c > I'm trying to make a patch, but I didn't really understand how to modify the code, exactly. What do you mean for "outside"? Should that line to be substituted or what else? Thank you, Flavio
Created attachment 227401 [details, diff] Fixes the bug nr 290432 After applying this patch, I can compile nvidia-settings.
(In reply to comment #14) > Created an attachment (id=227401) [details] > Fixes the bug nr 290432 > > After applying this patch, I can compile nvidia-settings. > Same here, this patch fixed the problem.
I've got them fixed by editing src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c and added after #include <X11/extensions/xf86vmode.h> the line #include <X11/extensions/xf86vmproto.h> now they compiles fine.
Here are my steps to install ebuild /usr/portage/media-video/nvidia-settings/nvidia-settings-180.60.ebuild configure edit /var/tmp/portage/media-video/nvidia-settings-180.60/work/nvidia-settings-1.0/src/libXNVCtrlAttributes/NvCtrlAttributesVidMode.c like my previous post ebuild /usr/portage/media-video/nvidia-settings/nvidia-settings-180.60.ebuild compile install qmerge
Created attachment 247592 [details, diff] Stefan Oswald patch for 173 branch Thanks Stefan, build peacefully
Created attachment 247594 [details] ebuild for Stefan Oswald patch for 173 branch ebuild applying patch from Stefan Oswald (173 branch)
Comment on attachment 247592 [details, diff] Stefan Oswald patch for 173 branch this bug report has nothing to do with these missing X symbols. file a new bug.
Comment on attachment 247594 [details] ebuild for Stefan Oswald patch for 173 branch this bug report has nothing to do with these missing X symbols. file a new bug.
if the main nvidia-settings prog needs libm/libdl/etc..., it must link directly against those libraries. if it links against some other lib which happens to link against libm/libdl, that is not sufficient.
19x.xx doesn't exist anymore, all others should build fine now, please re-open in case I am wrong.