[fpc-devel] SqlDB + Firebird application doesn't run on new Ubuntu installation

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Nov 26 09:29:31 CET 2009


Hi,

I previously raised this issue, but nothing came from that message thread.

  http://lists.freepascal.org/lists/fpc-devel/2009-August/017296.html

To recap, here is the problem...

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. Apparently this change in not only limited to Ubuntu,
but many other Linux distro's too.

----------------------------------
$ 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
----------------------------------


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

Without the un-versioned symbolic link, SqlDB + Firebird applications
will not run, even if the user installed the 'libfbclient2' package.


I was told that only development packages include the un-versioned
symbolic link, because only the linker (and other development tools)
should be the only apps that use that unversioned library.
Applications are supposed to use the versioned libraries instead. See
Luca's reply for the full explanation.

 http://lists.freepascal.org/lists/fpc-devel/2009-August/017300.html


The work around on the client PC is simple, but I do not think this is
the ideal solution - forcing the user to manually create a
libfbclient.so symbolic link to the versioned on. And to do that, they
must have root privileges!


Possible solutions:
-------------------
1) Change SqlDB + Firebird code to look for 'libfbclient.so.2' by
default. After all, version 2 of Firebird has been out for years.

2) Add a extra check in InitialiseIBase60() [ibase60.inc] to check for
versioned and un-versioned client libraries. The thirdparty FBLib
package used to do this and it worked fine. It doesn't need to check
minor versions, only major versions - starting at newest and working
back to oldest versions. eg:

   if found libfbclient.so.2 then  // latest major version of Firebird
      ...
   else if found libfbclient.so.1 then // previous major version
      ...
   else if found libfbclient.so then  // finally the unversioned one
      ...

3) Somehow allow the developer to specify via a SqlDB property which
version the initialization code should look for. After all, the
developer knows which version of the database server they developed
for.


I don't mind creating a patch for option 2 above. Would such a patch
be accepted though? It shouldn't break anything - in contrary, it will
only improve user experience and less application crashes in deployed
software.


-- 
Regards,
  - Graeme -


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



More information about the fpc-devel mailing list