PDA

View Full Version : Slackware Help


n5fee
08-Oct-2009, 02:04 AM
I started using Beyond Compare at work on Windows machines and love it. At home I run Windows and Slackware Linux. I bought a dual platform Beyond Compare license. Windows runs with no problem. I have tried to run BC on Slackware 12.1 and 12.2 and Slax 6.0 and get similar results that do not work. After the install, an icon shows up in the KDE K-Development menu. Clicking the icon starts a bouncing icon that lasts 5 or 6 seconds and then disappears. BC never starts.

When I run BCompare using a command line, I get:

root@d520:/downloads/bcompare-3.1.6.10721# bcompare
/usr/local/bin/bcompare: symbol lookup error: /usr/local/lib/beyondcompare/libqtc.so.1: undefined symbol: _ZNK13QWindowsStyle9classNameEv
root@d520:/downloads/bcompare-3.1.6.10721#

Is anybody using Slackware?

Dallas Shell

Aaron
15-Oct-2009, 04:22 PM
Do you have QT3 (32bit) installed?

If you are running 64bit, do you have the 32bit compatibility libraries (if available) installed?

n5fee
15-Oct-2009, 07:06 PM
I think I do. I am not a linux expert but Slackware 12 uses KDE 3.5 and is susposed to be based on qt3 from what I can read. All of my Linux is the 32-bit x86 release.

Here is my /usr/lib qt entries:

lrwxrwxrwx 1 root root 17 2008-08-19 10:40 libqt-mt.so -> libqt-mt.so.3.3.8*
lrwxrwxrwx 1 root root 17 2008-08-19 10:40 libqt-mt.so.3 -> libqt-mt.so.3.3.8*
lrwxrwxrwx 1 root root 17 2008-08-19 10:40 libqt-mt.so.3.3 -> libqt-mt.so.3.3.8*
-rwxr-xr-x 1 root root 6958628 2008-02-28 18:04 libqt-mt.so.3.3.8*

I have tried un-taring the tar files and installing Beyond Compare that way. I have also tried using the rpm2tgz utility and installing Beyond Compare using pkgtool. Both methods yeild the same error code. I do think I am missing a library that your libqtc.so.1 is looking for. I just can't figure out what it is looking for so I can try to find the required library. Google searching for the
undefined symbol: _ZNK13QWindowsStyle9className
returns just a handful of hits, one of which is my question in this forum.

David
20-Oct-2009, 10:08 AM
Hi,

QWindowsStyle::className is a method that should be provided by libqt-mt.so. I am wondering if the version of libqt-mt.so that you have was compiled without the WindowsStyle support (this is a module that makes the widgets look like Vista widgets).

Could you try the following
"grep -i qwindowsstyle /usr/lib/libqt-mt.20"

On my ubuntu install I get the result
"Binary file /usr/lib/libqt-met.so matches"

I also did a search on qwindowsstyle.h and found it either in
/usr/lib/qt3/include or
/usr/include/qt3

I googled "slackware libqt-mt.so qwindowsstyle" to see if there were any hits that indicate it is not commong for QWindowsStyle to not be include for slackware. But I didn't find anything obvious.

Let me know what you find with the grep and then we'll see were we can go from there.

David

n5fee
21-Oct-2009, 07:08 AM
Hi David,

I followed you instructions:

dallas@l400ds:~$ grep -i qwindowsstyle /usr/lib/libqt-mt.20
grep: /usr/lib/libqt-mt.20: No such file or directory

I suspect you had a typo and the "--mt.20" should be "--mt.so" so I tried that. Here it is:

dallas@l400ds:~$ grep -i qwindowsstyle /usr/lib/libqt*
Binary file /usr/lib/libqt-mt.so matches
Binary file /usr/lib/libqt-mt.so.3 matches
Binary file /usr/lib/libqt-mt.so.3.3 matches
Binary file /usr/lib/libqt-mt.so.3.3.8 matches
dallas@l400ds:~$

I did the same search thru the entire /usr/lib/ directory and get:

