Summary: | net-misc/spice-gtk-0.31[gtk3] with ld.gold: ./.libs/libspice-client-gtk-2.0.so: error: undefined reference to 'XGetKeyboardControl' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alexandre Rostovtsev (RETIRED) <tetromino> |
Component: | Current packages | Assignee: | Virtualization Team <virtualization> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alex_y_xu, esigra, fosero, ormaaj |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://github.com/SPICE/spice-gtk/pull/3 | ||
See Also: | https://bugs.freedesktop.org/show_bug.cgi?id=97383 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 269315, 372079 | ||
Attachments: |
net-misc/spice-gtk-0.31 build log
temporary workaround Proper fix -- set X11_LIBS from pkg-config and put it in LIBADD |
I think you need to report this upstream too, or else it won't be fixed. Created attachment 442680 [details, diff]
temporary workaround
Patch for ebuild which I'm using in my overlay
Created attachment 443616 [details, diff]
Proper fix -- set X11_LIBS from pkg-config and put it in LIBADD
Here's the proper fix. Confirmed it works on version 0.31 (stable); I'll post it upstream after I check if it's relevant on newer versions as well.
Fix pushed to gentoo repo for all versioned packages. commit c772ac4e3d9c439779e97994d752a4b7afb645c4 Author: Ian Stakenvicius <axs@gentoo.org> Date: Wed Aug 17 16:13:30 2016 -0400 net-misc/spice-gtk: explicitly link libX11 the right way for ld.gold Bug: http://bugs.gentoo.org/585118 Package-Manager: portage-2.2.28 |
Created attachment 436582 [details] net-misc/spice-gtk-0.31 build log When building spice-gtk-0.31 with ld.gold, the build fails due to underlinking. # binutils-config --linker ld.gold # emerge -1 spice-gtk [...] ./.libs/libspice-client-gtk-2.0.so: error: undefined reference to 'XGetKeyboardControl' ./.libs/libspice-client-gtk-2.0.so: error: undefined reference to 'XGetPointerControl' ./.libs/libspice-client-gtk-2.0.so: error: undefined reference to 'XChangePointerControl' ./.libs/libspice-client-gtk-2.0.so: error: undefined reference to 'XkbGetMap' ./.libs/libspice-client-gtk-2.0.so: error: undefined reference to 'XkbGetNames' ./.libs/libspice-client-gtk-2.0.so: error: undefined reference to 'XkbFreeKeyboard' ./.libs/libspice-client-gtk-2.0.so: error: undefined reference to 'XListExtensions' ./.libs/libspice-client-gtk-2.0.so: error: undefined reference to 'XFreeExtensionList' collect2: error: ld returned 1 exit status make[4]: *** [Makefile:1285: spicy] Error 1 If using ld.bfd, everything works (but probably only because ld.bfd failed to eliminate some unneeded objects even with --as-needed).