Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 585118 - net-misc/spice-gtk-0.31[gtk3] with ld.gold: ./.libs/libspice-client-gtk-2.0.so: error: undefined reference to 'XGetKeyboardControl'
Summary: net-misc/spice-gtk-0.31[gtk3] with ld.gold: ./.libs/libspice-client-gtk-2.0.s...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Virtualization Team
URL: https://github.com/SPICE/spice-gtk/pu...
Whiteboard:
Keywords:
Depends on:
Blocks: gold-tracker underlinking
  Show dependency tree
 
Reported: 2016-06-05 20:06 UTC by Alexandre Rostovtsev (RETIRED)
Modified: 2016-08-17 20:19 UTC (History)
4 users (show)

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


Attachments
net-misc/spice-gtk-0.31 build log (spice-gtk-0.31-build.log.txt,455.44 KB, text/plain)
2016-06-05 20:06 UTC, Alexandre Rostovtsev (RETIRED)
Details
temporary workaround (spice-gtk-0.32-r1.ebuild.patch,704 bytes, patch)
2016-08-06 14:29 UTC, Jiří Moravec
Details | Diff
Proper fix -- set X11_LIBS from pkg-config and put it in LIBADD (spice-gtk-libs.patch,1.11 KB, patch)
2016-08-17 18:29 UTC, Ian Stakenvicius (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Rostovtsev (RETIRED) gentoo-dev 2016-06-05 20:06:47 UTC
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).
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2016-07-04 10:20:16 UTC
I think you need to report this upstream too, or else it won't be fixed.
Comment 2 Jiří Moravec 2016-08-06 14:29:47 UTC
Created attachment 442680 [details, diff]
temporary workaround

Patch for ebuild which I'm using in my overlay
Comment 3 Ian Stakenvicius (RETIRED) gentoo-dev 2016-08-17 18:29:32 UTC
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.
Comment 4 Ian Stakenvicius (RETIRED) gentoo-dev 2016-08-17 20:19:34 UTC
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