[Interest] Correcting deployment linkages in Linux shared libraries

Bob Hood bhood2 at comcast.net
Wed Dec 4 03:51:44 CET 2013


There's probably an obvious solution to this, so forgive me if so.

I'm building an Qt-based application that uses shared libraries as plug-ins. 
Both the application and the plug-ins link to the Qt libraries in my
installation (in this case, in /usr/local/qt/4.8.4/...).  When I deploy, I
copy the Qt shared libraries to which the system linked into the same folder
as the application and plug-ins (making sure to retain the symbolic links).  I
also include a qt.conf file in the same folder so the application will pick up
the Qt shared libraries that it finds in the folder with it.

However, the plug-in shared libraries don't seem to be adhering to this
redirection mechanism.  If I deploy to a "clean" installation of my Linux
distribution, the shared libraries have changed their linkages to the Qt
version found in /usr/lib64 (which, in this case, is 4.6.2) instead of using
those in the folder with them.  I discovered using the ldd tool.

Is there a post-build action I need to perform to "fix" these linkages, like
the "install_name_tool" utility under OS X?  If not, how do I get these
plug-ins to use the Qt deployed with them?

Thanks for any pointers.



More information about the Interest mailing list