dallas@l400ds:~$ grep -i qwindowsstyle /usr/lib/*
Binary file /usr/lib/libkjsembed.so matches
Binary file /usr/lib/libkjsembed.so.1 matches
Binary file /usr/lib/libkjsembed.so.1.0.0 matches
Binary file /usr/lib/libqt-mt.so matches
Binary file /usr/lib/libqt-mt.so.3 matches
Binary file /usr/lib/libqt-mt.so.3.3 matches
Binary file /usr/lib/libqt-mt.so.3.3.8 matches
dallas@l400ds:~$

I used midnight commander to look around in the /usr directory for anything with qt3 like /usr/lib/qt3/include, /usr/include/qt3 and did not see directories like that.

Next I looked for anything with "qwindowsstyle.h" in the entire /usr directory.

root@l400ds:/home/dallas# grep -i qwindowsstyle.h /usr/* -R > greplist.txt

This generated 18 pages of what looks like mostly instructional manual pages. They looked something like /doc, /man, html files with "qwindowsstyle.h" in the documents somewhere. I don't think they were program files, but are just textual descriptions. They are not easy to decode to me. I can send you those if you like, but this message board would probably not be the correct venue.

Dallas

David
21-Oct-2009, 09:51 AM
Dallas,

Yep the .20 was a typo. Thanks for figuring that out.

I don't have any definite fixes here yet - just poking around collecting some info that I hope will lead to an answer. So don't expect anything big yet - and feel free to disagree with me :D

The way to find qwindowsstyle.h is from command prompt
>> sudo find / -name "qwindowsstyle.h"

That should turn up where it is at though it doesn't really tell us much about the problem.

The complete symbol we want to find is qwindowsstyle9classname. When I do
>> grep -i qwindowsstyle9classname /usr/lib/libqt-mt.so
I get a match. Could you try that please.

We can also verify which libqt-mt.so that bcompare and libqtc are using. From command prompt inside the beyondcompare lib directory do:
>> ldd libqtc

and

>> ldd BCompare

This will print out a list of required libraries for each file and where they were found in your system (or if they weren't found).

(On my box the beyondcompare library is found in /home/djenkins/lib/beyondcompare. Yours might be different depending on where you extracted things at)

The above steps will verify that libqtc can find qwindowsstyle9classname in /usr/lib/libqt-mt.so and that /usr/lib/libqt-mt.so is the library that is being used.

Cheers

David

n5fee
22-Oct-2009, 08:06 AM
David,

Just for the record: When I originally installed the program using the following command (from README):

1) extract files.
> tar zxvf BCompare_*.tar.gz

2) run install.sh
> cd bcompare-*
> ./install.sh

A red and blue Beyond Compare icon showed up in the KDE K-Development menu bar.

After this did not work, I did try converting the rpm package to a Slackware package using the rpm2tgz converter program. I then installed this Slackware tgz package using the install package manager. This produced the same results, so I used the package manager to remove the package. I then ran your install.sh script from the tar file.

The point of all this: there may be files where they should not be. The un-install package manager is supposed to remove files it installed, but in my current configuration there have been multiple installs on this box.

Now, back to your questions. I should have looked for the file this way, I thought you were looking for a # include qwindowsstyle.h in a program somewhere. Here is the search for the file.

root@l400ds:/usr/local/lib/beyondcompare# find / -name qwindowsstyle.h
/usr/lib/qt-3.3.8b/include/qwindowsstyle.h
root@l400ds:/usr/local/lib/beyondcompare#

Now, the following search does not find anything:

root@l400ds:~# grep -i qwindowsstyle9classname /usr/lib/libqt-mt.so
root@l400ds:~#

So, I go to /usr/lib/ and look for any libqt-mt
root@l400ds:/usr/lib# ls -l libqt-mt*

lrwxrwxrwx 1 root root 18 2008-08-19 10:40 libqt-mt.so -> qt/lib/libqt-mt.so*
lrwxrwxrwx 1 root root 20 2008-08-19 10:40 libqt-mt.so.3 -> qt/lib/libqt-mt.so.3*
lrwxrwxrwx 1 root root 22 2008-08-19 10:40 libqt-mt.so.3.3 -> qt/lib/libqt-mt.so.3.3*
lrwxrwxrwx 1 root root 24 2008-08-19 10:40 libqt-mt.so.3.3.8 -> qt/lib/libqt-mt.so.3.3.8*
root@l400ds:/usr/lib#

Everything here is linked to /qt/lib/libqt.....

But there is no /qt/.... directory. I am sure this is a problem. Here is a partial directory listing from the root directory:

.....
drwxr-xr-x 10 root root 4096 2006-09-25 22:09 mnt/
drwxr-xr-x 7 root root 4096 2008-10-20 21:14 opt/
dr-xr-xr-x 101 root root 0 2009-10-22 01:54 proc/
drwx--x--- 26 root root 4096 2009-10-22 08:02 root/
drwxr-xr-x 2 root root 4096 2008-04-23 15:50 sbin/
....

Now your next question. I change to the /usr/local/lib/beyondcompare directory and do the lld libqtc I get nothing, so I did the ldd on the only libqtc I see in that directory namely libqtc.so.1

root@l400ds:/usr/local/lib/beyondcompare# ldd libqtc
ldd: ./libqtc: No such file or directory

root@l400ds:/usr/local/lib/beyondcompare# ls -l
total 26348
-rwxr-xr-x 1 root root 19907662 2009-10-22 07:50 BCompare*
-rwxr-xr-x 1 root root 894 2009-10-22 07:50 context_init.sh*
drwxr-xr-x 2 root root 20480 2009-10-22 07:37 help/
-rwxr-xr-x 1 root root 4781 2009-10-22 07:50 kde_context_menu*
-rw-r--r-- 1 root root 6984099 2009-10-22 07:50 libqtc.so.1
-rwxr-xr-x 1 root root 151 2009-10-22 07:50 nautilus_compare.sh*
-rwxr-xr-x 1 root root 195 2009-10-22 07:50 nautilus_compare_to_selected.sh*
-rwxr-xr-x 1 root root 181 2009-10-22 07:50 nautilus_select_for_compare.sh*

root@l400ds:/usr/local/lib/beyondcompare# ldd libqtc.so.1
ldd: warning: you do not have execution permission for `./libqtc.so.1'
linux-gate.so.1 => (0xffffe000)
libqt-mt.so.3 => /usr/lib/libqt-mt.so.3 (0xb740c000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb73fe000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb7317000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7231000)
libm.so.6 => /lib/libm.so.6 (0xb720b000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xb7200000)
libc.so.6 => /lib/libc.so.6 (0xb70b3000)
libmng.so.1 => /usr/lib/libmng.so.1 (0xb7052000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7032000)
libpng.so.3 => /usr/lib/libpng.so.3 (0xb6ff7000)
libz.so.1 => /usr/lib/libz.so.1 (0xb6fe3000)
libGL.so.1 => /usr/lib/libGL.so.1 (0xb6f8b000)
libXmu.so.6 => /usr/lib/libXmu.so.6 (0xb6f75000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb6f6d000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb6f67000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb6f5e000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb6f5b000)
libXft.so.2 => /usr/lib/libXft.so.2 (0xb6f49000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb6eda000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb6eaf000)
libSM.so.6 => /usr/lib/libSM.so.6 (0xb6ea7000)
libICE.so.6 => /usr/lib/libICE.so.6 (0xb6e90000)
libdl.so.2 => /lib/libdl.so.2 (0xb6e8c000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb6e75000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb6e71000)
libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb6e6f000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb6e58000)
/lib/ld-linux.so.2 (0x80000000)
liblcms.so.1 => /usr/lib/liblcms.so.1 (0xb6e21000)
libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb6e1c000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb6e18000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb6e13000)
libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb6e0a000)
libXt.so.6 => /usr/lib/libXt.so.6 (0xb6dbb000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb6d9b000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb6d95000)
root@l400ds:/usr/local/lib/beyondcompare#

root@l400ds:/usr/local/lib/beyondcompare# ldd BCompare
linux-gate.so.1 => (0xffffe000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7f40000)
libqtc.so.1 => not found
libqtc.so.1 => not found
libX11.so.6 => /usr/lib/libX11.so.6 (0xb7e59000)
librt.so.1 => /lib/librt.so.1 (0xb7e50000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7e38000)
libdl.so.2 => /lib/libdl.so.2 (0xb7e34000)
libc.so.6 => /lib/libc.so.6 (0xb7ce8000)
libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb7ce6000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb7ccf000)
/lib/ld-linux.so.2 (0xb7f73000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb7ccb000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7cc6000)
root@l400ds:/usr/local/lib/beyondcompare#

I am sure this is another problem, beyond compare cannot find libqtc.so.1 From the earlier search we know it is in /usr/local/lib/beyondcompare But I notice the permissions on that file are restricted, does it need something different?

root@l400ds:/usr/local/lib/beyondcompare# ls -l libqtc.so.1
-rw-r--r-- 1 root root 6984099 2009-10-22 07:50 libqtc.so.1

Next?

Thanks,
Dallas

David
22-Oct-2009, 10:37 AM
Dallas,

When I do ldd on BCompare it also tells me that it cannot find libqtc. I am pretty sure that this is because it doesn't know to look in the local directory for libraries. The run script takes care of this by setting LD_LIBRARY_PATH to include the directory where libqtc sits. If you were to do
>> export LD_LIBRARY_PATH=path_to_beyondcompare:$LD_LIBRARY_ PATH
I think ldd on BCompare would then find libqtc. So I am not concerned about this.

However, I noticed that when you did ldd on libqtc.so.1 it did complain about you not having permissions to execute that file. So I would try changing the permissions on that file.
>> sudo chmod 755 libqtc.so.1

and then see if that makes any difference running bcompare. I kind of think it won't but it is worth a try.

I think that your libqt-mt.so does not support QWindowsStyle - or a least not in the format that the libqtc.so.1 is expecting. You could email me your libqt-mt.so.3 (david@scootersoftware.com) and I could browse through the strings in it to see if I could find what the difference is (QWindowsStyle not there at all of just doesn' t match QWindowsStyle9className). Or you could go ahead and try to re-install libqt-mt.so.3.

David

David
26-Oct-2009, 09:41 AM
Dallas,

I opened up the libqt-mt to that you sent to me and search the strings. There is one non-symbol reference to QWindowsStyle but none of the actual application symbols for QWindowsStyle are there. So I am fairly convinced that your currently installed version of libqt-mt.so was not built with QWindowsStyle included.

So the next step would be to try and install a different libqt-mt.so.3.3.8 that does include QWindowsStyle.

I am not familiar with slackware. The distributions that I am familiar with include the apt-get or yum utilities (and/or interfaces to apt-get like 'synaptic'). These utilities allows your to install/re-install/update libraries and check for dependencies along the way.

A quick google seems to indicate that slackware (as of about 2007) didn't include those utilities. Though I did see a reference to installing apt-get on slackware.

Using those utilities are usually the easiest way to install. But what they do behind the scenes you can also do which is to find the tar or rpm files that include the libraries you want, download them, and then untar them or use rpm to install them. It just gets a little trickier since you have to handle dependencies yourself. Usually a distribution will have an archive somewhere on line where you can get the base tar/rpm files needed.

The other option would be to download the Qt 3.3.8 SDK / distribution source and build it yourself. This might or might not be a daunting choice. For development that I am working on I recently brought down the Qt 4.5 source and built. The source included all the scripts needed to build and install - it was fairly painless. I don't know if the Qt 3.3.8 source would be equally painless.

Regards

David

n5fee
29-Oct-2009, 07:21 AM
David,

I downloaded a copy of qt-x11-free-3.3.8b.tar.bz2 and put the file in /usr/local. I then installed according to the INSTALL instructions as follows:

#cd /usr/local
#tar -xvf qt-x11-free-3.3.8b.tar.bz2
#mv qt-x11-free-3.3.8 qt
#chown -R root:root qt (for some reason my files had other owners)

I added path directives in the /root/.profile file as directed

#export QTDIR PATH MANPATH LD_LIBRAY_PATH
#logout

login again as root as directed in INSTALL

#cd /usr/local/qt
#./configure
#make
#make install

The make and make install took a couple of hours

I tried bcompare. Still got symbol lookup error:/usr/local/beyondcompare/libtc.so.1 undefined symbol as before

I ran the beyond compare un-install script.

I moved the original beyond compare tar file to /usr/local

As root, I untarred beyond compare in /usr/local

I ran the beyond compare install script from /usr/local/becompare....

I tried bcompare. Still same error about un-defined symbol

Any more ideas for me to try?

Thanks,
Dallas

David
29-Oct-2009, 12:03 PM
Dallas,

I downloaded the qt-x11-free-3.3.8b.tar.bz2 and built it up. Doing just base install with base ./configure I got a libqt.so.1. The library that beyondcompare is looking for is libqt-mt.so.1. The -mt stands for multi-threaded.

So then I rebuilt but this time did a "./configure -thread" to enable the thread support and I ended up with a 'libqt-mt.so.1. I did a "grep QWindowsStyle9className libqt-mt.so.1" and it showed a match.

So I suggest a rebuild with ./configure -thread and then make sure that the libqt-mt.so.1 that is being used by bcompare is the one you just built (you might mv the current libqt-mt.so.1 to some other location/name so that for sure isn't the one being used).

Cheers

David

n5fee
29-Oct-2009, 07:57 PM
David,

Taking your suggestion, I did the following:

#cd /usr/local/qt
#./configure -thread
#make
#make install

Looking in the /usr/local/qt/lib for the files that were generated I see:

root@l400ds:/usr/local/qt/lib# ls -l libqt*
-rw-r--r-- 1 root root 798 2009-10-29 16:17 libqt-mt.la
-rw-r--r-- 1 root root 736 2009-10-29 16:17 libqt-mt.prl
lrwxrwxrwx 1 root root 17 2009-10-29 19:12 libqt-mt.so -> libqt-mt.so.3.3.8*
lrwxrwxrwx 1 root root 17 2009-10-29 19:12 libqt-mt.so.3 -> libqt-mt.so.3.3.8*
lrwxrwxrwx 1 root root 17 2009-10-29 19:12 libqt-mt.so.3.3 -> libqt-mt.so.3.3.8*
-rwxr-xr-x 1 root root 8708668 2009-10-29 19:12 libqt-mt.so.3.3.8*
-rw-r--r-- 1 root root 739 2009-10-29 08:25 libqt.la
-rw-r--r-- 1 root root 635 2009-10-29 08:25 libqt.prl
lrwxrwxrwx 1 root root 14 2009-10-29 00:10 libqt.so -> libqt.so.3.3.8*
lrwxrwxrwx 1 root root 14 2009-10-29 00:10 libqt.so.3 -> libqt.so.3.3.8*
lrwxrwxrwx 1 root root 14 2009-10-29 00:10 libqt.so.3.3 -> libqt.so.3.3.8*
-rwxr-xr-x 1 root root 8609940 2009-10-29 00:10 libqt.so.3.3.8*
root@l400ds:/usr/local/qt/lib#

You got a libqt-mt-so.1 I did not. What did I do wrong?

As expected, I tried running bcompare and get the same error as before.

Next, I ran the beyond compare install script.

root@l400ds:/usr/local/bcompare-3.1.7.10865# ./install.sh

I tried running bcompare and get the same error as before.

root@l400ds:/usr/local/bcompare-3.1.7.10865# bcompare
/usr/local/bin/bcompare: symbol lookup error: /usr/local/lib/beyondcompare/libqtc.so.1: undefined symbol: _ZNK13QWindowsStyle9classNameEv
root@l400ds:/usr/local/bcompare-3.1.7.10865#

Any other thoughts?

Thanks,
Dallas

David
30-Oct-2009, 08:52 AM
Dallas,

My bad. It is libqt-mt.so (i.e. I get the same files that you do). Did you try grepping the libqt-mt.so that you got to see if QWindowsStyle9className was found in it? If it is found then you just need to make sure that libqtc.so.1 is finding the new libqt-mt that you compiled. Do ldd on libqtc.so.1 again and verify that it is connecting to the correct libqt-mt. If it is not then you can just cp the new libqt-mt.so to a location where it is found (like /usr/lib).

David

n5fee
01-Nov-2009, 07:39 PM
David,

I think we are getting close. Still not quite there yet. It looks like it should work to me. Here is what I did:

First I look at the new library I just compiled for a name match.

root@l400ds:/usr/local/qt/lib# grep QWindowsStyle9className libqt-mt.so.3.3.8
Binary file libqt-mt.so.3.3.8 matches
root@l400ds:/usr/local/qt/lib# grep QWindowsStyle9classNameEv libqt-mt.so.3.3.8
Binary file libqt-mt.so.3.3.8 matches
root@l400ds:/usr/local/qt/lib# grep _ZNK13QWindowsStyle9classNameEv libqt-mt.so.3.3.8
Binary file libqt-mt.so.3.3.8 matches

This looks like the library has the name in it. Now I look at beyond compare's library to see where it is expecting to find this library.

root@l400ds:/usr/local/bcompare-3.1.7.10865# ldd libqtc.so.1
ldd: warning: you do not have execution permission for `./libqtc.so.1'

libqt-mt.so.3 => /usr/lib/libqt-mt.so.3 (0xb73f4000)

I changed the permissions on libtc.so.1 to 777 just to make sure this was not a problem. Your program is looking for this file in /usr/lib So, I look there.

root@l400ds:/usr/lib# ls -l libqt-mt.so.3
lrwxrwxrwx 1 root root 20 2008-08-19 10:40 libqt-mt.so.3 -> qt/lib/libqt-mt.so.3

I find a link there pointing somewhere else. The object of this link does not exist (there is no /qt/lib/ directory). So I created a new directory named qt/lib and created a link in that directory pointing to the location of the new library file I just compiled.

mkdir /qt/lib/

cd /qt/lib

ln -s /usr/local/qt/lib/libqt-mt.so.3 libqt-mt.so.3

This creates a link to the actual library file.

root@l400ds:/qt/lib# ls -l
lrwxrwxrwx 1 root root 31 2009-11-01 20:45 libqt-mt.so.3 -> /usr/local/qt/lib/libqt-mt.so.3

Still no cigar.

root@l400ds:/# bcompare
/usr/local/bin/bcompare: symbol lookup error: /usr/local/lib/beyondcompare/libqtc.so.1: undefined symbol: _ZNK13QWindowsStyle9classNameEv
root@l400ds:/#

This looks like it should be finding this symbol in the Qt library. Any more Ideas?

Dallas

n5fee
01-Nov-2009, 08:28 PM
David,

I was doing some more work on this and found something that I wanted to pass on to you. I was reading the /usr/local/bin/bcompare.sh script that runs the program. It looks to me like it is doing a ldd on /usr/local/lib/beyondcompare/BCompare and looking for any "not found" reports.

When I go do the same thing from the command line I get:

dallas@l400ds:/usr/local/lib/beyondcompare$ ldd BCompare
libqtc.so.1 => not found
libqtc.so.1 => not found

Dallas

David
02-Nov-2009, 12:11 PM
Dallas,

Some clarifications first. libqtc.so.1 is a library that BCompare uses not something that we have written ourselves. We include it since must distributions do not have it.

When you do 'ldd' on an object the resulting paths are not hardcoded in the object but where the dynamic linker was able to find the needed libraries. So when ldd says that libqtc.so.1 is using /usr/lib/libqt-mt.so, this is not a hardcoded path in libqtc.so.1 but the first place that the linker found a copy of libqt-mt.so in your filesystem.

Libraries can reside anywhere inside your filesystem - the key is getting the linker to find them. There are standard directories that the linker looks in /lib, /usr/lib, /usr/local/lib, etc. You can add to the search paths with the environment variable LD_LIBRARY_PATH. This is what the bcomp script does. It sets LD_LIBRARY_PATH to include the directory where libqtc.so.1 resides so that the linker can find libqtc.so.1 when it runs BCompare. This is why you cannot run BCompare straight out - LD_LIBRARY_PATH is not set to include the location of libqtc.so.1 (you can manually set LD_LIBRARY_PATH and call ./BCompare - directly though you would loose some other functionality that the bcomp script provides). (google or manpage ldconfig, ldd, ld, ld.conf).

I believe that this is also the reason why libqtc.so.1 was not found when you did 'ldd BCompare' i.e. LD_LIBRARY_PATH was not set to include the location of libqtc.so.1 and therefore the linker could not find it.

So back to fixing your problem.

The library that you created does appear to have the correct symbols in it. Though we could do one more grep to make sure that the full symbol is there. So
'grep _ZNK13QWindowsStyle9classNameEv libqt-mt.so.3'
and verify that there is a match.

If there is a match it should just be a matter of getting that library in the correct location that the linker can find it first before it finds the old libqt-mt.so.3.

If it were my machine I would create a temp directory in my home directory and move all the old Qt library stuff there. Since this directory would not be in the linker search path then it should never find that old library. The test would be that if you try to run bcomp then you should see an error message about libqt-mt.so.3 not found (assuming that the new libqt-mt.so.3 is not sitting in a directory known by the linker).

It would actually be useful to make sure that the new libqt-mt.so.1 is not in a standard searchable directory. If it is not then you can keep removing any libqt-mt.so.1's that are found when you ldd libqtc.so.1 until none are found. This way you can guarantee that it is using the one that you want it to use. Sine you have already run a 'find' on libqt-mt.so* then there are probably on the old one and the one you just created. However... it wouldn't hurt to verify that.

I would then go ahead and copy the new libqt-mt.so.3 straight into /usr/lib (no symbolic links - the symbolic links are a convenience to allow you to easily change the link to different/new versions of the library). And then try running bcomp.

David

n5fee
02-Nov-2009, 01:20 PM
David,

That did it. It works now.

I first moved the following 4 files to a new directory in my home directory, /home/dallas/oldqt
/usr/lib/@libqt-mt.so
/usr/lib/@libqt-mt.so.3
/usr/lib/@libqt-mt.so.3.3
/usr/lib/libqt-mt.so.3.3.8

Next I copied the newly made files below to /usr/lib
/usr/local/qt/lib/@libqt-mt.so
/usr/local/qt/lib/@libqt-mt.so.3
/usr/local/qt/lib/@libqt-mt.so.3.3
/usr/local/qt/lib/libqt-mt.so.3.3.8

Beyond compare started up and looks normal.

This was a learning experience for me. Now I will build a new system from scratch so I can duplicate what all happened to make sure I understand it.

Thanks for the help.

Dallas

David
02-Nov-2009, 02:56 PM
Dallas,

Excellent. Pats on the back all the way around. Thanks for being patient and sticking with it until we got it going. Check back in if something breaks when you redo it all from scratch.

David

David
02-Nov-2009, 03:03 PM
Dallas,

I forgot the warning. Now that you got it working with a different set of libraries and you put those libraries into the main directory (i.e. /usr/lib) you will want to keep an eye out that that change didn't break the dependencies for other apps that you use.

Linux being the wonderful beast that it is, some apps can have some very specific requirements for the libraries that they rely on (sometimes even just version number). When you start replacing libraries or moving them around you can accidentally find those dependencies.

This is why a lot of distributions include tools for managing apps and libraries like yum and apt. The tools help track down and watch the dependencies.

It is also why you saw the interesting symbolic links to the libqt-mt.so that were difficult to track down. The symbolic links can be used to switch libraries quickly or mitigate issues when two different apps (that you need to run at the same time) require two different versions of the same library.

Have fun :D

David

Aaron
02-Nov-2009, 03:20 PM
Hello n5fee,

It would appear your email may not be set up correctly. Your forum notifications are bouncing. If you would like to address this, please double check your email in your User CP and then email support@scootersoftware.com (with a link back to this forum post).

Thanks.

n5fee
05-Nov-2009, 02:10 PM
For the benefit of anyone interested in Slackware here is the condensed version of all of the earlier messages. Here are the steps I used to get Beyond Compare 3.1.7.10865 running in both Slackware 12.1 and 12.2

Dowload qt-x11-free-3.3.8b.tar.bz2 and place file in /usr/local.
# cd /usr/local
# tar -xvf qt-x11-free-3.3.8b.tar.bz2
# chown -R root:root /usr/local/qt-x11-free-3.3.8b (my file had non root owners and groups)
# mv qt-x11-free-3.3.8b qt (rename according to instructions README)

# cd /root
look for .profile
I do not have one, so make one and put some stuff in it according to directions in README
# touch .profile
Add several lines to .profile

QTDIR=/usr/local/qt
PATH=$QTDIR/bin:$PATH
MANPATH=$QTDIR/doc/man:$MANPATH
LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH

Save /root/.profile

# export QTDIR PATH MANPATH LD_LIBRARY_PATH

logout as root then log back in as root

# cd /usr/local/qt

# ./configure -thread
# make
# make install

The make and install took about 3 hours on my old Dell L400 laptop

I swaped the following files around using Midnight Commander (included in slackware type mc from command prompt.)

Move the following 4 files to a new folder out of the way. I moved them to /home/tempqt
/usr/lib/@libqt-mt.so
/usr/lib/@libqt-mt.so.3
/usr/lib/@libqt-mt.so.3.3
/usr/lib/@libqt-mt.so.3.3.8

Copy the following 4 new files to /usr/lib to replace the 4 we just hid away.
/usr/local/qt/lib/@qt-mt.so
/usr/local/qt/lib/@qt-mt.so.3
/usr/local/qt/lib/@qt-mt.so.3.3/
/usr/local/qt/lib/qt-mt.so.3.3.8

Beyond compare appears to work fine now. I have not noticed anything else not working as a result of my changes.