Re: problem with missing link to libX11
Travis Watkins <[email protected]> Mon, 03 Jan 2011 22:43:58 -0600
| Newsgroups | gmane.comp.gnome.devel |
|---|---|
| Message-ID | <[email protected]> |
On 01/03/2011 12:14 PM, Enrico Minack wrote: > > Hi Gnome developers, > > I recently came across a strange compilation problem where multiple > projects fail to compile with the same error? They compiled earlier, and > I have a fresh installation. The error is: > /usr/bin/ld: ...: undefined reference to symbol '...' > /usr/bin/ld: note: '...' is defined in DSO .../libX11.so so try adding > it to the linker command line > .../libX11.so: could not read symbols: Invalid operation > > The problem can be fixed by adding $(X_LIBS) to the *_LDADD variable of > Makefile.am, see bug #638510: > https://bugzilla.gnome.org/show_bug.cgi?id=638510 > > Projects with this problem are (respective branch): > gnome-applets (master) > gnome-panel (gtk3) > libwnck (gtk3) > > I am using Ubuntu 11.04 (development branch). > > Any idea? > > Cheers, > Enrico > The linker in Ubuntu natty (and most other distros with releases in development, I think?) is stricter. You used to be able to have libA use symbols from libB and libC but only link to libB because libB links to libC so you get an implicit dependency. You now have to explicitly link to all libraries you use symbols from. -- Travis Watkins