[fpc-pascal] linux: should we hard-code versioned or unversioned shared libraries in our apps?

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Aug 15 12:43:39 CEST 2012


Hi,

This issue has come up before in a fcl-db discussion regarding the
Firebird Database, where the libfbclient.so was missing from many
Linux distros (eg: Ubuntu 10.04), but a libfbclient.so.2.0 was
available instead. FCL-DB only checks for the unversioned shared
libraries, thus your application will probably not run out of the box.

I've stumbled across this problem again today with OpenSUSE 12.1 and
Synapse where I send emails from inside my applications via a secure
SMTP connection. The Synapse library is looking for libssl.so, but by
default OpenSUSE only has libssl.so.1.0.0.

In both these cases, I manually created unversioned symlinks to those
libraries, and that got my applications working again. This is not
ideal, but I don't know how else to handle this.

Does any body know what is the "most correct" way of handling this? Am
I supposed to modify my copies of fcl-db and synapse to look for
specific versions of these shared libraries, or should I somehow add
a function in my application installation that checks in unversioned
shared libraries exist, and if not, try and create those (which would
require root access - and might cause problems an client installs).

Anybody know of any Linux documentation URL that explain when
unversioned shared libraries are used and when not, and how
applications are supposed to handle this?

-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net



More information about the fpc-pascal mailing list