[CMake] Qt 4.3.0 - Relinking causes unresolved symbol errors

Matthew Smith indigojo at blogistan.co.uk
Wed Jun 6 04:06:47 EDT 2007


Hi everyone,

I recently downloaded the source for Qt 4.3.0 and did a sandboxed local 
installation - i.e. /usr/local/Trolltech/Qt-4.3.0/ rather than 
installing the libs to the usual library directory.  I configured and 
compiled my application QTM, and then installed it to /usr/local/bin. 
It failed, with this error:

/usr/local/bin/qtm: symbol lookup error: /usr/local/bin/qtm: undefined 
symbol: _ZN9QListData7detach2Ev

When running it from the build directory, it ran fine.  It turns out 
that, when installing, it relinks the program, causing it to source qt 
at /usr/lib, which is where the Ubuntu packages of Qt 4.2.3 are 
installed.  Since QTM uses Qt 4.3 features if compiled with Qt 4.3, it 
fails.

When building on SUSE 10.2 with SUSE's own downloadable RPMs of Qt 4.3, 
this behaviour is not replicated, nor is it when using the same version 
of CMake (2.4.6) on the Mac, with a similar sandboxed install of Qt 4.2. 
  It seems only to affect sandboxed installs of Qt 4.3.

How can I get rid of this relinking behaviour?  Surely, if you install a 
program having compiled it from source, you should expect it to link the 
same libraries as when you compiled it.

Thanks in advance,

Matt Smith

-- 

http://www.blogistan.co.uk/qt/


More information about the CMake mailing list