[opensource-dev] [linux] /usr/bin/ld: error: unsupported symbol binding

Aleric Inglewood aleric.inglewood at gmail.com
Sat Jan 29 07:20:05 PST 2011


If you are using linux and get this error while compiling the viewer:

  /usr/bin/ld: error: unsupported symbol binding

(or, for that matter:

  /usr/bin/gold: error: unsupported symbol binding

then you are using ld.gold version 2.20.x.
You need to upgrade it to 2.21.

If you are using debian then you can get that
from "experimental" (but only if you know what
you're doing ;) .. don't upgrade your whole
system to experimental by accident!), as follows:

To /etc/apt/preferences add:

Package: *
Pin: release a=testing
Pin-Priority: 990

where 'testing' is YOUR CURRENT RELEASE! So,
replace it if you are not using testing.
This preference is to avoid that you upgrade
your whole system: it will prefer 'testing' or
whatever you use over the rest.

Next, add to /etc/apt/sources.list an entry
for experimental:

deb http://ftp.nl.debian.org/debian/ experimental main contrib non-free
deb-src http://ftp.nl.debian.org/debian/ experimental main contrib non-free

replace ftp.nl.debian.org with your own favourite
debian server.

Run "apt-get update" to get the info from
this new entry. Now you could try

apt-cache policy binutils

To see that it would NOT upgrade your binutils
because of the preferences ;).

Next, you can upgrade /usr/bin/gold with:

sudo apt-get install -t experimental binutils

I only tried this on testing though. If you have
an older distribution it might want to upgrade
more than just binutils. If that's the case then
don't do it.

Please note that if you'd install binutils-gold
(which is on experimental) then that will
remove your nvidia kernel module because
that is not compatible with ld.gold. You don't
want that ;).  However, just upgrading binutils
is ok, and then use LDFLAGS="-Wl,-use-gold"
as before to cause the viewer compilation to
use gold.

Aleric

PS I used the same /etc/apt preferences and
/etc/apt/sources.list to get my nvidia driver
from experimental. As root:

update-pciids
apt-get install module-assistant
apt-get install -t experimental nvidia-kernel-source
m-a prepare
m-a clean nvidia
m-a a-i nvidia
apt-get install -t experimental nvidia-glx
depmod -a
modprobe nvidia

which gives me 260.19.21which supports
my video card, while testing still has the old
195.36.31that does not support it.


More information about the opensource-dev mailing list