[fpc-devel] Firebird shared library name change

Graeme Geldenhuys graemeg at opensoft.homeip.net
Mon Aug 24 13:02:24 CEST 2009


I noticed that on newer Ubuntu Linux systems that the name of the
Firebird shared library has changed for v2.x versions of Firebird
Database Server.

$ ls -l /usr/lib/libfbcl*
2009-08-24 12:06 /usr/lib/libfbclient.so.2 -> libfbclient.so.2.1.1
2008-11-19 20:09 /usr/lib/libfbclient.so.2.1.1

It seems the SqlDB + Firebird code only looks for 'libgds.so' and
'libfbclient.so' giving the following error at runtime...

Can not load default Firebird clients ("libgds.so" or "libfbclient.so").
Check your installation.

Is there a way we can better handle this for Firebird v2.x is SqlDB?
After all, Firebird v2.x has been out for quite some time now.

Or should be simply ignore this issue in SqlDB and make it the issue of
the user? This option I do not like to much.

If FBLib, this was handled by looking for newest to oldest versions of
shared library. Loading was done in if..else statements.

    // try v2.x library first
    if not successful loading of libfbclient.so.2 then
       // else try v1.x library
       if not successful loading of libfbclient.so.1 then
         // else try basic library name - no versions
         if not successful loading of libfbclient.so then
            // now user has a real installation problem

  - Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

More information about the fpc-devel mailing list