Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Linking problem during build of several packages [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
mcclung
n00b
n00b


Joined: 24 Apr 2005
Posts: 22

PostPosted: Sun Jan 27, 2013 8:19 pm    Post subject: Linking problem during build of several packages [SOLVED] Reply with quote

Hi,

After gcc 4.6.3 was marked stable, I attempted to recompile my entire system (Wasn't necessary really, I just felt like it). Actually 4 of the gentoo boxes I have, 2 of which worked fine, 2 others have this problem. Normally, I have a few packages with problems when I do a world emerge, and I find workarounds.

Unfortunately, this time, I've had a bunch of odd linking problems that I can't seem to resolve.

The problem is typically that a library is missing from the link command line:

Code:
mv -f .deps/gnome_terminal-terminal-window.Tpo .deps/gnome_terminal-terminal-window.Po
/bin/sh ../libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -pthread -DORBIT2=1 -I/usr/include/vte-0.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/gtk-2.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/libdrm -I/usr/include/gconf/2 -I/usr/include/orbit-2.0   -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare    -O2 -march=native -pipe  -Wl,-O1 -Wl,--as-needed -o gnome-terminal gnome_terminal-eggshell.o gnome_terminal-profile-editor.o gnome_terminal-terminal.o gnome_terminal-terminal-accels.o gnome_terminal-terminal-app.o gnome_terminal-terminal-debug.o gnome_terminal-terminal-encoding.o gnome_terminal-terminal-info-bar.o gnome_terminal-terminal-options.o gnome_terminal-terminal-profile.o gnome_terminal-terminal-screen.o gnome_terminal-terminal-screen-container.o gnome_terminal-terminal-search-dialog.o gnome_terminal-terminal-tab-label.o gnome_terminal-terminal-tabs-menu.o gnome_terminal-terminal-util.o gnome_terminal-terminal-window.o  gnome_terminal-skey-popup.o  gnome_terminal-eggsmclient.o  gnome_terminal-eggdesktopfile.o gnome_terminal-eggsmclient-xsmp.o    gnome_terminal-terminal-marshal.o gnome_terminal-terminal-type-builtins.o  skey/libskey.la -pthread -lvte -lgthread-2.0 -lrt -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgconf-2 -lglib-2.0 -lX11   -lSM   
Wrote skey-challenge.ui
libtool: link: x86_64-pc-linux-gnu-gcc -pthread -DORBIT2=1 -I/usr/include/vte-0.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/gtk-2.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/libdrm -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare -O2 -march=native -pipe -Wl,-O1 -o gnome-terminal gnome_terminal-eggshell.o gnome_terminal-profile-editor.o gnome_terminal-terminal.o gnome_terminal-terminal-accels.o gnome_terminal-terminal-app.o gnome_terminal-terminal-debug.o gnome_terminal-terminal-encoding.o gnome_terminal-terminal-info-bar.o gnome_terminal-terminal-options.o gnome_terminal-terminal-profile.o gnome_terminal-terminal-screen.o gnome_terminal-terminal-screen-container.o gnome_terminal-terminal-search-dialog.o gnome_terminal-terminal-tab-label.o gnome_terminal-terminal-tabs-menu.o gnome_terminal-terminal-util.o gnome_terminal-terminal-window.o gnome_terminal-skey-popup.o gnome_terminal-eggsmclient.o gnome_terminal-eggdesktopfile.o gnome_terminal-eggsmclient-xsmp.o gnome_terminal-terminal-marshal.o gnome_terminal-terminal-type-builtins.o -pthread  -Wl,--as-needed skey/.libs/libskey.a -lvte -lgthread-2.0 -lrt -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 /usr/lib64/libfontconfig.so -lfreetype -lz -lbz2 -lexpat -lgobject-2.0 -lgconf-2 -lglib-2.0 -lX11 -lSM -pthread
Wrote profile-preferences.ui
Generating and caching the translation database
Merging translations into gnome-terminal.schemas.
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: gnome_terminal-eggsmclient-xsmp.o: undefined reference to symbol 'IceConnectionNumber'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'IceConnectionNumber' is defined in DSO /usr/lib/libICE.so.6 so try adding it to the linker command line
/usr/lib/libICE.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[4]: *** [gnome-terminal] Error 1
make[4]: *** Waiting for unfinished jobs....


Same package works fine on a different box. I tried rebuilding x11-libs/libICE, of course. I have several other packages that can't find libm.so or
libgmodule.so, libXau.so, libpthread.so.0. Same symptoms, different libraries.

Meanwhile on other boxes this package works fine. Sometimes unmasking a later revision helped. For the others, I'm thinking of moving them to my overlay to see if I can "fix" them . Searching the forums and google, I've found other people who had similar errors, but I haven't found what causes this.

Anyway, any hints or ideas you can provide would be appreciated. At this point, I hope it's something stupid I did, if it lets me move on from these build errors.

EDIT:

Here's another example:

Code:
x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -Wall -Wmissing-prototypes -Wl,-O1 -o gdmphotosetup gdmphotosetup.o  -Wl,--as-needed libgdmcommon.a /usr/lib64/libglade-2.0.so -L/usr/lib64 -lgmodule-2.0 -lrt -lgtk-x11-2.0 -lxml2 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lX11 /usr/lib64/libfontconfig.so -lfreetype -lz -lbz2 -lexpat ../common/libgdmcommon.a -lutil
/bin/sh ../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -O2 -march=native -pipe -Wall -Wmissing-prototypes   -Wl,-O1 -Wl,--as-needed -o gdmdynamic gdmdynamic.o libgdmcommon.a -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0    -lglib-2.0   -lgobject-2.0 -lglib-2.0   -lgdk-x11-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0   ../common/libgdmcommon.a    -lX11 -lXau -lfontconfig  -lutil -lutil
x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -Wall -Wmissing-prototypes -Wl,-O1 -o gdmXnestchooser gdmXnestchooser.o  -Wl,--as-needed libgdmcommon.a /usr/lib64/libglade-2.0.so -L/usr/lib64 -lgmodule-2.0 -lrt -lgtk-x11-2.0 -lxml2 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lXau -lX11 /usr/lib64/libfontconfig.so -lfreetype -lz -lbz2 -lexpat ../common/libgdmcommon.a -lutil
x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -Wall -Wmissing-prototypes -Wl,-O1 -o gdmflexiserver gdmflexiserver.o  -Wl,--as-needed libgdmcommon.a /usr/lib64/libglade-2.0.so -L/usr/lib64 -lgmodule-2.0 -lrt -lgtk-x11-2.0 -lxml2 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 ../common/libgdmcommon.a -lX11 -lXau /usr/lib64/libfontconfig.so -lfreetype -lz -lbz2 -lexpat -lutil
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: libgdmcommon.a(gdmcomm.o): undefined reference to symbol 'XauFileName'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'XauFileName' is defined in DSO /usr/lib/libXau.so.6 so try adding it to the linker command line
/usr/lib/libXau.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[3]: *** [gdmphotosetup] Error 1
make[3]: *** Waiting for unfinished jobs....
x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -Wall -Wmissing-prototypes -Wl,-O1 -o gdmdynamic gdmdynamic.o  -Wl,--as-needed libgdmcommon.a /usr/lib64/libglade-2.0.so -L/usr/lib64 -lgmodule-2.0 -lrt -lgtk-x11-2.0 -lxml2 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 ../common/libgdmcommon.a -lX11 -lXau /usr/lib64/libfontconfig.so -lfreetype -lz -lbz2 -lexpat -lutil
make[3]: Leaving directory `/var/tmp/portage/gnome-base/gdm-2.20.11-r1/work/gdm-2.20.11/gui'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/gnome-base/gdm-2.20.11-r1/work/gdm-2.20.11/gui'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/gnome-base/gdm-2.20.11-r1/work/gdm-2.20.11'


This one is especially fun because I can clearly see -lXau on the libtool command line but it still doesn't seem to find the XauFileName symbol. Perhaps it needs to be referenced earlier in the link.

Switching back to gcc 4.5.4 had no effect. Still researching this.

EDIT: It appears that having LD_LIBRARY_PATH set in /root/.bashrc was the source of these problems. It took a surprisingly long time to notice this was only set on the boxes with failing compiles. So it wasn't related to gcc. I have had that variable set for a long time without problems, so I am not sure why it's a problem now.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum