|
From: Joe E. <jen...@fl...> - 2007-07-20 18:49:41
|
Mats Bengtsson wrote:
> I've built tileqt on my own linux machine and there it works OK but one of my
> testers
> have problems. System:
> [info patchlevel] = 8.4.14
> tile 0.7.3
> I think I've built tileqt with the same version of tile but I'm not sure.
>
> Trying to debug it results in the following:
>
> couldn't load file "bin/unix/Linux/i686/tileqt /libtileqt0.4.so":
> libpng.so.3: cannot open shared object file: No such file or directory
Probable cause: the build machine has a different version
of libpng than the target machine. Whether it's newer or
older is hard to say -- libpng releases have historically
been pretty good about preserving source compatibility,
but not so great at preserving binary compatibility.
To make matters more complicated it hasn't followed a
consistent convention for SONAMEs either, and different
distros have used different strategies to mitigate this.
Some Linux distros make older libpng versions available
in compatibility packages -- you could try '{yum|apt-get|whatever}
install libpng.so.3" or the equivalent on the target machine.
Personally, I would not expect that to work -- it might get
past that error, but there are almost certainly more compatibility
issues waiting after that one (more below).
> Adding this library all hell breaks loose resulting in very strange errors
How did you add the library?
> I've seen before when I created Tcl_Obj corruption when creating Tcl_Obj
> on arbitrary threads:
> couldn't load file "bin/unix/Linux/i686/tileqt /libtileqt0.4.so":
> bin/unix/Linux/i686/tileqt /libtileqt0.4.so: undefined symbol:
> Ttk_StateTableLookup
>
> error reading package index file /usr/lib/vfs1.3/pkgIndex.tcl: syntax
> error in expression "[package provide Tcl] < 8.4": extra tokens at end
> of expression
> ...
>
> and there is no end to it.
> I wonder how tileqt is built. Not sure what the relations are between tileqt
> and tile.
> In other words, what to do to avoid problems like this?
In this particular case: I notice that tileqt doesn't directly
call anything from libpng, so there's no need to include "-lpng"
on the link line. (Qt uses libpng, but since ELF systems support
transitive dependencies you don't need to specify it when linking
libtileqt.so.) Try removing -l flags from the link line until
you get a minimal set of dependencies.
Of course there are still two big issues: libqt and libstdc++.
Expect to see cross-distro compatibility issues with those two, too.
Your best bet is to compile and link libtileqt.so on the same
platform as the target host.
--Joe English
jen...@fl...
|