LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   shared libraries question (https://www.linuxquestions.org/questions/slackware-14/shared-libraries-question-366062/)

rhb327 09-22-2005 05:42 PM

shared libraries question
 
I have a driver/application for a samsung scx4100 printer that needs libqt-mt.3.0.4. I just upgraded to slack 10.2 which uses libqt-mt.3.3.4. The samsung driver/application is linked to 3.0.4 and installs in an odd directory as ldd shows:

root@bairco:/usr/lib# ldd /usr/local/bin/samsung/Configurator | grep libqt
libqt-mt.samsung-mfp.so.3.0.4 => /usr/lib/libqt-mt.samsung-mfp.so.3.0.4 (0xb761d000)
root@bairco:/usr/lib#

a kde application example is:

root@bairco:/usr/lib# ldd /opt/kde/bin/kmail | grep libqt
libqt-mt.so.3 => /usr/lib/./libqt-mt.so.3 (0xb5f1b000)
root@bairco:/usr/lib#

I can manually set the links where both KDE and the samsung software work in my rc.local:

# **** scx4100 setup begin *****
# This should not be needed...
rm /usr/lib/libqt-mt.samsung-mfp.so.3.0.4
ln -s /usr/local/bin/samsung/libqt-mt.so.3.0.4 /usr/lib/libqt-mt.samsung-mfp.so.3.0.4
rm /usr/lib/libqt-mt.so.3
ln -s /usr/lib/qt/lib/libqt-mt.so.3 /usr/lib/libqt-mt.so.3
# **** scx4100 setup end *****

and do so because ldconfig continually modifies this setup on reboots and package installs. So this is a poor solution. I guess I don't know how to force minor sonames differences to resolve to the correct library but I do know that the samsung software does not run with the newer version of libqt-mt (3.3.4) minor or major numbers aside! It seems that this would be a failry common situation; viz., having some software that needs a different version of the library but the major numbers of the libraries are the same!

Thanks!

dunric 09-23-2005 06:05 AM

Code:

man ldconfig
Look at X option too.
Search init scripts in /etc/rc.d .

rhb327 09-23-2005 10:49 AM

Ok, I see that the -X option does not update links. Can you do this just for one library though? I mean I want to update the remaining links, don't I? I think I lack a bit of understanding of exactly how ldconfig works with ld.so other that it makes the cache file to help resolve the links faster at runtime I believe. I probably need to RTFM a bit here...any good shared library tutoirals about? I'm not on my system and can't view the rc.d directory but I can certainly find out where ldconfig is called and add the -X option.

Thanks!


All times are GMT -5. The time now is 05:01 AM.