[COLUG] Shared Libraries

Mark Erbaugh mark at microenh.com
Mon Jul 7 07:54:47 EDT 2008


On Sun, 2008-07-06 at 23:50 -0400, Mark Erbaugh wrote:
> I've developed an application using Python with some add-on libraries.
> I'm using cxFreeze to create a distributable version.  I am using Ubuntu
> Dapper as my development platform
> 
> cxFreeze is picking up most needed files, but when I try to install it
> on a machine with a different version of Ubuntu (in this case, Kubuntu
> Gutsy), the program complains about three missing shared libraries:
> 
> libpython2.4.s0.1.0
> libsybdb.so.5
> 
> and 
> 
> libpq.so.4
> 
> I can install the first two libraries from the Ubuntu repositories.
> However, libpq.so.4 is not in the Gutsy repository, instead there is
> libpq.so.5. Even if I install that, the program complains about
> libpq.so.4.
> 
> If I copy libpq.so.4 from my Dapper workstation to the same directory as
> my application on the Gutsy machine and execute ldconfig to add that
> directory to the library lookup, the application runs. However, when I
> re-boot, I sometimes have to re-run ldconfig.  I also feel like I should
> be adding libpq.so.4 to the same place (/usr/lib) as libpq.so.5.
> 
> I tried a couple of things which seemed to work.  Is either the
> "correct" solution?
> 
> 1) libpq.so.5 was actually a symbolic link to libpq.so.5.0. I created a
> new symbolic link named libpq.so.4 which also pointed to libpq.so.5.0. I
> assume that this fools my program into using libpq.so.5 when it wants
> libpq.so.4 and that the libraries are similar enough. As of yet, I
> haven't thoroughly tested my program to see if the incompatibilities
> cause problems.
> 
> 2) I just copied libpq.so.4 into /usr/lib.

I ran into a further problem installing on another machine.  This
machine is running Ubunty Hardy, but it is running the 64-bit version.
I installed python 2.4 from the repository, but when I launch my frozen
application, it complains that it can't find libpython2.4.so.1.0.
However ldconfig finds libpython2.4.so.1.0 in /usr/lib and ldd shows no
unsatisfied dependencies.

If I copy libpython2.4.so.1.0 from my Dapper machine and use ldconfig to
add it to the shared libraries on my 64-bit machine, the application
works, so my guess is that the program is looking for a 32-bit library.

Is there a way to create a cxFreez'ed (cxFrozen?) program not be so
picky about the shared libraries?



More information about the colug432 mailing list