[Interest] Link error while building Qt/32 on Linux 64 bits

Henry Skoglund fromqt at tungware.se
Sun Aug 27 08:01:02 CEST 2017

On 2017-08-27 07:42, Christian Gagneraud wrote:
> On 27 August 2017 at 16:08, Thiago Macieira <thiago.macieira at intel.com> wrote:
>> On Saturday, 26 August 2017 18:25:16 PDT Christian Gagneraud wrote:
>>> /usr/bin/ld.gold: warning: skipping incompatible
>>> //usr/lib/x86_64-linux-gnu/libSM.so while searching for SM
>>> /usr/bin/ld.gold: error: cannot find -lSM
>>> /usr/bin/ld.gold: warning: skipping incompatible
>>> //usr/lib/x86_64-linux-gnu/libICE.so while searching for ICE
>>> /usr/bin/ld.gold: error: cannot find -lICE
>>> .obj/qxcbsessionmanager.o:qxcbsessionmanager.cpp:function
>>> QXcbSessionManager::~QXcbSessionManager(): error: undefined reference
>>> to 'SmcCloseConnection'
>> The undefined reference is caused by the libraries listed right before it not
>> being found.
> Not sure to get what you mean.
> Given this:
> -lxcb-xinerama -L/home/krys/Projects/qt5/qtbase/lib
> -lQt5ServiceSupport -lQt5ThemeSupport -lQt5EventDispatcherSupport
> -lQt5FontDatabaseSupport -lfontconfig -lfreetype
> -lQt5LinuxAccessibilitySupport -lQt5AccessibilitySupport -lGL -lQt5Gui
> -lQt5DBus -lQt5Core -lpthread -lX11 -lX11-xcb -lXi -lSM -lICE
> -lxcb-xkb -lxcb-render-util -lxcb-render -lxcb -lxcb-shm -lxcb-sync
> -lxcb-xfixes -lxcb-randr -lxcb-image -lxcb-keysyms -lxcb-icccm
> -lxcb-shape -lGL
> Should I focus at the libs on the right or on the left of "-lSM -lICE"?
> My understanding of ld tells me to look on the right (reverse dependency order).
> I think I have installed all these libraries. The only weird thing i
> can see comes from my libGL:
> krys at krys-pc:~/Projects/qt5$ ldconfig -p | grep libGL.so
>          libGL.so.1 (libc6,x86-64) => /usr/lib/nvidia-375/libGL.so.1
>          libGL.so.1 (libc6) => /usr/lib32/nvidia-375/libGL.so.1
>          libGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so
>          libGL.so (libc6,x86-64) => /usr/lib/nvidia-375/libGL.so
>          libGL.so (libc6) => /usr/lib/i386-linux-gnu/libGL.so
>          libGL.so (libc6) => /usr/lib32/nvidia-375/libGL.so
> And apt-get always complaining with:
> /sbin/ldconfig.real: /usr/lib/nvidia-375/libEGL.so.1 is not a symbolic link
> /sbin/ldconfig.real: /usr/lib32/nvidia-375/libEGL.so.1 is not a symbolic link

Those nvidia errors I also had for a long time, but upgrading Nvidia 
driver solved it (for example to 'nvidia-384') by adding this ppa:
sudo add-apt-repository ppa:graphics-drivers/ppa

Rgrds Henry

More information about the Interest mailing list